summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
Commit message (Collapse)AuthorAgeFilesLines
...
* Target: silence a GCC warningSaleem Abdulrasool2014-07-231-1/+3
| | | | | | | | | GCC emits a warning: warning: enumeral and non-enumeral type in conditional expression [enabled by default] which does not seem to have a flag to control it. Simply add an explicit cast for the boolean value. llvm-svn: 213715
* Fix an issue where an entry point of 0x00 would cause LLDB to think that the ↵Deepak Panickal2014-07-221-1/+1
| | | | | | ELF is not executable without checking for ET_EXEC llvm-svn: 213644
* Dynamic loader for the Hexagon DSPDeepak Panickal2014-07-211-0/+3
| | | | llvm-svn: 213565
* Use PRIx64.Joerg Sonnenberger2014-07-181-1/+1
| | | | llvm-svn: 213366
* Fixed the objective C symbol parsing in ObjectFileMachO.Greg Clayton2014-07-171-6/+0
| | | | | | | | | | | | | This fixes all of the hidden ivar test cases and any case where we try to find the full definition of an objective C class. This also means hidden ivars show up again. <rdar://problem/15458957> llvm.org/pr20270 llvm.org/pr20269 llvm.org/pr20272 llvm-svn: 213328
* Add kalimba as a platform.Todd Fiala2014-07-161-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | This change comprises of additions and some minor changes in order that "kalimba" is listed as a supported platform and that debugging any kalimbas results in PlatformKalimba being associated with the target. The changes are as follows: * The PlatformKalimba implementation itself * A tweak to ArchSpec * .note parsing for Kalimba in ObjectFileELF.cpp * Plugin registration * Makefile additions Change by Matthew Gardiner Minor tweak for cmake and Xcode by Todd Fiala Tested: Ubuntu 14.04 x86_64, clang 3.5-built lldb, all tests pass. MacOSX 10.9.4, Xcode 6.0 Beta 1-built lldb, all tests pass. llvm-svn: 213158
* Allow generic ARM cores to match any more specific ARM architecture.Greg Clayton2014-07-121-2/+23
| | | | | | <rdar://problem/15932248> llvm-svn: 212863
* Modify ObjectFileELF::GetArchitecture() to avoid calling ↵Todd Fiala2014-07-111-2/+5
| | | | | | | | ParseSectionHeaders() when we have headers. Change by Matthew Gardiner. llvm-svn: 212825
* Prevent ObjectFileELF::GetSectionHeaderInfo() from reparsing section headers.Todd Fiala2014-07-111-4/+4
| | | | | | | | | | | | | If we have any section headers in the collection, we already parsed them. Therefore, don't reparse the section headers when the section_headers collection is not empty. See this thread for more details: http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140707/011721.html Change by Matthew Gardiner llvm-svn: 212822
* __arm64__ and __aarch64__ #ifdef adjustmentsTodd Fiala2014-07-091-4/+4
| | | | | | | | Change by Paul Osmialowski See http://reviews.llvm.org/D4379 for details. llvm-svn: 212583
* Fix typos.Bruce Mitchener2014-07-082-5/+5
| | | | llvm-svn: 212553
* Start converting usages of off_t to other types.Zachary Turner2014-07-022-4/+5
| | | | | | | | | | | | | | | | | | | | | | | off_t is a type which is used for file offsets. Even more specifically, it is only used by a limited number of C APIs that deal with files. Any usage of off_t where the variable is not intended to be used with one of these APIs is a bug, by definition. This patch corrects some easy mis-uses of off_t, generally by converting them to lldb::offset_t, but sometimes by using other types such as size_t, when appropriate. The use of off_t to represent these offsets has worked fine in practice on linux-y platforms, since we used _FILE_OFFSET_64 to guarantee that off_t was a uint64. On Windows, however, _FILE_OFFSET_64 is unrecognized, and off_t will always be 32-bit. So the usage of off_t on Windows actually leads to legitimate bugs. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D4358 llvm-svn: 212192
* Fix typos.Bruce Mitchener2014-07-012-16/+16
| | | | llvm-svn: 212132
* Fix ObjectFileELF to determine architectures independent of host.Todd Fiala2014-06-272-37/+303
| | | | | | | | | | | | | | | | | | Previously ObjectFileELF was simplifying and assuming the object file it was looking at was the same as the host architecture/triple. This would break attempts to run, say, lldb on MacOSX against lldb-gdbserver on Linux since the MacOSX lldb would say that the linux elf file was really an Apple MacOSX architecture. Chaos would ensue. This change allows the elf file to parse ELF notes for Linux, FreeBSD and NetBSD, and determine the OS appropriately from them. It also initializes the OS type from the ELF header OSABI if it is set (which it is for FreeBSD but not for Linux). Added a test with freebsd and linux images that verify that '(lldb) image list -t -A' prints out the expected architecture for each. llvm-svn: 211907
* Replace GCC-specific intrinsic with portable alternative.Zachary Turner2014-06-251-1/+5
| | | | | | | | | | | | | | | | Not all supported compilers have GCC intrinsics, so this patch uses the correct portable alternative. Additionally, this patch fixes an off-by-one error. __builtin_ffs returns the 1-based index of the least-significant 1-bit, but the function expects the base 2 logarithm of the number, which is equivalent to the 0-based index of the least-significant 1-bit. Reviewed by: Keno Fischer Differential Revision: http://reviews.llvm.org/D4284 llvm-svn: 211669
* Patch from Keno Fischer to enable JITLoaderGDB with mach-o file support.Greg Clayton2014-06-243-1/+6
| | | | | | The patch is as is with the functionality left disabled for apple vendors because of performance regressions. If this is enabled it ends up searching for symbols in all shared libraries that are loadeded. llvm-svn: 211638
* Correctly classify code sections as code sections by using the ↵Greg Clayton2014-06-161-113/+149
| | | | | | | | | | S_ATTR_PURE_INSTRUCTIONS and S_ATTR_SOME_INSTRUCTIONS section flags. Also correctly set the symbol type of symbols for S_REGULAR and other section types. <rdar://problem/16896734> llvm-svn: 211073
* Remove unused variablesSaleem Abdulrasool2014-06-131-1/+1
| | | | | | | | Address the 'variable set but not used' warning from GCC. In some cases a few additional calls were removed where there should be no visible side effects of the calls (i.e. should not effect any cached state). llvm-svn: 210879
* Added the ability to save core files:Greg Clayton2014-06-132-1/+419
| | | | | | | | | | | (lldb) file /bin/ls (lldb) b malloc (lldb) run (lldb) process save-core /tmp/ls.core Each ObjectFile plug-in now has the option to save core files by registering a new static callback. llvm-svn: 210864
* 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
OpenPOWER on IntegriCloud