summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
Commit message (Collapse)AuthorAgeFilesLines
...
* iOS simulator cleanup to make sure we use "*-apple-ios" for iOS simulator ↵Greg Clayton2014-05-292-47/+102
| | | | | | | | | | | | | | | | | | apps and binaries. Changes include: - ObjectFileMachO can now determine if a binary is "*-apple-ios" or "*-apple-macosx" by checking the min OS and SDK load commands - ArchSpec now says "<arch>-apple-macosx" is equivalent to "<arch>-apple-ios" since the simulator mixes and matches binaries (some from the system and most from the iOS SDK). - Getting process inforamtion on MacOSX now correctly classifies iOS simulator processes so they have "*-apple-ios" architectures in the ProcessInstanceInfo - PlatformiOSSimulator can now list iOS simulator processes correctly instead of showing nothing by using: (lldb) platform select ios-simulator (lldb) platform process list - debugserver can now properly return "*-apple-ios" for the triple in the process info packets for iOS simulator executables - GDBRemoteCommunicationClient now correctly passes along the triples it gets for process info by setting the OS in the llvm::Triple correctly <rdar://problem/17060217> llvm-svn: 209852
* ReExported symbols can point to a library that doesn't actuallyJim Ingham2014-05-212-0/+12
| | | | | | | | | contain the symbol, but just reexports wholesale from another library. Handle this case. <rdar://problem/16977589> llvm-svn: 209270
* When increasing the amount of a file read, read the total of the Mach-O headerJason Molenda2014-04-221-2/+3
| | | | | | | | plus the size of the load commands in case the LC_UUID load command comes near the end of the file. <rdar://problem/16599318> llvm-svn: 206865
* Remove useless declarationSylvestre Ledru2014-04-211-2/+0
| | | | llvm-svn: 206764
* sweep up -Wformat warnings from gccSaleem Abdulrasool2014-04-043-14/+18
| | | | | | | This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
* Workaround for collision between enum members in LLVM's MachO.h and system ↵Jim Ingham2014-04-022-5/+6
| | | | | | | | | | headers on Mac OS X (in particular mach/machine.h). <rdar://problem/16494607> llvm-svn: 205480
* sanitise sign comparisonsSaleem Abdulrasool2014-04-022-2/+2
| | | | | | | | This is a mechanical change addressing the various sign comparison warnings that are identified by both clang and gcc. This helps cleanup some of the warning spew that occurs during builds. llvm-svn: 205390
* lldb arm64 import.Jason Molenda2014-03-291-6/+151
| | | | | | | | | | | | | | | | These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
* <rdar://problem/14515139>Enrico Granata2014-03-251-1/+1
| | | | | | | Add a GetFoundationVersion() to AppleObjCRuntime This API is used to return and cache the major version of Foundation.framework, which is potentially a useful piece of data to key off of to enable or disable certain ObjC related behaviors (especially in data formatters) llvm-svn: 204756
* Improve Elf object file UUID calculation performance.Todd Fiala2014-03-252-26/+162
| | | | | | | | | | | This change makes significant improvements in the performance of calculating a UUID within ObjectFileELF, and handles both running processes and core files correctly. This does lazy evaluation of UUID generation and caches the result when calculated. Change by Piotr Rak. llvm-svn: 204749
* Make cmake build the new ObjectFileJIT.Greg Clayton2014-03-241-0/+1
| | | | llvm-svn: 204683
* JITed functions can now have debug info and be debugged with debug and ↵Greg Clayton2014-03-244-0/+525
| | | | | | | | | | | | | | | | | | | source info: (lldb) b puts (lldb) expr -g -i0 -- (int)puts("hello") First we will stop at the entry point of the expression before it runs, then we can step over a few times and hit the breakpoint in "puts", then we can continue and finishing stepping and fininsh the expression. Main features: - New ObjectFileJIT class that can be easily created for JIT functions - debug info can now be enabled when parsing expressions - source for any function that is run throught the JIT is now saved in LLDB process specific temp directory and cleaned up on exit - "expr -g --" allows you to single step through your expression function with source code <rdar://problem/16382881> llvm-svn: 204682
* Cleanup some dead assignements reported by scan-buildArnaud A. de Grandmaison2014-03-222-6/+3
| | | | | | No functionnal change. llvm-svn: 204545
* update for renaming in LLVMSaleem Abdulrasool2014-03-111-1/+1
| | | | llvm-svn: 203533
* Implement ObjectFilePECOFF::GetModuleSpecifications().Virgile Bello2014-03-092-50/+76
| | | | llvm-svn: 203383
* Implement ObjectFilePECOFF::SetLoadAddress().Virgile Bello2014-03-082-0/+46
| | | | llvm-svn: 203350
* Remove %zx in printf (only GCC supports it, not MSVC).Virgile Bello2014-03-081-1/+1
| | | | llvm-svn: 203349
* Verify we have a correct ELF or Mach core file before we return a valid ↵Greg Clayton2014-03-071-3/+2
| | | | | | instace of ProcessElfCore or ProcessMachCore respectively. llvm-svn: 203274
* Add support for JIT debugging on Linux using the GDB JIT interface. Patch ↵Andrew MacPherson2014-03-052-5/+263
| | | | | | written with Keno Fischer. llvm-svn: 202956
* remove dead code + simplify a littleSylvestre Ledru2014-02-211-4/+2
| | | | llvm-svn: 201865
* Modified ObjectFile::SetLoadAddress() to now be:Greg Clayton2014-02-074-36/+112
| | | | | | | | | | | | | | ObjectFile::SetLoadAddress (Target &target, lldb::addr_t value, bool value_is_offset); Now "value" is a slide if "value_is_offset" is true, and "value" is an image base address otherwise. All previous usage of this API was using slides. Updated the ObjectFileELF and ObjectFileMachO SetLoadAddress methods to do the right thing. Also updated the ObjectFileMachO::SetLoadAddress() function to not load __LINKEDIT when it isn't needed and to only load sections that belong to the executable object file. llvm-svn: 201003
* Implement ObjectFileMachO::SetLoadAddress().Greg Clayton2014-02-062-0/+59
| | | | llvm-svn: 200943
* Factor some methods that were in DynamicLoaderPOSIXDYLD.Steve Pucci2014-02-062-0/+36
| | | | | | | | | | | | | | | Move some code that was in DynamicLoaderPOSIXDLYD into the base class DynamicLoader. In the case of UpdateLoadedSections(), the test to see whether a file is loadable (its address is zero) is not generally applicable so that test is changed to a more universally applicable check for the SHF_ALLOC flag on the section. Also make it explicit that the reading of the module_id in DynamicLoaderPOSIXDYLD::GetThreadLocalData() is using a hardcoded size (of module_id) of 4, which might not be appropriate on big-endian 64-bit systems, leaving a FIXME comment in place. llvm-svn: 200939
* If a library has no N_FUN symbols we don't succeed in finding resolver ↵Greg Clayton2014-01-161-2/+2
| | | | | | | | symbols, now we do. <rdar://problem/15831334> llvm-svn: 199345
* Make sure we correctly merge all N_FUN symbols with non-stab entries even if ↵Greg Clayton2014-01-161-50/+82
| | | | | | | | there are multiple symbols with the same name. <rdar://problem/15831292> llvm-svn: 199344
* The actual indirect symbol is not the one at the address of the Trie entry ↵Jim Ingham2014-01-101-27/+42
| | | | | | marked with the EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER, it is given in the address in the “other” field in that entry. llvm-svn: 198967
* elf: Move elf note parsing to ObjectFileELF.cppEd Maste2013-12-022-25/+76
| | | | | | | | | Separate ELF note implementations were introduced for core files and GNU build-id. Move the more general one from elf-core to ObjectFileELF and use it for build-id as well. Review: http://llvm-reviews.chandlerc.com/D1902 llvm-svn: 196125
* Fix for PECOFF GetArchitectureColin Riley2013-11-221-1/+1
| | | | | | 0 as CPU subtype never matches anything (at least, it doesn't match x86_64 windows binaries, of which there are correct arch definitions for). It should be created with LLDB_INVALID_CPUTYPE. llvm-svn: 195435
* Added the ability to get the SDK path for a target using the platform ↵Greg Clayton2013-10-242-0/+132
| | | | | | | | plugins. If LLDB lives inside an Xcode.app bundle, it will select the SDK in the Xcode bundle, else it will use the currently selected Xcode. Also added the DWARFDataExtractor classes to the Xcode project file. llvm-svn: 193380
* <rdar://problem/14496092>Greg Clayton2013-10-211-35/+240
| | | | | | | | Fixed an issue with reexported symbols on MacOSX by adding support for symbols re-exporting symbols. There is now a new symbol type eSymbolTypeReExported which contains a new name for the re-exported symbol and the new shared library. These symbols are only used when a symbol is re-exported as a symbol under a different name. Modified the expression parser to be able to deal with finding the re-exported symbols and track down the actual symbol it refers to. llvm-svn: 193101
* <rdar://problem/15191078>Greg Clayton2013-10-111-1/+1
| | | | | | Fixed Module::ResolveSymbolContextForAddress() to be able to also look in the SymbolVendor's SymbolFile's ObjectFile for a more meaningful symbol when a symbol lookup finds a synthetic symbol from the main object file. This will help lookups on MacOSX as the main executable might be stripped, but the dSYM file always has a full symbol table. llvm-svn: 192510
* 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
OpenPOWER on IntegriCloud