History log of /external/lldb/include/lldb/Symbol/Symtab.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7940069905bee0b2e5f0661bf37c9f906ddf8603 10-Jul-2013 Greg Clayton <gclayton@apple.com> Cleanup on the unified section list changes. Main changes are:
- ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags
- Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections.

Other cleanups:
- Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly
- Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently
- Modified the Symtab class to store a file address lookup table for more efficient lookups
- Removed Section::Finalize() and SectionList::Finalize() as they did nothing
- Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs
- Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
f58438fa7751274b6f4e4b1805940127dce13b00 14-Apr-2013 Greg Clayton <gclayton@apple.com> Fixed issues with the way ELF symbols are parsed:
- Do not add symbols with no names
- Make sure that symbols from ELF symbol tables know that the byte size is correct. Previously the symbols would calculate their sizes by looking for the next symbol and take symbols that had zero size and make them have invalid sizes.
- Added the ability to dump raw ELF symbols by adding a Dump method to ELFSymbol

Also removed some unused code from lldb_private::Symtab.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
296b06d325413723f5aac5988eed977b278a7807 03-Apr-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13506727>

Symbol table function names should support lookups like symbols with debug info.

To fix this I:
- Gutted the way FindFunctions is used, there used to be way too much smarts only in the DWARF plug-in
- Made it more efficient by chopping the name up once and using simpler queries so that SymbolFile and Symtab plug-ins don't need to do as much
- Filter the results at a higher level
- Make the lldb_private::Symtab able to chop up C++ mangled names and make as much sense out of them as possible and also be able to search by basename, fullname, method name, and selector name.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
36da2aa6dc5ad9994b638ed09eb81c44cc05540b 25-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
2fcbf6e3d86ac0e6a95e11e5e232a9f72bd612d2 08-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12953853>

Setting breakpoints using "breakpoint set --selector <SEL>" previously didn't when there was no dSYM file.

Also fixed issues in the test suite that arose after fixing the bug.

Also fixed the log channels to properly ref count the log streams using weak pointers to the streams. This fixes a test suite problem that would happen when you specified a full path to the compiler with the "--compiler" option.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
16d2187c0c3992f22e9cb011f863dc0fe35e3cde 03-Dec-2011 Greg Clayton <gclayton@apple.com> Added the ability for clients to grab a set of symbol table indexes and then
add them to a fast lookup map. lldb_private::Symtab now export the following
public typedefs:

namespace lldb_private {

class Symtab {
typedef std::vector<uint32_t> IndexCollection;
typedef UniqueCStringMap<uint32_t> NameToIndexMap;
};
}

Clients can then find symbols by name and or type and end up with a
Symtab::IndexCollection that is filled with indexes. These indexes can then
be put into a name to index lookup map and control if the mangled and
demangled names get added to the map:

bool add_demangled = true;
bool add_mangled = true;
Symtab::NameToIndexMap name_to_index;
symtab->AppendSymbolNamesToMap (indexes, add_demangled, add_mangled, name_to_index).

This can be repeated as many times as needed to get a lookup table that
you are happy with, and then this can be sorted:

name_to_index.Sort();

Now name lookups can be done using a subset of the symbols you extracted from
the symbol table. This is currently being used to extract objective C types
from object files when there is no debug info in SymbolFileSymtab.

Cleaned up how the objective C types were being vended to be more efficient
and fixed some errors in the regular expression that was being used.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
0c496cd73b30842b49dcc26975fb50c0c77ad34f 22-Nov-2011 Greg Clayton <gclayton@apple.com> 12% allocated memory savings when debugging clang with DWARF in .o files by
making sure we perfectly size our vector of symbols on the symbol table.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
b0e68d996b28cf81a28aeceefd69f7ed8d4aba99 31-Mar-2011 Greg Clayton <gclayton@apple.com> Added some functions to our API related to classifying symbols as code, data,
const data, etc, and also for SBAddress objects to classify their type of
section they are in and also getting the module for a section offset address.

lldb::SymbolType SBSymbol::GetType();

lldb::SectionType SBAddress::GetSectionType ();
lldb::SBModule SBAddress::GetModule ();




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
b344843f75ef893762c93fd0a22d2d45712ce74d 24-Mar-2011 Greg Clayton <gclayton@apple.com> Fixed the LLDB build so that we can have private types, private enums and
public types and public enums. This was done to keep the SWIG stuff from
parsing all sorts of enums and types that weren't needed, and allows us to
abstract our API better.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
28d5fcc3158aebf543e0f3d0a3608c1746f5ef15 27-Jan-2011 Greg Clayton <gclayton@apple.com> Changed the SymbolFile::FindFunction() function calls to only return
lldb_private::Function objects. Previously the SymbolFileSymtab subclass
would return lldb_private::Symbol objects when it was asked to find functions.

The Module::FindFunctions (...) now take a boolean "bool include_symbols" so
that the module can track down functions and symbols, yet functions are found
by the SymbolFile plug-ins (through the SymbolVendor class), and symbols are
gotten through the ObjectFile plug-ins.

