| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
- 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.
llvm-svn: 179466
|
|
|
|
|
|
|
|
|
|
|
| |
zero out the
SectionList so we don't try to do anything with this file. Currently we end up crashing
later in the debug session when we read past the end of the file -- this at least gets us
closer with something like ProcessMachCore printing "error: core file has no sections".
<rdar://problem/13468295>
llvm-svn: 179152
|
|
|
|
|
|
|
|
| |
LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.
All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.
llvm-svn: 178191
|
|
|
|
|
|
| |
It won't have one and it isn't needed.
llvm-svn: 177688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This returns a vector of <file address, size> entries for all of
the functions in the module that have an eh_frame FDE.
Update ObjectFileMachO to use the eh_frame FDE function addresses if
the LC_FUNCTION_STARTS section is missing, to fill in the start
addresses of any symbols that have been stripped from the binary.
Generally speaking, lldb works best if it knows the actual start
address of every function in a module - it's especially important
for unwinding, where lldb inspects the instructions in the prologue
of the function. In a stripped binary, it is deprived of this
information and it reduces the quality of our unwinds and saved
register retrieval.
Other ObjectFile users may want to use the function addresses from
DWARFCallFrameInfo to fill in any stripped symbols like ObjectFileMachO
does already.
<rdar://problem/13365659>
llvm-svn: 177624
|
|
|
|
|
|
| |
Noticed these while working on the last commit.
llvm-svn: 176590
|
|
|
|
|
|
|
|
|
| |
of hardcoding the value.
Read the version number of the dyld shared cache.
<rdar://problem/13311882>
llvm-svn: 176589
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DWARF with .o files now uses 40-60% less memory!
Big fixes include:
- Change line table internal representation to contain "file addresses". Since each line table is owned by a compile unit that is owned by a module, it makes address translation into lldb_private::Address easy to do when needed.
- Removed linked address members/methods from lldb_private::Section and lldb_private::Address
- lldb_private::LineTable can now relink itself using a FileRangeMap to make it easier to re-link line tables in the future
- Added ObjectFile::ClearSymtab() so that we can get rid of the object file symbol tables after we parse them once since they are not needed and kept memory allocated for no reason
- Moved the m_sections_ap (std::auto_ptr to section list) and m_symtab_ap (std::auto_ptr to the lldb_private::Symtab) out of each of the ObjectFile subclasses and put it into lldb_private::ObjectFile.
- Changed how the debug map is parsed and stored to be able to:
- Lazily parse the debug map for each object file
- not require the address map for a .o file until debug information is linked for a .o file
llvm-svn: 176454
|
|
|
|
| |
llvm-svn: 176210
|
|
|
|
| |
llvm-svn: 176206
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- generate-vers.pl has to be called by cmake to generate the version number
- parallel builds not yet supported; dependency on clang must be explicitly specified
Tested on Linux.
- Building on Mac will require code-signing logic to be implemented.
- Building on Windows will require OS-detection logic and some selective directory inclusion
Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir
who ported them to Linux!
llvm-svn: 175795
|
|
|
|
|
|
| |
with the incorrect symbol type.
llvm-svn: 174984
|
|
|
|
| |
llvm-svn: 174668
|
|
|
|
| |
llvm-svn: 174665
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lldb was mmap'ing archive files once per .o file it loads, now it correctly shares the archive between modules.
LLDB was also always mapping entire contents of universal mach-o files, now it maps just the slice that is required.
Added a new logging channel for "lldb" called "mmap" to help track future regressions.
Modified the ObjectFile and ObjectContainer plugin interfaces to take a data offset along with the file offset and size so we can implement the correct caching and efficient reading of parts of files without mmap'ing the entire file like we used to.
The current implementation still keeps entire .a files mmaped (once) and entire slices from universal files mmaped to ensure that if a client builds their binaries during a debug session we don't lose our data and get corrupt object file info and debug info.
llvm-svn: 174524
|
|
|
|
|
|
|
|
|
| |
function stub routine addresses from an in-memory-only
MachO object file. This was the only remaining part of
ParseSymtab() that was assuming a file exists.
<rdar://problem/13139585>
llvm-svn: 174455
|
|
|
|
|
|
|
| |
to match Greg's dataextractor patch, this one in some
#if defined arm code.
llvm-svn: 173564
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 173463
|
|
|
|
|
|
|
|
|
|
|
|
| |
equality can be strict or loose and we want code to
explicitly choose one or the other.
Also renamed the Compare function to IsEqualTo, to
avoid confusion.
<rdar://problem/12856749>
llvm-svn: 170152
|
|
|
|
|
|
|
|
| |
is deeper than that and avoiding the crash in this
one part of code won't solve anything. I know where
the real problem is now.
llvm-svn: 170068
|
|
|
|
|
|
|
|
|
|
| |
When using the same-device optimization for shared cache libraries, if
we have an invalid load address for __LINKEDIT, don't try to read
anything out of lldb's own address space. Reading it out of the remote
address space will fail gracefully if we have bad addresses but reading
it out of lldb's own address space will result in a crash.
llvm-svn: 169582
|
|
|
|
|
|
|
|
| |
- use macros from inttypes.h for format strings instead of OS-specific types
Patch from Matt Kopec!
llvm-svn: 168945
|
|
|
|
|
|
| |
Allow the expression parser to see more than just data symbols. We now accept any symbol that has an address. We take precautions to only accept symbols by their mangled or demangled names only if the demangled name was not synthesized. If the demangled name is synthesized, then we now mark symbols accordingly and only compare against the mangled original name.
llvm-svn: 168668
|
|
|
|
|
|
| |
Make sure architectures are obeyed for skinny mach files.
llvm-svn: 168205
|
|
|
|
|
|
| |
bit ELF relocations to get parsed incorrectly.
llvm-svn: 167773
|
|
|
|
|
|
| |
RegisterContextKDP_i386 was not correctly writing registers due to missing "virtual" keywords. Added the virtual keywords and made the functions pure virtual to ensure subclasses can't get away without implementing these functions.
llvm-svn: 167066
|
|
|
|
|
|
| |
has changed, and auto update as needed.
llvm-svn: 166693
|
|
|
|
| |
llvm-svn: 165808
|
|
|
|
|
|
| |
files for debug map + DWARF in .o file debugging.
llvm-svn: 163417
|
|
|
|
|
|
| |
Fixed an issue where we didn't parse N_SO stab pairs where the first N_SO was a relative path.
llvm-svn: 163259
|
|
|
|
|
|
| |
Don't crash when we can't resolve our stub to a symbol.
llvm-svn: 163189
|
|
|
|
|
|
|
|
|
| |
and instead made us use implicit casts to bool.
This generated a warning in C++11.
<rdar://problem/11930775>
llvm-svn: 161559
|
|
|
|
|
|
| |
char*'s - Greg removed the methods which accept char*'s earlier today.
llvm-svn: 160539
|
|
|
|
|
|
| |
that has bit rotted and isn't being used. Also cleaned up the API to the "lldb_private::Mangled" to always take "const ConstString &" arguments instead of both "const ConstString &" and "const char *".
llvm-svn: 160466
|
|
|
|
| |
llvm-svn: 160338
|
|
|
|
|
|
|
|
|
|
| |
Mac OS X, because the UUID is the same for all
OpenCL-generated dylibs and therefore would
conflict.
<rdar://problem/11620586>
llvm-svn: 160135
|
|
|
|
|
|
|
| |
the layout of the dyld shared cache file and how we're stepping
through it; also use offsetof to find offsets of struct elements.
llvm-svn: 158962
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is being run on iOS natively and we are examining a binary that is
in the shared-cache. The shared cache may be set up to not load the
symbol names in memory (and may be missing some local symbols entirely,
to boot) so we need to read the on-disk-but-not-mapped-into-memory cache
of symbol names/symbols before we start processing the in-memory nlist
entries.
This code needs to be reorganized into its own separate method, ideally
we'll find some way to not duplicate the nlist symbol handling. But
we need to handle this new format quickly and we'll clean up later.
Thanks for James McIlree for the patch. Fixes <rdar://problem/11639018>.
llvm-svn: 158891
|
|
|
|
|
|
|
|
|
|
|
| |
a cache of address ranges for child sections,
accelerating lookups. This cache is built during
object file loading, and is then set in stone once
the object files are done loading. (In Debug builds,
we ensure that the cache is never invalidated after
that.)
llvm-svn: 158188
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed an issue with the symbol table parsing of files that have STAB entries in them where there are two N_SO entries where the first has a directory, and the second contains a full path:
[ 0] 00000002 64 (N_SO ) 00 0000 0000000000000000 '/Volumes/data/src/'
[ 1] 0000001e 64 (N_SO ) 00 0000 0000000000000000 '/Volumes/data/src/Source/main.m'
[ 2] 00000047 66 (N_OSO ) 09 0001 000000004fc642d2 '/tmp/main.o'
[ 3] 00000001 2e (N_BNSYM ) 01 0000 0000000000003864
[ 4] 000000bd 24 (N_FUN ) 01 0000 0000000000003864 '_main'
[ 5] 00000001 24 (N_FUN ) 00 0000 00000000000000ae
[ 6] 00000001 4e (N_ENSYM ) 01 0000 00000000000000ae
[ 7] 00000001 64 (N_SO ) 01 0000 0000000000000000
We now correctly combine entries 0 and 1 into a single entry.
llvm-svn: 157712
|
|
|
|
|
|
| |
LC_ENCRYPTION_INFO with "cryptid == 0" is not actually encrypted and LLDB fails to read memory from file.
llvm-svn: 157487
|
|
|
|
|
|
| |
a mach file from memory even though we have a process. So now we don't read the string table strings from memory when we don't have to.
llvm-svn: 157482
|
|
|
|
|
|
| |
from memory when they are in the shared cache: always read the symbol table strings from memory and let the process' memory cache do the work.
llvm-svn: 157083
|
|
|
|
| |
llvm-svn: 155423
|
|
|
|
|
|
|
|
| |
into the middle of a vector was being used after the vector may
have been resized.
<rdar://problem/11284937>
llvm-svn: 155421
|
|
|
|
|
|
| |
section data for files in the dyld shared cache.
llvm-svn: 154984
|
|
|
|
|
|
| |
clients can tell the difference between ARM/Thumb opcodes when disassembling ARM.
llvm-svn: 154633
|
|
|
|
| |
llvm-svn: 153941
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
indicates that the section is thread specific. Any functions the load a module
given a slide, will currently ignore any sections that are thread specific.
lldb_private::Section now has:
bool
Section::IsThreadSpecific () const
{
return m_thread_specific;
}
void
Section::SetIsThreadSpecific (bool b)
{
m_thread_specific = b;
}
The ELF plug-in has been modified to set this for the ".tdata" and the ".tbss"
sections.
Eventually we need to have each lldb_private::Thread subclass be able to
resolve a thread specific section, but for now they will just not resolve. The
code for that should be trivual to add, but the address resolving functions
will need to be changed to take a "ExecutionContext" object instead of just
a target so that thread specific sections can be resolved.
llvm-svn: 153537
|
|
|
|
|
|
|
|
|
| |
1 - sections only get a valid VM size if they have SHF_ALLOC in the section flags
2 - symbol names are marked as mangled if they start with "_Z"
Also fixed the DWARF parser to correctly use the section file size when extracting the DWARF.
llvm-svn: 153496
|