| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
which had previously been commented out while I tested
it. It's not fully working yet, but it doesn't break
our testsuite and it's an important piece of
functionality.
Also added some logging to SymbolFileDWARF to help
diagnose entities that are found in a symbol file,
but do not reside in the expected namespace.
llvm-svn: 141894
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
context object. Having it populated and registered
within a single FindExternalVisibleDecls call worked
fine when there was only one call (i.e., when we were
just looking in the global namespace).
However, now FindExternalVisibleDecls is called for
nested namespaces as well, which means that it is
called not once but many times (once per module in
which the parent namespace appears). This means that
the namespace mapping is built up across many calls
to the inferior FindExternalVisibleDecls, so I moved
it into a data structure (the search context) that is
shared by all calls.
I also added some logging to make it easier to see
what is happening during a namespace search, and
cleaned up some existing logging.
llvm-svn: 141888
|
|
|
|
|
|
|
|
| |
down through Module and SymbolVendor into SymbolFile.
Added checks to SymbolFileDWARF that restrict symbol
searches when a namespace is passed in.
llvm-svn: 141847
|
|
|
|
|
|
|
| |
and a "DWARFCompileUnit *" to avoid doing a DIE lookup twice and to prepare
for using namespaces in the lookups.
llvm-svn: 141843
|
|
|
|
|
|
|
| |
file. This will help us to minimize lookups that can't possibly match anything
in the current symbol file.
llvm-svn: 141838
|
|
|
|
| |
llvm-svn: 141832
|
|
|
|
| |
llvm-svn: 141627
|
|
|
|
|
|
|
|
| |
name_type_mask
rather than the computed effective_name_type_mask.
llvm-svn: 141624
|
|
|
|
|
|
| |
and the RangeDataArray to have an extra "unsigned N" template parameter. Updated the lldb_private::Block to use a RangeArray with a uint32_t for both the function base offset and block range size, and then a 1 for the small vector size since most lexical blocks in DWARF only have 1 range. Updates the DWARFDebugRanges RangeArray to use an unsigned of 2 since most blocks that have more than one range usually have 2. Also updated a DWARFDebugAranges to default their RangeArray to use a SmallVector with unsigned size of 1 since this will take care of the .o files when doing DWARF in .o files and since there really isn't any good size we can guess with.
llvm-svn: 141480
|
|
|
|
|
|
| |
converted remaining DWARF areas that were using ranges over to this class. Also converted lldb_private::Block to use it.
llvm-svn: 141460
|
|
|
|
|
|
|
|
|
|
| |
lookups to the
SymbolFIle (it was done mostly in the BreakpointResolverName resolver before.) Then
tailor our searches to the way the indexed maps are laid out. This removes a bunch
of test case failures using indexed dSYM's.
llvm-svn: 141428
|
|
|
|
|
|
|
|
|
|
| |
for a Range, RangeArray, RangeData (range + data), or a RangeDataArray. We have many range implementations in LLDB and I will be converting over to using the classes in RangeMap.h so we can have one set of code that does ranges and searching of ranges.
Fixed up DWARFDebugAranges to use the new range classes.
Fixed the enumeration parsing to take a lldb_private::Error to avoid a lot of duplicated code. Now when an invalid enumeration is supplied, an error will be returned and that error will contain a list of the valid enumeration values.
llvm-svn: 141382
|
|
|
|
|
|
| |
to easily control the base address type, the size type, and the data that is stored with each range. It is designed to be populated by appending all needed items, then sorting the resulting list, and optionally minimizing the list when done. I adopted this new list in the DWARFDebugAranges for even further memory savings.
llvm-svn: 141352
|
|
|
|
|
|
|
|
|
| |
(lldb) log enable dwarf lookups
This allows us to see when lookups are being done on functions, addresses,
and types by both name and regular expresssion.
llvm-svn: 141259
|
|
|
|
|
|
|
|
| |
due to not parsing the function types when the function blocks are made and parsed.
Cached the Function object's m_type value after it has been calculated.
llvm-svn: 141225
|
|
|
|
|
|
|
|
|
|
| |
index the DWARF. Also fixed an issue with memory accelerator tables with a
size of 1 where we would loop infinitely.
Added support for parsing the new .apple_namespaces section which gives us a
memory hash table for looking up namespaces.
llvm-svn: 141128
|
|
|
|
|
|
| |
DWARF errors and warnings.
llvm-svn: 140918
|
|
|
|
|
|
| |
an anonymous struct type (which lacks any name).
llvm-svn: 140917
|
|
|
|
|
|
|
|
|
|
| |
Also reduce the size of the lldb_private::Symbol objects by removing the
lldb_private::Function pointer that was in each symbol. Running Instruments
has shown that when debugging large applications with DWARF in .o files that
lldb_private::Symbol objects are one of the highest users of memory. No one
was using the Symbol::GetFunction() call anyway.
llvm-svn: 140881
|
|
|
|
|
|
| |
Don't parse function types all the time, only parse them lazily.
llvm-svn: 140842
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
information generated for it. Say we have a concrete function "foo" which
has inlined function "a" which calls another inlined function "b":
foo
1 {
2 {
a ()
3 {
b ()
4 {
}
}
}
}
Sometimes we see the compiler generate an address range in the DWARF for "foo"
(block 1 above) as say [0x1000-0x1100). Then the range for "a" is something
like [0x1050-0x1060) (note that it is correctly scoped within the "foo"
address range). And then we get "b" which is a child of "a", yet the debug
info says it has a range of [0x1060-0x1080) (not contained within "a"). We now
detect this issue when making our blocks and add an extra range to "a".
Also added a new "lldb" logging category named "symbol" where we can find out
about symbol file errors and warnings.
llvm-svn: 140822
|
|
|
|
|
|
| |
everywhere we were using fprintf(stderr directly.
llvm-svn: 140813
|
|
|
|
|
|
|
|
|
| |
are available, we currently will still index the DWARF ourselves
and assert if the name lookups differ. This will help us transition
to the new accelerator tables and make sure they are workng before
we switch over entirely.
llvm-svn: 140788
|
|
|
|
|
|
|
| |
up the implementation details of the on disk hash, these changed implement
the changes in the on disk table format.
llvm-svn: 140750
|
|
|
|
|
|
|
| |
hash tables. Renamed the DWARF sections to ".apple_names" and
".apple_types" until we get more buy in from other vendors.
llvm-svn: 140702
|
|
|
|
|
|
|
|
|
|
| |
selector
etc to specific source files.
Added SB API's to specify these source files & also more than one module.
Added an "exact" option to CompileUnit's FindLineEntry API.
llvm-svn: 140362
|
|
|
|
|
|
|
|
| |
stdarg formats to use __attribute__ format so the compiler can flag
incorrect uses. Fix all incorrect uses. Most of these are innocuous,
a few were resulting in crashes.
llvm-svn: 140185
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used to do this because we needed to find the shared pointer for a .o
file when the .o file's module was needed in a SymbolContext since the
module in a symbol context was a shared pointer. Now that we are using
intrusive pointers we don't have this limitation anymore since any
instrusive shared pointer can be made from a pointer to an object
all on its own.
Also switched over to having the Module and SymbolVendor use shared
pointers to their object files as had a leak on MacOSX when the
SymbolVendor's object file wasn't the same as the Module's (debug info
in a stand along file (dSYM file)). Now everything will correctly clean
itself up when the module goes away after an executable gets rebuilt.
Now we correctly get rid of .o files that are used with the DWARF with
debug map executables on subsequent runs since the only shared pointer
to the object files in from the DWARF symbol file debug map parser, and
when the module gets replaced, it destroys to old one along with all .o
files.
Also added a small optimization when using BSD archives where we will
remove old BSD containers from the shared list when they are outdated.
llvm-svn: 140002
|
|
|
|
|
|
|
|
|
|
|
| |
ModuleSP
Module::GetSP();
Since we are now using intrusive ref counts, we can easily turn any
pointer to a module into a shared pointer just by assigning it.
llvm-svn: 139984
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Address ranges are now split up into two different tables:
- one in DWARFDebugInfo that is compile unit specific
- one in each DWARFCompileUnit that has exact function DIE offsets
This helps keep the size of the aranges down since the main table will get
uniqued and sorted and have consecutive ranges merged. We then only parse the
compile unit one on demand once we have determined that a compile unit contains
the address in question. We also now use the .debug_aranges section if there
is one instead of always indexing the DWARF manually.
NameToDIE now uses a UniqueCStringMap<dw_offset> map instead of a std::map.
std::map is very bulky as each node has 3 pointers and the key and value types.
This gets our NameToDIE entry down to 12 bytes each instead of 48 which saves
us a lot of memory when we have very large DWARF.
DWARFDebugAranges now has a smaller footprint for each range it contains to
save on memory.
llvm-svn: 139557
|
|
|
|
| |
llvm-svn: 139490
|
|
|
|
|
|
|
| |
Added a new log category for DWARF called "aranges" to log the parsing
of address ranges.
llvm-svn: 139489
|
|
|
|
|
|
|
| |
One fixes a trailing comma bug (g++ doesn't like them)
The other gets the Error from the result of an expression evaluation and uses it as the error for the Process::LoadImage() method.
llvm-svn: 139336
|
|
|
|
|
|
|
|
|
|
| |
store the per-Target default Source File & Line.
Set the default Source File & line to main (if it can be found.) at startup. Selecting the current thread & or frame resets
the current source file & line, and "source list" as well as the breakpoint command "break set -l <NUM>" will use the
current source file.
llvm-svn: 139323
|
|
|
|
| |
llvm-svn: 138996
|
|
|
|
|
|
|
|
| |
register names when dumping variable locations and location lists. Also did
some cleanup where "int" types were being used for "lldb::RegisterKind"
values.
llvm-svn: 138988
|
|
|
|
| |
llvm-svn: 138981
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DWARF accelerator table sections to the DWARF parser. These sections are similar
to the .debug_pubnames and .debug_pubtypes, but they are designed to be hash tables
that are saved to disc in a way that the sections can just be loaded into memory
and used without any work on the debugger side. The .debug_pubnames and .debug_pubtypes
sections are not ordered, contain a copy of the name in the section itself which
makes these sections quite large, they only include publicly exported names (so no
static functions, no types defined inside functions), many compilers put different
information in them making them very unreliable so most debugger ignore these sections
and parse the DWARF on their own. The tables must also be parsed and sorted in order
to be used effectively. The new sections can be quickly loaded and very efficiently be used
to do name to DIE lookups with very little up front work. The format of these new
sections will be changing while we work out the bugs, but we hope to have really
fast name to DIE lookups soon.
llvm-svn: 138979
|
|
|
|
|
|
| |
never checking them for NULL. Pass a reference instead.
llvm-svn: 138694
|
|
|
|
|
|
| |
in SymbolFileDWARF::ParseType (and eventually in other interesting places as well.)
llvm-svn: 138644
|
|
|
|
|
|
| |
to a file.
llvm-svn: 138620
|
|
|
|
|
|
| |
type/comp_unit/obj_file were being processed when something goes wrong...
llvm-svn: 138600
|
|
|
|
|
|
| |
"class_language"... Changed that to "cu_language".
llvm-svn: 138523
|
|
|
|
|
|
|
|
|
|
|
| |
C++ methods for a function depending on how the DWARF was
created. Now we parse the class type from the definition,
and all methods that use DW_AT_specification or DW_AT_abstract_origin
attributes to point to the definition, now won't create
duplicate entries. This is in response to how clang++ creates
much different DWARF than gcc.
llvm-svn: 137737
|
|
|
|
|
|
|
| |
in ObjCLanguageRuntime.
Add the category-free name of symbols to the Symtab name-to-index list.
llvm-svn: 137600
|
|
|
|
| |
llvm-svn: 137490
|
|
|
|
|
|
| |
time after recently backing out another fix.
llvm-svn: 137475
|
|
|
|
|
|
| |
as this function is what parses the blocks for a function...
llvm-svn: 137461
|
|
|
|
|
|
| |
is contained inside a function.
llvm-svn: 137438
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
was failing if the DWARF was laid out in a certain way. The way
we detect C++ classes is now more robust so that a class method
can be defined outside of the class and refer to a definition inside
the class with a DW_AT_specification or DW_AT_abstract_origin attribute.
Fixed a case in Thread.cpp where we were looking up info in the frame
when we didn't need to. This was from some changes to support external
editors. Now the info is only looked up if needed.
llvm-svn: 137436
|