Fixed and issue where the DWARF parser might run into incomplete class member
function defintions which would make clang mad when we tried to make certain
member functions with invalid number of parameters (such as an operator=
operator that had no parameters). Now we just avoid and don't complete these
incomplete functions.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
cd151697a4b4d32d8818488b793ea44712945448 20-Jan-2011 Greg Clayton <gclayton@apple.com> Made the DWARF + debug map symbol file parser be much more efficient when it isn't
going to actually be used as the symbol file plug-in by looking only for suitable
N_OSO symbols and avoiding sorting function (N_FUN) and global/static (N_GSYM/N_STSYM)
symbols when there are no suitable N_OSO objects.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
8d3802d9d6c1be4c0d37c4d269b18bcb865823e6 08-Oct-2010 Greg Clayton <gclayton@apple.com> Added mutex protection to the Symtab class.

Added a new SortOrder enumeration and hooked it up to the "image dump symtab"
command so we can dump symbol tables in the original order, sorted by address,
or sorted by name.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
eea264007bc5fb42c8f3239726a9d28ae42e1b7b 15-Sep-2010 Greg Clayton <gclayton@apple.com> Moved the section load list up into the target so we can use the target
to symbolicate things without the need for a valid process subclass.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
178710cd4307f3d44dc76ebd70fc7daf7ebe17c5 14-Sep-2010 Greg Clayton <gclayton@apple.com> Looking at some of the test suite failures in DWARF in .o files with the
debug map showed that the location lists in the .o files needed some
refactoring in order to work. The case that was failing was where a function
that was in the "__TEXT.__textcoal_nt" in the .o file, and in the
"__TEXT.__text" section in the main executable. This made symbol lookup fail
due to the way we were finding a real address in the debug map which was
by finding the section that the function was in in the .o file and trying to
find this in the main executable. Now the section list supports finding a
linked address in a section or any child sections. After fixing this, we ran
into issue that were due to DWARF and how it represents locations lists.
DWARF makes a list of address ranges and expressions that go along with those
address ranges. The location addresses are expressed in terms of a compile
unit address + offset. This works fine as long as nothing moves around. When
stuff moves around and offsets change between the remapped compile unit base
address and the new function address, then we can run into trouble. To deal
with this, we now store supply a location list slide amount to any location
list expressions that will allow us to make the location list addresses into
zero based offsets from the object that owns the location list (always a
function in our case).

With these fixes we can now re-link random address ranges inside the debugger
for use with our DWARF + debug map, incremental linking, and more.

Another issue that arose when doing the DWARF in the .o files was that GCC
4.2 emits a ".debug_aranges" that only mentions functions that are externally
visible. This makes .debug_aranges useless to us and we now generate a real
address range lookup table in the DWARF parser at the same time as we index
the name tables (that are needed because .debug_pubnames is just as useless).
llvm-gcc doesn't generate a .debug_aranges section, though this could be
fixed, we aren't going to rely upon it.

Renamed a bunch of "UINT_MAX" to "UINT32_MAX".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
7c36fa07bc2c2c7efc4a28ad540f7711491f379d 11-Sep-2010 Greg Clayton <gclayton@apple.com> Remove the eSymbolTypeFunction, eSymbolTypeGlobal, and eSymbolTypeStatic.
They will now be represented as:
eSymbolTypeFunction: eSymbolTypeCode with IsDebug() == true
eSymbolTypeGlobal: eSymbolTypeData with IsDebug() == true and IsExternal() == true
eSymbolTypeStatic: eSymbolTypeData with IsDebug() == true and IsExternal() == false

This simplifies the logic when dealing with symbols and allows for symbols
to be coalesced into a single symbol most of the time.

Enabled the minimal symbol table for mach-o again after working out all the
kinks. We now get nice concise symbol tables and debugging with DWARF in the
.o files with a debug map in the binary works well again. There were issues
where the SymbolFileDWARFDebugMap symbol file parser was using symbol IDs and
symbol indexes interchangeably. Now that all those issues are resolved
debugging is working nicely.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
0ad086f3ab18d6927b9df2f79169607d3a5d90e4 07-Sep-2010 Greg Clayton <gclayton@apple.com> Added Symtab::FindSymbolByID() in preparation for enabling the minimal
symbol tables. Minimal symbol tables enable us to merge two symbols, one
debug symbol and one linker symbol, into a single symbol that can carry
just as much information and will avoid duplicate symbols in the symbol
table.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
c3d68556a5ae14219eb7638dade1799ab94b69fe 16-Jun-2010 Owen Anderson <resistor@mac.com> Switch from qsort_r to std::stable_sort for a performance win and improved portability.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
7dbd6da9a222b6bcef35f1cb8ab838a30b7f75e5 11-Jun-2010 Owen Anderson <resistor@mac.com> Revert my previous patch. Apparently the code-size impact of std::sort isn't acceptable.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
c0b52f43342b9916c4c384a3a78fdf72d753d375 11-Jun-2010 Owen Anderson <resistor@mac.com> Replace qsort_r with std::sort. This gets rid of a lot of portability
ickiness, and is cleaner to boot.

I'm fairly confident that I converted the comparator over properly,
and what testing I could figure out how to run seemed to pass, but it
would be great if someone in the know could check behind me.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
020f353bf792f1028e4037ea92d03acc90594c40 11-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Make qsort_r usage "portable". Why does a function which seems so simple
have to be so complicated?



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h
24943d2ee8bfaa7cf5893e4709143924157a5c1e 08-Jun-2010 Chris Lattner <sabre@nondot.org> Initial checkin of lldb code from internal Apple repo.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Symbol/Symtab.h