- Oct 11, 2012
-
-
Greg Clayton authored
Fixed an indentation issue that only shows up when dumping .o files that use linked addresses (DWARF in .o files with debug map). llvm-svn: 165740
-
- Jul 12, 2012
-
-
Sean Callanan authored
return sections that don't have valid modules. <rdar://problem/11605824> llvm-svn: 160141
-
- Jul 07, 2012
-
-
rdar://problem/11357711Greg Clayton authored
Fixed a crasher where the section load list was not thread safe. llvm-svn: 159884
-
- Jun 08, 2012
-
-
Sean Callanan authored
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
-
- Mar 27, 2012
-
-
Greg Clayton authored
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
-
- Feb 24, 2012
-
-
rdar://problem/10103468Greg Clayton authored
I started work on being able to add symbol files after a debug session had started with a new "target symfile add" command and quickly ran into problems with stale Address objects in breakpoint locations that had lldb_private::Section pointers into modules that had been removed or replaced. This also let to grabbing stale modules from those sections. So I needed to thread harded the Address, Section and related objects. To do this I modified the ModuleChild class to now require a ModuleSP on initialization so that a weak reference can created. I also changed all places that were handing out "Section *" to have them hand out SectionSP. All ObjectFile, SymbolFile and SymbolVendors were inheriting from ModuleChild so all of the find plug-in, static creation function and constructors now require ModuleSP references instead of Module *. Address objects now have weak references to their sections which can safely go stale when a module gets destructed. This checkin doesn't complete the "target symfile add" command, but it does get us a lot clioser to being able to do such things without a high risk of crashing or memory corruption. llvm-svn: 151336
-
- Feb 05, 2012
-
-
rdar://problem/10560053Greg Clayton authored
Fixed "target modules list" (aliased to "image list") to output more information by default. Modified the "target modules list" to have a few new options: "--header" or "-h" => show the image header address "--offset" or "-o" => show the image header address offset from the address in the file (the slide applied to the shared library) Removed the "--symfile-basename" or "-S" option, and repurposed it to "--symfile-unique" "-S" which will show the symbol file if it differs from the executable file. ObjectFile's can now be loaded from memory for cases where we don't have the files cached locally in an SDK or net mounted root. ObjectFileMachO can now read mach files from memory. Moved the section data reading code into the ObjectFile so that the object file can get the section data from Process memory if the file is only in memory. lldb_private::Module can now load its object file in a target with a rigid slide (very common operation for most dynamic linkers) by using: bool Module::SetLoadAddress (Target &target, lldb::addr_t offset, bool &changed) lldb::SBModule() now has a new constructor in the public interface: SBModule::SBModule (lldb::SBProcess &process, lldb::addr_t header_addr); This will find an appropriate ObjectFile plug-in to load an image from memory where the object file header is at "header_addr". llvm-svn: 149804
-
- Jan 12, 2012
-
-
Greg Clayton authored
mmap() the entire object file contents into memory with MAP_PRIVATE. We do this because object file contents can change on us and currently this helps alleviate this situation. It also make the code for accessing object file data much easier to manage and we don't end up opening the file, reading some data and closing the file over and over. llvm-svn: 148017
-
- Jan 06, 2012
-
-
rdar://problem/10652336Greg Clayton authored
Fixed a crasher when trying to load an expression prefix file: % touch /tmp/carp.txt % xcrun lldb (lldb) settings set target.expr-prefix /tmp/carp.txt Segmentation fault llvm-svn: 147646
-
- Oct 19, 2011
-
-
Greg Clayton authored
process IDs, and thread IDs, but was mainly needed for for the UserID's for Types so that DWARF with debug map can work flawlessly. With DWARF in .o files the type ID was the DIE offset in the DWARF for the .o file which is not unique across all .o files, so now the SymbolFileDWARFDebugMap class will make the .o file index part (the high 32 bits) of the unique type identifier so it can uniquely identify the types. llvm-svn: 142534
-
- Aug 22, 2011
-
-
Greg Clayton authored
plug-ins are add on plug-ins for the lldb_private::Process class that can add thread contexts that are read from memory. It is common in kernels to have a lot of threads that are not currently executing on any cores (JTAG debugging also follows this sort of thing) and are context switched out whose state is stored in memory data structures. Clients can now subclass the OperatingSystem plug-ins and then make sure their Create functions correcltly only enable themselves when the right binary/target triple are being debugged. The operating system plug-ins get a chance to attach themselves to processes just after launching or attaching and are given a lldb_private::Process object pointer which can be inspected to see if the main executable, target triple, or any shared libraries match a case where the OS plug-in should be used. Currently the OS plug-ins can create new threads, define the register contexts for these threads (which can all be different if desired), and populate and manage the thread info (stop reason, registers in the register context) as the debug session goes on. llvm-svn: 138228
-
- Jul 07, 2011
-
-
Greg Clayton authored
variables prior to running your binary. Zero filled sections now get section data correctly filled with zeroes when Target::ReadMemory reads from the object file section data. Added new option groups and option values for file lists. I still need to hook up all of the options to "target variable" to allow more complete introspection by file and shlib. Added the ability for ValueObjectVariable objects to be created with only the target as the execution context. This allows them to be read from the object files through Target::ReadMemory(...). Added a "virtual Module * GetModule()" function to the ValueObject class. By default it will look to the parent variable object and return its module. The module is needed when we have global variables that have file addresses (virtual addresses that are specific to module object files) and in turn allows global variables to be displayed prior to running. Removed all of the unused proxy object support that bit rotted in lldb_private::Value. Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code with the more efficient "FileSpec::Equal (lhs, rhs)". Improved logging in GDB remote plug-in. llvm-svn: 134579
-
- Mar 24, 2011
-
-
Greg Clayton authored
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. llvm-svn: 128239
-
- Dec 08, 2010
-
-
Greg Clayton authored
have children sections). Modified SectionLoadList to do it's own multi-threaded protected on its map. The ThreadSafeSTLMap class was difficult to deal with and wasn't providing much utility, it was only getting in the way. Make sure when the communication read thread is about to exit, it clears the thread in the main class. Fixed the ModuleList to correctly ignore architectures and UUIDs if they aren't valid when searching for a matching module. If we specified a file with no arch, and then modified the file and loaded it again, it would not match on subsequent searches if the arch was invalid since it would compare an invalid architecture to the one that was found or selected within the shared library or executable. This was causing stale modules to stay around in the global module list when they should have been removed. Removed deprecated functions from the DynamicLoaderMacOSXDYLD class. Modified "ProcessGDBRemote::IsAlive" to check if we are connected to a gdb server and also make sure our process hasn't exited. llvm-svn: 121236
-
- Dec 07, 2010
-
-
Greg Clayton authored
it indents and shows things correctly. When we are debugging DWARF in .o files with debug map, we can see the remapped sections by dumping the sections for the .o files by explicitly dumping the module by name. For example, debugging the lldb/test/class_types example on MacOSX without a dSYM file we can make a query that causes the main.o file to be loaded, then we can do a: (lldb) image dump section main.o This will show the exact section map that is used and can help track down when things are going wrong with DWARF in .o files with debug map. llvm-svn: 121154
-
Greg Clayton authored
if two functions had the same demangled names (constructors where we have the in charge and not in charge version) we could end up mixing the two up when making the function in the DWARF. This was because we need to lookup the symbol by name and we need to use the mangled name if there is one. This ensures we get the correct address and that we resolve the linked addresses correctly for DWARf with debug map. llvm-svn: 121116
-
- Oct 27, 2010
-
-
Greg Clayton authored
all of the calls inlined in the header file for better performance. Fixed the summary for C string types (array of chars (with any combo if modifiers), and pointers to chars) work in all cases. Fixed an issue where a forward declaration to a clang type could cause itself to resolve itself more than once if, during the resolving of the type itself it caused something to try and resolve itself again. We now remove the clang type from the forward declaration map in the DWARF parser when we start to resolve it and avoid this additional call. This should stop any duplicate members from appearing and throwing all the alignment of structs, unions and classes. llvm-svn: 117437
-
- Oct 08, 2010
-
-
Greg Clayton authored
if the address comes from a data section. Fixed an issue that could occur when looking up a symbol that has a zero byte size where no match would be returned even if there was an exact symbol match. Cleaned up the section dump output and added the section type into the output. llvm-svn: 116017
-
- Sep 15, 2010
-
-
Greg Clayton authored
to symbolicate things without the need for a valid process subclass. llvm-svn: 113895
-
- Sep 14, 2010
-
-
Greg Clayton authored
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". llvm-svn: 113829
-
- Jul 22, 2010
-
-
Greg Clayton authored
SectionType for Section objects for DWARF. Modified the DWARF plug-in to get the DWARF sections by SectionType so we can safely abstract the LLDB core from section names for the various object file formats. Modified the SectionType definitions for .debug_pubnames and .debug_pubtypes to use the correct case. llvm-svn: 109054
-
- Jul 21, 2010
-
-
Greg Clayton authored
llvm-svn: 109040
-
- Jul 01, 2010
-
-
Greg Clayton authored
Added the ability to read memory from the target's object files when we aren't running, so disassembling works before you run! Cleaned up the API to lldb_private::Target::ReadMemory(). Cleaned up the API to the Disassembler to use actual "lldb_private::Address" objects instead of just an "addr_t". This is nice because the Address objects when resolved carry along their section and module which can get us the object file. This allows Target::ReadMemory to be used when we are not running. Added a new lldb_private::Address dump style: DumpStyleDetailedSymbolContext This will show a full breakdown of what an address points to. To see some sample output, execute a "image lookup --address <addr>". Fixed SymbolContext::DumpStopContext(...) to not require a live process in order to be able to print function and symbol offsets. llvm-svn: 107350
-
- Jun 29, 2010
-
-
Greg Clayton authored
Added the ability to dump any file in the global module cache using any of the "image dump" commands. This allows us to dump the .o files that are used with DWARF + .o since they don't belong the the target list for the current target. llvm-svn: 107100
-
- Jun 08, 2010
-
-
Chris Lattner authored
llvm-svn: 105619
-