summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify indirect rld_map for mips (rework r192408).Ed Maste2013-10-112-4/+15
| | | | | | | | | Just pass a Target* into ObjectFileELF::GetImageInfoAddress so that it can do the extra dereference necessary on MIPS, instead of passing a flag back to the caller. Review: http://llvm-reviews.chandlerc.com/D1899 llvm-svn: 192469
* Support mips shared object debug infoEd Maste2013-10-112-3/+4
| | | | | | | | | | MIPS's .dyanamic section is read-only. Instead of using DT_DEBUG for the pointer to dyld information it uses a separate tag DT_MIPS_RLD_MAP which points to storage in the read-write .rld_map section, which in turn points to the dyld information. Review: http://llvm-reviews.chandlerc.com/D1890 llvm-svn: 192408
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-254-19/+19
| | | | llvm-svn: 191367
* Adds an option to resolve a symbol from an address that can be usedAshok Thirumurthi2013-09-242-0/+55
| | | | | | | | | | | | | | | | | to build out the symbol table as addresses are used, and implements the mechanism for ELF to add stripped symbols from eh_frame. Uses this mechanism to allow disassembly for addresses corresponding to stripped symbols for ELF, and provide hooks to implement this for PE COFF. Also removes eSymbolContextTailCall in favor of an option for ResolveSymbolContextForAddress for consistency with the documentation for eSymbolContextEverything. Essentially, this is just an option for interpreting the so_addr. llvm-svn: 191307
* Change ProcessMachCore to search for both a user-process dyld binaryJason Molenda2013-09-141-2/+2
| | | | | | | | | | | | | | | | and a mach kernel in all the pages of the core file. If it finds a user-process dyld binary, assume this is a user process that had a copy of the mach kernel in memory when it crashed (e.g. lldb doing kernel debugging) even though we found the kernel binary first. Also, change the error messages about sections extending past the end of the file to be warnings and make the messages sound less severe. Most user process core files have one section that isn't included in the file and there's no reason to worry people about that. <rdar://problem/14473235> llvm-svn: 190741
* Fixed a few typos.Ashok Thirumurthi2013-08-271-2/+2
| | | | llvm-svn: 189355
* Fix some names in the wake of my Mach-O changes to LLVM.Charles Davis2013-08-271-282/+277
| | | | llvm-svn: 189317
* Plugins/ObjectFile/PECOFF: Use enums from LLVM, and don't use Mach-O ↵Charles Davis2013-08-271-124/+22
| | | | | | | | | | definitions. Since I renamed most of the LLVM Mach-O enums in r189314, I had to go fix LLDB to use the new names. While I was here, I decided that a COFF plugin really shouldn't be using Mach-O enums. llvm-svn: 189316
* When ObjectFileMachO::GetModuleSpecifications is getting the ArchSpecJason Molenda2013-08-271-0/+5
| | | | | | | | | out of a binary, if the Mach-O binary is MH_PRELOAD ("standalone"), don't let the OS be set to "ios" or "macosx" - there will be no dynamic loader used when debugging this process. <rdar://problem/9956443> llvm-svn: 189305
* unused variable, typedef requires name warning cleanupMichael Sartain2013-08-261-1/+1
| | | | llvm-svn: 189231
* PECOFF: Add support for export table.Virgile Bello2013-08-252-0/+73
| | | | llvm-svn: 189192
* MingW compilation (windows). Includes various refactoring to improve ↵Virgile Bello2013-08-231-1/+1
| | | | | | portability. llvm-svn: 189107
* Round plt entsize to addralignMichael Sartain2013-08-221-2/+17
| | | | llvm-svn: 189066
* Follow-up to the checkin of r188532 -- make sure thatJason Molenda2013-08-171-0/+9
| | | | | | | we've read the ObjectFile's Symtab before we change the File addresses in the Sections. llvm-svn: 188604
* Add a new Section::SetFileAddress method to change a Section's fileJason Molenda2013-08-161-10/+24
| | | | | | | | | | | | | | | | | | | | | address. When loading a dSYM, and the file addresses of the dSYM Sections are different than the executable binary Sections' file addresses, the debug info won't be remapped to the actual load addresses correctly. This only happens with binaries on the in-memory shared cache binaries where their File addresses have been set to their actual load address (outside an offset value) whereas the original executable and dSYM have 0-based File addresses. I think this patch will not be activated for other cases -- this is the only case we know of where the dSYM and the executable's File addresses differ -- but if this causes other problems we can restrict it more carefully. <rdar://problem/12335086> llvm-svn: 188532
* <rdar://problem/14717184>Greg Clayton2013-08-131-1/+11
| | | | | | Improve the documentation for the new target.memory-module-load-level setting, and also return an error when there is no nlist data when appropriate. llvm-svn: 188317
* <rdar://problem/14717184>Greg Clayton2013-08-131-639/+648
| | | | | | | | | | | | LLDB needs in memory module load level settings to control how much information is read from memory when loading in memory modules. This change adds a new setting: (lldb) settings set target.memory-module-load-level [minimal|partial|complete] minimal will load only sections (no symbols, or function bounds via function starts or EH frame) partial will load sections + bounds complete will load sections + bounds + symbols llvm-svn: 188246
* Fix the lldb build after the removal of mblaze.Rafael Espindola2013-07-251-2/+0
| | | | llvm-svn: 187151
* simple plugin now works with Linux fix assert in SetPluginInfo implement ↵Michael Sartain2013-07-171-1/+2
| | | | | | | | Linux ePathTypeLLDBSystemPlugins and ePathTypeLLDBUserPlugins implement Linux Host::Backtrace and Host::GetEnvironment add .gnu_debugdata comment Differential Revision: http://llvm-reviews.chandlerc.com/D1159 llvm-svn: 186475
* Fixed GetModuleSpecifications() to work better overall:Greg Clayton2013-07-121-1/+2
| | | | | | | | | | | - MachO files now correctly extract the UUID all the time - More file size and offset verification done for universal mach-o files to watch for truncated files - ObjectContainerBSDArchive now supports enumerating all objects in BSD archives (.a files) - lldb_private::Module() can not be properly constructed using a ModuleSpec for a .o file in a .a file - The BSD archive plug-in shares its cache for GetModuleSpecifications() and the create callback - Improved printing for ModuleSpec objects llvm-svn: 186211
* Adds methods to ObjectFileELF to access data in ELF segmentsAshok Thirumurthi2013-07-112-1/+40
| | | | | | | | in preparation to add support for ELF core files. Patch by Samuel Jacob! llvm-svn: 186114
* Cleanup on the unified section list changes. Main changes are:Greg Clayton2013-07-106-685/+667
| | | | | | | | | | | | | | | - 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) llvm-svn: 185990
* Fix ObjectFileELF crc32 code used when no build id is present.Michael Sartain2013-07-031-67/+86
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1081 llvm-svn: 185494
* Split symbol support for ELF and Linux.Michael Sartain2013-07-016-190/+428
| | | | llvm-svn: 185366
* A collection of 3 patches to the COFF file ObjectFile parser from Virgile Bello:Greg Clayton2013-06-181-5/+40
| | | | | | | | | 3 patches, aiming to improve PE/COFF support: - First patch fix symbol reading (invalid header size from sizeof() == 20 != 18, and various bugfixes such as invalid skipping of auxiliary symbols, 4 bytes shift from beginning, etc...). - Second patch add image_base to section vmaddr offset so that VM addr is in image_base space. - Third patch add support for DWARF section in PECOFF (taken from ELF counterpart), since they are generated by gcc/clang under windows. llvm-svn: 184153
* <rdar://problem/13941992>Greg Clayton2013-06-041-5/+7
| | | | | | Accept mach-o files with bad segments. Many core files are not created correctly and we should still be able to glean any information we can from them. llvm-svn: 183247
* Fix various build warnings.Matt Kopec2013-06-031-1/+1
| | | | llvm-svn: 183140
* Adds PT_TLS and PT_GNU_EH_FRAME names to DumpELFProgramHeadersFilipe Cabecinhas2013-05-231-10/+12
| | | | llvm-svn: 182619
* ObjectFileELF::GetModuleSpecifications on Linux should work now.Michael Sartain2013-05-233-12/+78
| | | | | | | Which means "platform process list" should work and list the architecture. We are now parsing the elf build-id if it exists, which should allow us to load stripped symbols (looking at that next). llvm-svn: 182610
* Comment out ObjectFileELF::GetModuleSpecifications() function until I can ↵Michael Sartain2013-05-171-1/+5
| | | | | | debug where it's causing tests to fail. llvm-svn: 182069
* Implement ObjectFileELF::GetModuleSpecifications(), and add PlatformLinux ↵Michael Sartain2013-05-172-1/+45
| | | | | | | code to deal with unknown arch properties. CR: Greg Clayton llvm-svn: 182065
* Fix ObjectFileELF to not use the file_offset twice.Filipe Cabecinhas2013-05-161-1/+1
| | | | llvm-svn: 182061
* <rdar://problem/13128331>Greg Clayton2013-05-151-24/+21
| | | | | | | | Fixed "target symbols add" to correctly extract all module specifications from a dSYM file that is supplied and match the symbol file to a current target module using the UUID values if they are available. This fixes the case where you add a dSYM file (like "foo.dSYM") which is for a renamed executable (like "bar"). In our case it was "mach_kernel.dSYM" which didn't match "mach_kernel.sys". llvm-svn: 181916
* <rdar://problem/13748253>Greg Clayton2013-05-141-91/+141
| | | | | | Combine N_GSYM stab entries with their non-stab counterpart (data symbols) to make the symbol table smaller with less duplicate named symbols. llvm-svn: 181841
* A few more small tweaks to arm core file handling.Jason Molenda2013-05-141-7/+20
| | | | | | | | | | | | Most importantly, have DoReadGPR/DoReadFPU/DoReadEXC return -1 to indicate failure if they're called. Else these could override the Error setting for the relevant thread state -- if the core file didn't include a floating point thread state, for instance, these functions would clear the Error setting for that register set and lldb would display random bytes as those registers' contents. <rdar://problem/13665075> llvm-svn: 181757
* Small change to the previous checkin, read in the fpu register contextJason Molenda2013-05-141-4/+10
| | | | | | | in one large block - and be sure toget the fpscr value as well when processing a core file. llvm-svn: 181756
* Fixes to read the floating point and exception registers sets outJason Molenda2013-05-141-18/+36
| | | | | | | of arm Mach-O core files. <rdar://problem/13665075> llvm-svn: 181755
* <rdar://problem/13854277>Greg Clayton2013-05-106-42/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <rdar://problem/13594769> Main changes in this patch include: - cleanup plug-in interface and use ConstStrings for plug-in names - Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp - Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging The plug-in interface changes: Modified the lldb_private::PluginInterface class that all plug-ins inherit from: Changed: virtual const char * GetPluginName() = 0; To: virtual ConstString GetPluginName() = 0; Removed: virtual const char * GetShortPluginName() = 0; - Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names. - Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc. llvm-svn: 181631
* Cleanup logging to use the new "std::string FileSpec::GetPath()" function. ↵Greg Clayton2013-04-291-6/+4
| | | | | | | | | | | Also added a similar function for modules: std::string Module::GetSpecificationDescription () const; This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it. llvm-svn: 180717
* Added the ability to extract a ModuleSpecList (a new class) from an ↵Greg Clayton2013-04-246-37/+209
| | | | | | | | | | | | | | | | | ObjectFile. This is designed to be used when you have an object file that contains one or more architectures (MacOSX universal (fat) files) and/or one or more objects (BSD archive (.a files)). There is a new static ObjectFile function you can call: size_t ObjectFile::GetModuleSpecifications (const FileSpec &file, lldb::offset_t file_offset, ModuleSpecList &specs) This will fill in "specs" which the details of all the module specs (file + arch + UUID (if there is one) + object name (for BSD archive objects eventually) + file offset to the object in question). This helps us when a user specifies a file that contains a single architecture, and also helps us when we are given a debug symbol file (like a dSYM file on MacOSX) that contains one or more architectures and we need to be able to match it up to an existing Module that has no debug info. llvm-svn: 180224
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-184-5/+5
| | | | | | the macros and just use C++11. llvm-svn: 179805
* Since we use C++11, we should switch over to using std::unique_ptr when ↵Greg Clayton2013-04-184-5/+5
| | | | | | | | C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
* Fix build on LinuxDaniel Malea2013-04-171-0/+4
| | | | | | | - add a workaround header to define uuid_t on platforms that need it - unbreak remote debugging of mac os x apps llvm-svn: 179710
* Revert 179694 -- it breaks remote debugging of mac os x targets for some folkDaniel Malea2013-04-171-3/+1
| | | | | | - will commit a different workaround momentarily llvm-svn: 179705
* Fix Linux build of LLDBDaniel Malea2013-04-171-1/+3
| | | | | | | - conditionally build mac-specific plugins only on mac (PluginObjectFileMachO, PluginDynamicLoaderDrawinKernel and PluginDynamicLoaderMacOSXDYLD) - clean up warnings by ignoring deprecated declarations (auto_ptr for example) llvm-svn: 179694
* Fix a pointer arithmetic thinko in ObjectFileMachO::GetLLDBSharedCacheUUID().Jason Molenda2013-04-161-1/+1
| | | | llvm-svn: 179643
* Add warning messages for the cases where the inferior process shared cacheJason Molenda2013-04-161-5/+10
| | | | | | | | | differs from lldb's own shared cache, and where the inferior process shared cache does not match up with the on-disk shared cache file. Simplify the code where lldb gets its own shared cache uuid a little bit. llvm-svn: 179633
* <rdar://problem/13468295>Greg Clayton2013-04-161-13/+24
| | | | | | Show an error message when we have a corrupt mach-o file where the LC_SEGMENT or LC_SEGMENT_64 load command have file offsets or file offsets + sizes that extend beyond the end of the file. llvm-svn: 179605
* The dyld_all_image_infos structure, at version 13 and higher, hasJason Molenda2013-04-162-13/+127
| | | | | | | | | | | | a UUID for the shared cache libraries that can be used to confirm that one process' shared cache is the same as another, or that a process' in-memory shared cache is a match for a given on-disk dyld_shared_cache binary file. Use these UUIDs to catch some uncommon problems when the shared caches are being changed for debug purposes. <rdar://problem/13524467> llvm-svn: 179583
* Fix some minor code indentation mistakes in ObjectFileMachO.Jason Molenda2013-04-161-39/+39
| | | | | | No code changes in this checkin, only whitespace. llvm-svn: 179579
OpenPOWER on IntegriCloud