summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
Commit message (Collapse)AuthorAgeFilesLines
...
* Made lldb_private::ArchSpec contain much more than just an architecture. ItGreg Clayton2011-02-154-34/+18
| | | | | | | | | | now, in addition to cpu type/subtype and architecture flavor, contains: - byte order (big endian, little endian) - address size in bytes - llvm::Triple for true target triple support and for more powerful plug-in selection. llvm-svn: 125602
* Moved FileSpec into the Host layer since it will vary from host to host.Greg Clayton2011-02-083-3/+3
| | | | | | We have a common unix implementation in lldb/source/Host/common/FileSpec.cpp. llvm-svn: 125078
* Remove bzero use and replace with memset (patch from Kirk Beitz).Greg Clayton2011-02-041-3/+3
| | | | llvm-svn: 124897
* Applied a fix to qualify "UUID" with the lldb_private namespace to fixGreg Clayton2011-02-042-2/+2
| | | | | | build issues on MinGW. llvm-svn: 124888
* Endian patch from Kirk Beitz that allows better cross platform building.Greg Clayton2011-02-011-7/+7
| | | | llvm-svn: 124643
* Enabled extra warnings and fixed a bunch of small issues.Greg Clayton2011-01-251-2/+2
| | | | llvm-svn: 124250
* Fixed ProcessGDBRemote to kill the process correctly when it is either runningGreg Clayton2011-01-251-0/+8
| | | | | | | | or stopped. Added support for sections to be able to state if they are encrypted or not. llvm-svn: 124171
* Test if an ELF object is executable by checking if an entry point is defined.Stephen Wilson2011-01-151-1/+1
| | | | | | | The previous check on header type ET_EXEC is not general enough. Position independent executables have type ET_DYN. llvm-svn: 123498
* Implement GetEntryPoint, GetImageInfoAddress and GetArchitecture for ↵Stephen Wilson2011-01-152-2/+85
| | | | | | ObjectFileELF. llvm-svn: 123496
* Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.Greg Clayton2011-01-082-14/+14
| | | | | | Thanks Bruce! llvm-svn: 123083
* Added the ability to dump sections to a certain depth (for when sectionsGreg Clayton2010-12-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Updated the lldb_private::Flags class to have better method names and madeGreg Clayton2010-10-271-1/+1
| | | | | | | | | | | | | | | | | 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
* Fixed an issue where we were resolving paths when we should have been.Greg Clayton2010-10-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So the issue here was that we have lldb_private::FileSpec that by default was always resolving a path when using the: FileSpec::FileSpec (const char *path); and in the: void FileSpec::SetFile(const char *pathname, bool resolve = true); This isn't what we want in many many cases. One example is you have "/tmp" on your file system which is really "/private/tmp". You compile code in that directory and end up with debug info that mentions "/tmp/file.c". Then you type: (lldb) breakpoint set --file file.c --line 5 If your current working directory is "/tmp", then "file.c" would be turned into "/private/tmp/file.c" which won't match anything in the debug info. Also, it should have been just a FileSpec with no directory and a filename of "file.c" which could (and should) potentially match any instances of "file.c" in the debug info. So I removed the constructor that just takes a path: FileSpec::FileSpec (const char *path); // REMOVED You must now use the other constructor that has a "bool resolve" parameter that you must always supply: FileSpec::FileSpec (const char *path, bool resolve); I also removed the default parameter to SetFile(): void FileSpec::SetFile(const char *pathname, bool resolve); And fixed all of the code to use the right settings. llvm-svn: 116944
* Fixed the Objective C method prototypes to be correct (the selectors weren'tGreg Clayton2010-10-121-5/+5
| | | | | | | | being chopped up correctly). The DWARF plug-in also keeps a map of the ObjC class names to selectors for easy parsing of all class selectors when we parse the class type. llvm-svn: 116290
* Fixed a typo from my previous "Added support for LC_LOAD_UPWARD_DYLIB in ↵Greg Clayton2010-10-091-1/+1
| | | | | | mach-o files". llvm-svn: 116132
* Added support for LC_LOAD_UPWARD_DYLIB in mach-o files.Greg Clayton2010-10-091-0/+1
| | | | llvm-svn: 116128
* Added mutex protection to the Symtab class.Greg Clayton2010-10-082-3/+6
| | | | | | | | Added a new SortOrder enumeration and hooked it up to the "image dump symtab" command so we can dump symbol tables in the original order, sorted by address, or sorted by name. llvm-svn: 116049
* Hooked up ability to look up data symbols so they show up in disassemblyGreg Clayton2010-10-081-2/+10
| | | | | | | | | | | | 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
* Fixed an issue with the mach-o file parser when parsing indirect symbol stubsGreg Clayton2010-10-061-2/+6
| | | | | | | where the symbol index was set to INDIRECT_SYMBOL_ABS and was causing an assertion to fire when we loaded older Mac OS X binaries. llvm-svn: 115729
* Fixed an issue I found in the mach-o symbol table parsing whereGreg Clayton2010-09-121-21/+33
| | | | | | | | | | | | | | we cached remapping information using the old nlist index to the new symbol index, yet we tried to lookup the symbol stubs that were for symbols that had been remapped by ID instead of using the new symbol index. This is now fixed and the mach-o symbol tables are fixed. Use the delta between two vector entries to determine the stride in case any padding is inserted by compilers for bsearch calls on symbol tables when finding symbols by their original ID. llvm-svn: 113719
* Remove the eSymbolTypeFunction, eSymbolTypeGlobal, and eSymbolTypeStatic.Greg Clayton2010-09-111-54/+79
| | | | | | | | | | | | | | | | | | | They will now be represented as: eSymbolTypeFunction: eSymbolTypeCode with IsDebug() == true eSymbolTypeGlobal: eSymbolTypeData with IsDebug() == true and IsExternal() == true eSymbolTypeStatic: eSymbolTypeData with IsDebug() == true and IsExternal() == false This simplifies the logic when dealing with symbols and allows for symbols to be coalesced into a single symbol most of the time. Enabled the minimal symbol table for mach-o again after working out all the kinks. We now get nice concise symbol tables and debugging with DWARF in the .o files with a debug map in the binary works well again. There were issues where the SymbolFileDWARFDebugMap symbol file parser was using symbol IDs and symbol indexes interchangeably. Now that all those issues are resolved debugging is working nicely. llvm-svn: 113678
* Always look up the symbols with FindSymbolByID since we are minimizing the ↵Jim Ingham2010-09-101-9/+1
| | | | | | symbol list. llvm-svn: 113655
* Disable minimized symbol tables for now as this was causing test suite failures.Greg Clayton2010-09-081-1/+1
| | | | llvm-svn: 113372
* Enable minimized symbol tables when parsing mach-o files. ThisGreg Clayton2010-09-081-4/+55
| | | | | | | | | | new change will omit unneeded symbol table entries and coalesce function entries (N_FUN stab entries) with their linker code symbol (N_SECT symbols) into only the function symbol to avoid duplicate symbol table entries. It will also coalesce N_STSYM and the data linker symbol into just one static data symbol. llvm-svn: 113363
* Added Symtab::FindSymbolByID() in preparation for enabling the minimalGreg Clayton2010-09-071-1/+11
| | | | | | | | | symbol tables. Minimal symbol tables enable us to merge two symbols, one debug symbol and one linker symbol, into a single symbol that can carry just as much information and will avoid duplicate symbols in the symbol table. llvm-svn: 113223
* Looks like this is how you identify executables in ELF.Jim Ingham2010-08-101-2/+1
| | | | llvm-svn: 110641
* Change Target & Process so they can really be initialized with an invalid ↵Jim Ingham2010-08-094-1/+20
| | | | | | | | | | | | architecture. Arrange that this then gets properly set on attach, or when a "file" is set. Add a completer for "process attach -n". Caveats: there isn't currently a way to handle multiple processes with the same name. That will have to wait on a way to pass annotations along with the completion strings. llvm-svn: 110624
* Modified both the ObjectFileMachO and ObjectFileELF to correctly set theGreg Clayton2010-07-212-19/+87
| | | | | | | | | | | | | 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
* Change over to using the definitions for mach-o types and defines to theGreg Clayton2010-07-212-120/+138
| | | | | | | | | | | defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO and ObjectContainerUniversalMachO to be able to be cross compiled in Linux. Also did some cleanup on the ASTType by renaming it to ClangASTType and renaming the header file. Moved a lot of "AST * + opaque clang type *" functionality from lldb_private::Type over into ClangASTType. llvm-svn: 109046
* Remove our local ELF definitions and rely on llvm/Support/ELF.h instead.Stephen Wilson2010-07-131-376/+0
| | | | llvm-svn: 108293
* Combine 32 and 64 bit ELF readers.Stephen Wilson2010-07-136-1716/+1203
| | | | | | | This patch provides a generic ELF reader plugin to handle both 32 and 64 bit formats. llvm-svn: 108292
* Merged Eli Friedman's linux build changes where he added Makefile files thatGreg Clayton2010-07-092-0/+28
| | | | | | | enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. llvm-svn: 108009
* 64 bit ELF support from Stephen Wilson.Greg Clayton2010-07-074-16/+1384
| | | | llvm-svn: 107817
* Switch over to using llvm's dwarf constants file.Jason Molenda2010-07-061-3/+3
| | | | llvm-svn: 107716
* Fixed debug map in executable + DWARF in .o debugging on Mac OS X.Greg Clayton2010-06-281-0/+14
| | | | | | | | | 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
* Remove Mac-specific includes.Eli Friedman2010-06-131-5/+0
| | | | llvm-svn: 105905
* Made lldb_private::ArchSpec more generic so that it can take a mach-o cpuGreg Clayton2010-06-112-34/+6
| | | | | | | | | | | | | | | | type and sub-type, or an ELF e_machine value. Also added a generic CPU type to the arch spec class so we can have a single arch definition that the LLDB core code can use. Previously a lot of places in the code were using the mach-o definitions from a macosx header file. Switches over to using "llvm/Support/MachO.h" for the llvm::MachO::XXX for the CPU types and sub types for mach-o ArchSpecs. Added "llvm/Support/ELF.h" so we can use the "llvm::ELF::XXX" defines for the ELF ArchSpecs. Got rid of all CPU_TYPE_ and CPU_SUBTYPE_ defines that were previously being used in LLDB. llvm-svn: 105806
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-085-0/+2808
llvm-svn: 105619
OpenPOWER on IntegriCloud