Q: using lldb::addr_t and addr_t

Hello,

Quick question on using lldb::addr_t and addr_t.
I am getting compile errors due undefined addr_t.
The way to fix it seems simple, just change
all the addr_t to lldb::addr_t :-). But there is
a lot of the addr_t sprinkled around, so perhaps
I am simply missing add_t type definition.
Are these two types intended to be equivalent?

Paweł

What files are you referring to?

On several files that I’ve seen (for example, ABI plugins), you have lldb::addr_t on the headers, and plain addr_t (after “using namespace lldb”) on the .cpp files.
Both referring to the same type.

Regards,

Filipe

Filipe,

What files are you referring to?

On several files that I've seen (for example, ABI plugins), you have
lldb::addr_t on the headers, and plain addr_t (after “using namespace
lldb”) on the .cpp files.
Both referring to the same type.

I have just started working with windows branch on cygwin.
When I was wading through the build log after make -i
there was a bunch of undefined addr_t in addition to
other problems.

Some files ex: API/SBProcess.cpp on that branch use mix
of lldb::addr_t and addr_t which prompted the question.

But couple of files I checked do use lldb namespace so
this could be something else.

This is usually due to a missing:

using namespace lldb;

at the top of the source file. If this is in a header file, then you will need to prefix the type with "lldb::".

Greg

This is usually due to a missing:

using namespace lldb;

at the top of the source file. If this is in a header file, then you will need to prefix the type with "lldb::".

OK, so just use the standard pattern with fully qualified
type in the header.

Do you care about cleaning lldb::addr_t in the implementation files?

This is usually due to a missing:

using namespace lldb;

at the top of the source file. If this is in a header file, then you will need to prefix the type with "lldb::".

OK, so just use the standard pattern with fully qualified
type in the header.

Sounds good.

Do you care about cleaning lldb::addr_t in the implementation files?

It really depends. Often times if an implementation file includes llvm/clang and LLDB headers, we sometimes like the full qualifications. So I wouldn't go out of your way to clean any existing extra quals.