summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
Commit message (Collapse)AuthorAgeFilesLines
...
* LLDB now has "Platform" plug-ins. Platform plug-ins are plug-ins that provideGreg Clayton2011-03-088-119/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an interface to a local or remote debugging platform. By default each host OS that supports LLDB should be registering a "default" platform that will be used unless a new platform is selected. Platforms are responsible for things such as: - getting process information by name or by processs ID - finding platform files. This is useful for remote debugging where there is an SDK with files that might already or need to be cached for debug access. - getting a list of platform supported architectures in the exact order they should be selected. This helps the native x86 platform on MacOSX select the correct x86_64/i386 slice from universal binaries. - Connect to remote platforms for remote debugging - Resolving an executable including finding an executable inside platform specific bundles (macosx uses .app bundles that contain files) and also selecting the appropriate slice of universal files for a given platform. So by default there is always a local platform, but remote platforms can be connected to. I will soon be adding a new "platform" command that will support the following commands: (lldb) platform connect --name machine1 macosx connect://host:port Connected to "machine1" platform. (lldb) platform disconnect macosx This allows LLDB to be well setup to do remote debugging and also once connected process listing and finding for things like: (lldb) process attach --name x<TAB> The currently selected platform plug-in can now auto complete any available processes that start with "x". The responsibilities for the platform plug-in will soon grow and expand. llvm-svn: 127286
* Reverting the part of the debug-in-ofile patch from earlier today that ↵Jim Ingham2011-03-081-1/+1
| | | | | | removes them from the shared module list. That was causing a bunch of asserts. Greg is working on a better fix. llvm-svn: 127201
* Don't cache .o files in the debug map + DWARF in .o files. If we cache themGreg Clayton2011-03-071-2/+15
| | | | | | | then we end up using older .o files with out of date section remappings if we debug, compile + fix, and debug again. llvm-svn: 127166
* Clean up a bit of the type getting code where lldb_private:Type now hasGreg Clayton2011-02-161-5/+6
| | | | | | | | | | | | | | clang_type_t GetClangFullType(); // Get a completely defined clang type clang_type_t GetClangLayoutType(); // Get a clang type that can be used for type layout clang_type_t GetClangForwardType(); // A type that can be completed if needed, but is more efficient. llvm-svn: 125691
* All UnwindPlan objects are now passed around as shared pointers.Greg Clayton2011-02-153-14/+25
| | | | | | | | | | | | | ArchDefaultUnwindPlan plug-in interfaces are now cached per architecture instead of being leaked for every frame. Split the ArchDefaultUnwindPlan_x86 into ArchDefaultUnwindPlan_x86_64 and ArchDefaultUnwindPlan_i386 interfaces. There were sporadic crashes that were due to something leaking or being destroyed when doing stack crawls. This patch should clear up these issues. llvm-svn: 125541
* Modified version of a patch from Warren Paul that takes care of issues withGreg Clayton2011-02-092-87/+69
| | | | | | | indirect forms, deals with empty DW_AT_comp_dir attributes, and fixups for handling other signed integer types. llvm-svn: 125240
* Added the DWARF unique type map such that we only create a type once in theGreg Clayton2011-02-092-129/+117
| | | | | | | | | | | | | | | | | module's AST context. Prior to this fix, with gcc binaries, we end up with a full class definition for any used classes in each compile unit due to the one definition rule. This would result in us making N copies of class T, where N is the number of compile units that use class T, in the module AST. When an expression would then try and use any types that were duplicated, it would quickly confuse clang and make expression evaluation fail due to all of the duplicate types that got copied over. This is now fixed by making a map of types in the DWARF that maps type names to a collection of types + declaration (file + line number) + DIE. Then later when we find a type we look in this module map and find any already cached types that we can just use. 8935777 llvm-svn: 125207
* Fixed a crasher that could happen when trying to look at N_GSYM entriesGreg Clayton2011-02-081-1/+1
| | | | | | | | | | in the DWARF + debug map symbol file parser. Also cleaned up the "image lookup --address ADDR" output when we it results in something that is in an inlined function. Now we correctly dump out the full inlined call stack. llvm-svn: 125072
* Header patch, virtual dtor patch and missed UUID patch from Kirk Beitz.Greg Clayton2011-02-051-1/+1
| | | | llvm-svn: 124931
* Applied a fix to qualify "UUID" with the lldb_private namespace to fixGreg Clayton2011-02-041-1/+1
| | | | | | build issues on MinGW. llvm-svn: 124888
* Modified the PluginManager to be ready for loading plug-ins from a systemGreg Clayton2011-02-024-86/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLDB plugin directory and a user LLDB plugin directory. We currently still need to work out at what layer the plug-ins will be, but at least we are prepared for plug-ins. Plug-ins will attempt to be loaded from the "/Developer/Library/PrivateFrameworks/LLDB.framework/Resources/Plugins" folder, and from the "~/Library/Application Support/LLDB/Plugins" folder on MacOSX. Each plugin will be scanned for: extern "C" bool LLDBPluginInitialize(void); extern "C" void LLDBPluginTerminate(void); If at least LLDBPluginInitialize is found, the plug-in will be loaded. The LLDBPluginInitialize function returns a bool that indicates if the plug-in should stay loaded or not (plug-ins might check the current OS, current hardware, or anything else and determine they don't want to run on the current host). The plug-in is uniqued by path and added to a static loaded plug-in map. The plug-in scanning happens during "lldb_private::Initialize()" which calls to the PluginManager::Initialize() function. Likewise with termination lldb_private::Terminate() calls PluginManager::Terminate(). The paths for the plug-in directories is fetched through new Host calls: bool Host::GetLLDBPath (ePathTypeLLDBSystemPlugins, dir_spec); bool Host::GetLLDBPath (ePathTypeLLDBUserPlugins, dir_spec); This way linux and other systems can define their own appropriate locations for plug-ins to be loaded. To allow dynamic shared library loading, the Host layer has also been modified to include shared library open, close and get symbol: static void * Host::DynamicLibraryOpen (const FileSpec &file_spec, Error &error); static Error Host::DynamicLibraryClose (void *dynamic_library_handle); static void * Host::DynamicLibraryGetSymbol (void *dynamic_library_handle, const char *symbol_name, Error &error); lldb_private::FileSpec also has been modified to support directory enumeration in an attempt to abstract the directory enumeration into one spot in the code. The directory enumertion function is static and takes a callback: typedef enum EnumerateDirectoryResult { eEnumerateDirectoryResultNext, // Enumerate next entry in the current directory eEnumerateDirectoryResultEnter, // Recurse into the current entry if it is a directory or symlink, or next if not eEnumerateDirectoryResultExit, // Exit from the current directory at the current level. eEnumerateDirectoryResultQuit // Stop directory enumerations at any level }; typedef FileSpec::EnumerateDirectoryResult (*EnumerateDirectoryCallbackType) (void *baton, FileSpec::FileType file_type, const FileSpec &spec); static FileSpec::EnumerateDirectoryResult FileSpec::EnumerateDirectory (const char *dir_path, bool find_directories, bool find_files, bool find_other, EnumerateDirectoryCallbackType callback, void *callback_baton); This allow clients to specify the directory to search, and specifies if only files, directories or other (pipe, symlink, fifo, etc) files will cause the callback to be called. The callback also gets to return with the action that should be performed after this directory entry. eEnumerateDirectoryResultNext specifies to continue enumerating through a directory with the next entry. eEnumerateDirectoryResultEnter specifies to recurse down into a directory entry, or if the file is not a directory or symlink/alias to a directory, then just iterate to the next entry. eEnumerateDirectoryResultExit specifies to exit the current directory and skip any entries that might be remaining, yet continue enumerating to the next entry in the parent directory. And finally eEnumerateDirectoryResultQuit means to abort all directory enumerations at all levels. Modified the Declaration class to not include column information currently since we don't have any compilers that currently support column based declaration information. Columns support can be re-enabled with the additions of a #define. Added the ability to find an EmulateInstruction plug-in given a target triple and optional plug-in name in the plug-in manager. Fixed a few cases where opendir/readdir was being used, but yet not closedir was being used. Soon these will be deprecated in favor of the new directory enumeration call that was added to the FileSpec class. llvm-svn: 124716
* Changed the SymbolFile::FindFunction() function calls to only return Greg Clayton2011-01-272-31/+31
| | | | | | | | | | | | | | | | | | lldb_private::Function objects. Previously the SymbolFileSymtab subclass would return lldb_private::Symbol objects when it was asked to find functions. The Module::FindFunctions (...) now take a boolean "bool include_symbols" so that the module can track down functions and symbols, yet functions are found by the SymbolFile plug-ins (through the SymbolVendor class), and symbols are gotten through the ObjectFile plug-ins. Fixed and issue where the DWARF parser might run into incomplete class member function defintions which would make clang mad when we tried to make certain member functions with invalid number of parameters (such as an operator= operator that had no parameters). Now we just avoid and don't complete these incomplete functions. llvm-svn: 124359
* Enabled extra warnings and fixed a bunch of small issues.Greg Clayton2011-01-252-11/+9
| | | | llvm-svn: 124250
* Fixed an issue that was stopping LLDB from finding complete definitions forGreg Clayton2011-01-251-7/+18
| | | | | | | | | | | | types. What was happening was the DWARF parser was almost ignoring definitions (DIEs with the DW_AT_declaration set to 1). It wasn't ignoring declarations that had _some_ children. When this happened, we would treat the declaration as a complete type. Often we would have a declaration of a type with just some enum definitions inside and nothing else. Now we correctly ignore these definitions, and also I added some changes to allow us to figure out what decl context these special declarations actually point to. llvm-svn: 124179
* Fixed a crasher that would happen when we run into malformed DWARF. It isGreg Clayton2011-01-231-1/+12
| | | | | | nice to know about the issue, but we shouldn't crash. llvm-svn: 124050
* Made the DWARF + debug map symbol file parser be much more efficient when it ↵Greg Clayton2011-01-201-6/+17
| | | | | | | | | | isn't going to actually be used as the symbol file plug-in by looking only for suitable N_OSO symbols and avoiding sorting function (N_FUN) and global/static (N_GSYM/N_STSYM) symbols when there are no suitable N_OSO objects. llvm-svn: 123889
* A few of the issue I have been trying to track down and fix have been due toGreg Clayton2011-01-174-35/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the way LLDB lazily gets complete definitions for types within the debug info. When we run across a class/struct/union definition in the DWARF, we will only parse the full definition if we need to. This works fine for top level types that are assigned directly to variables and arguments, but when we have a variable with a class, lets say "A" for this example, that has a member: "B *m_b". Initially we don't need to hunt down a definition for this class unless we are ever asked to do something with it ("expr m_b->getDecl()" for example). With my previous approach to lazy type completion, we would be able to take a "A *a" and get a complete type for it, but we wouldn't be able to then do an "a->m_b->getDecl()" unless we always expanded all types within a class prior to handing out the type. Expanding everything is very costly and it would be great if there were a better way. A few months ago I worked with the llvm/clang folks to have the ExternalASTSource class be able to complete classes if there weren't completed yet: class ExternalASTSource { .... virtual void CompleteType (clang::TagDecl *Tag); virtual void CompleteType (clang::ObjCInterfaceDecl *Class); }; This was great, because we can now have the class that is producing the AST (SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources and the object that creates the forward declaration types can now also complete them anywhere within the clang type system. This patch makes a few major changes: - lldb_private::Module classes now own the AST context. Previously the TypeList objects did. - The DWARF parsers now sign up as an external AST sources so they can complete types. - All of the pure clang type system wrapper code we have in LLDB (ClangASTContext, ClangASTType, and more) can now be iterating through children of any type, and if a class/union/struct type (clang::RecordType or ObjC interface) is found that is incomplete, we can ask the AST to get the definition. - The SymbolFileDWARFDebugMap class now will create and use a single AST that all child SymbolFileDWARF classes will share (much like what happens when we have a complete linked DWARF for an executable). We will need to modify some of the ClangUserExpression code to take more advantage of this completion ability in the near future. Meanwhile we should be better off now that we can be accessing any children of variables through pointers and always be able to resolve the clang type if needed. llvm-svn: 123613
* Fixed an error in the type map for "char **" that was a bad memory smasher.Greg Clayton2011-01-141-28/+89
| | | | | | | | | | | | | | | | | | | | | | | | | Anytime we had a valid python list that was trying to go from Python down into our C++ API, it was allocating too little memory and it ended up smashing whatever was next to the allocated memory. Added typemap conversions for "void *, size_t" so we can get SBProcess::ReadMemory() working. Also added a typemap for "const void *, size_t" so we can get SBProcess::WriteMemory() to work. Fixed an issue in the DWARF parser where we weren't correctly calculating the DeclContext for all types and classes. We now should be a lot more accurate. Fixes include: enums should now be setting their parent decl context correctly. We saw a lot of examples where enums in classes were not being properly namespace scoped. Also, classes within classes now get properly scoped. Fixed the objective C runtime pointer checkers to let "nil" pointers through since these are accepted by compiled code. We also now don't call "abort()" when a pointer doesn't validate correctly since this was wreaking havoc on the process due to the way abort() works. We now just dereference memory which should give us an exception from which we can easily and reliably recover. llvm-svn: 123428
* Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.Greg Clayton2011-01-087-14/+14
| | | | | | Thanks Bruce! llvm-svn: 123083
* Fixed a crasher in the DWARF log channel code.Greg Clayton2010-12-141-0/+3
| | | | llvm-svn: 121810
* Fixed an issue when debugging with DWARF in the .o files whereGreg Clayton2010-12-071-4/+4
| | | | | | | | | | | | 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
* Fixes to make id work as well as well as fix minor errorsSean Callanan2010-12-061-1/+1
| | | | | | when calling built-ins. llvm-svn: 121070
* Fixed a bug in which the SEL type was being resolvedSean Callanan2010-12-061-1/+1
| | | | | | | | wrongly as the target of a pointer rather than the SEL pointer itself. This caused incorrect behavior when dealing with Objective-C selector variables. llvm-svn: 121048
* Make sure to index the DWARF if we already haven't so we can resolve forwardGreg Clayton2010-12-031-0/+3
| | | | | | declarations when they haven't been found yet. llvm-svn: 120840
* Fixed an issue that would cause an assertion to fire when an inlined ↵Greg Clayton2010-12-031-9/+41
| | | | | | function was found during a regex function find call. llvm-svn: 120814
* When we resolve a forward declaration type, be sure to put it into the ↵Greg Clayton2010-11-201-0/+6
| | | | | | m_die_to_type map so we don't assert later when someone tries to resolve the type. llvm-svn: 119910
* Change the DWARFExpression::Evaluate methods to take an optionalJason Molenda2010-11-201-0/+1
| | | | | | | | | | | | | | RegisterContext* - normally this is retrieved from the ExecutionContext's StackFrame but when we need to evaluate an expression while creating the stack frame list this can be a little tricky. Add DW_OP_deref_size, needed for the _sigtramp FDE expression. Add support for processing DWARF expressions in RegisterContextLLDB. Update callers to DWARFExpression::Evaluate. llvm-svn: 119885
* Use different qualifier enums on the request of a clang engineer.Greg Clayton2010-11-161-2/+2
| | | | llvm-svn: 119396
* First attempt and getting "const" C++ method function signatures correct.Greg Clayton2010-11-162-5/+45
| | | | | | | It currently isn't working, but it should be close. I will work on this more when I figure out what I am not doing correctly. llvm-svn: 119324
* Just like functions can have a basename and a mangled/demangled name, variableGreg Clayton2010-11-142-29/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | can too. So now the lldb_private::Variable class has support for this. Variables now have support for having a basename ("i"), and a mangled name ("_ZN12_GLOBAL__N_11iE"), and a demangled name ("(anonymous namespace)::i"). Nowwhen searching for a variable by name, users might enter the fully qualified name, or just the basename. So new test functions were added to the Variable and Mangled classes as: bool NameMatches (const ConstString &name); bool NameMatches (const RegularExpression &regex); I also modified "ClangExpressionDeclMap::FindVariableInScope" to also search for global variables that are not in the current file scope by first starting with the current module, then moving on to all modules. Fixed an issue in the DWARF parser that could cause a varaible to get parsed more than once. Now, once we have parsed a VariableSP for a DIE, we cache the result even if a variable wasn't made so we don't do any re-parsing. Some DW_TAG_variable DIEs don't have locations, or are missing vital info that stops a debugger from being able to display anything for it, we parse a NULL variable shared pointer for these DIEs so we don't keep trying to reparse it. llvm-svn: 119085
* Fixed a crasher (an assert was firing in the DWARF parser) when settingGreg Clayton2010-11-141-11/+45
| | | | | | | | | | | breakpoints on inlined functions by name. This involved fixing the DWARF parser to correctly back up and parse the concrete function when we find inlined functions by name, then grabbing any appropriate inlined blocks and returning symbol contexts with the block filled in. After this was fixed, the breakpoint by name resolver needed to correctly deal with symbol contexts that had the inlined block filled in in the symbol contexts. llvm-svn: 119017
* Fixed an issue where we might not find global variables by name when we haveGreg Clayton2010-11-132-20/+91
| | | | | | | | | | | | | | | a debug map with DWARF in the .o files due to the attemted shortcut that was being taken where the global variables were being searched for by looking in the symbol table. The problem with the symbols in the symbol table is we don't break apart the symbol names for symbols when they are mangled into basename and the fully mangled name since this would take a lot of CPU time to chop up the mangled names and try and find the basenames. The DWARF info typically has this broken up for us where the basename of the variable is in a the DW_AT_name attribute, and the mangled name is in the DW_AT_MIPS_linkage_name attribute. Now we correctly find globals by searching all OSO's for the information so we can take advantage of this split information. llvm-svn: 119012
* Modified the lldb_private::Type clang type resolving code to handle threeGreg Clayton2010-11-136-91/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | cases when getting the clang type: - need only a forward declaration - need a clang type that can be used for layout (members and args/return types) - need a full clang type This allows us to partially parse the clang types and be as lazy as possible. The first case is when we just need to declare a type and we will complete it later. The forward declaration happens only for class/union/structs and enums. The layout type allows us to resolve the full clang type _except_ if we have any modifiers on a pointer or reference (both R and L value). In this case when we are adding members or function args or return types, we only need to know how the type will be laid out and we can defer completing the pointee type until we later need it. The last type means we need a full definition for the clang type. Did some renaming of some enumerations to get rid of the old "DC" prefix (which stands for DebugCore which is no longer around). Modified the clang namespace support to be almost ready to be fed to the expression parser. I made a new ClangNamespaceDecl class that can carry around the AST and the namespace decl so we can copy it into the expression AST. I modified the symbol vendor and symbol file plug-ins to use this new class. llvm-svn: 118976
* Disable the debug logging I accidentally left enabled.Greg Clayton2010-11-111-1/+1
| | | | llvm-svn: 118758
* Added initial support to the lldb_private::SymbolFile for findingGreg Clayton2010-11-106-111/+207
| | | | | | | | | | | | | | | namespaces by name given an optional symbol context. I might end up dressing up the "clang::NamespaceDecl" into a lldb_private::Namespace class if we need to do more than is currenlty required of namespaces. Currently we only need to be able to lookup a namespace by name when parsing expressions, so I kept it simple for now. The idea here is even though we are passing around a "clang::NamespaceDecl *", that we always have it be an opaque pointer (it is forward declared inside of "lldb/Core/ClangForward.h") and we only use clang::NamespaceDecl implementations inside of ClangASTContext, or ClangASTType when we need to extract information from the namespace decl object. llvm-svn: 118737
* Modified lldb_private::SymboleFile to be able to override where its TypeListGreg Clayton2010-11-104-79/+193
| | | | | | | | | | | | | | | | | | | | | | | | | comes from by using a virtual function to provide it from the Module's SymbolVendor by default. This allows the DWARF parser, when being used to parse DWARF in .o files with a parent DWARF + debug map parser, to get its type list from the DWARF + debug map parser so when we go and find full definitions for types (that might come from other .o files), we can use the type list from the debug map parser. Otherwise we ended up mixing clang types from one .o file (say a const pointer to a forward declaration "class A") with the a full type from another .o file. This causes expression parsing, when copying the clang types from those parsed by the DWARF parser into the expression AST, to fail -- for good reason. Now all types are created in the same list. Also added host support for crash description strings that can be set before doing a piece of work. On MacOSX, this ties in with CrashReporter support that allows a string to be dispalyed when the app crashes and allows LLDB.framework to print a description string in the crash log. Right now this is hookup up the the CommandInterpreter::HandleCommand() where each command notes that it is about to be executed, so if we crash while trying to do this command, we should be able to see the command that caused LLDB to exit. For all other platforms, this is a nop. llvm-svn: 118672
* Did a lot of code cleanup.Greg Clayton2010-11-099-187/+77
| | | | | | | | Fixed the DWARF plug-in such that when it gets all attributes for a DIE, that it omits the DW_AT_sibling and DW_AT_declaration when getting attributes from a DW_AT_abstract_origin or DW_AT_specification DIE. llvm-svn: 118654
* Fixed an issue in the DWARF parser that was causing forward declarationsGreg Clayton2010-11-091-21/+21
| | | | | | | | | | | | to not get resolved. Fixed the "void **isa_ptr" variable inside the objective C verifier to start with a '$' character so we don't go looking for it in our program. Moved the lookup for "$__lldb_class" into the part that knows we are looking for internal types that start with a '$'. llvm-svn: 118488
* Minor comment fix.Johnny Chen2010-11-081-1/+1
| | | | llvm-svn: 118450
* Fixed some type parsing that was causing types to thing they were forwardGreg Clayton2010-11-081-27/+56
| | | | | | declarations when they should have been. llvm-svn: 118393
* Modified the DWARF parser for both the single DWARF file and for the caseGreg Clayton2010-11-074-42/+110
| | | | | | | | | | | where the DWARF is in the .o files so they can track down the actual type for a forward declaration. This was working before for just DWARF files, but not for DWARF in .o files where the actual definition was in another .o file. Modified the main thread name in the driver to be more consistent with the other LLDB thread names. llvm-svn: 118383
* Fixed globals not showing up for any but the first compile unit due to a Greg Clayton2010-11-011-3/+7
| | | | | | | mismatch: I was using the compile unit user ID (the compile unit offset in the DWARF) as the compile unit index. llvm-svn: 117948
* Added a hack that allows expressions to ignoreSean Callanan2010-10-301-0/+6
| | | | | | | | | Objective-C member accessibility restrictions. Ultimately Clang should have a flag that ignores accessibility for Objective-C like it has one for C++. llvm-svn: 117768
* Add the ability to disable individual log categories, ratherCaroline Tice2010-10-292-3/+38
| | | | | | | | | than just the entire log channel. Add checks, where appropriate, to make sure a log channel/category has not been disabled before attempting to write to it. llvm-svn: 117715
* Modified the lldb_private::TypeList to use a std::multimap for quicker lookupGreg Clayton2010-10-291-3/+2
| | | | | | | | | | by type ID (the most common type of type lookup). Changed the API logging a bit to always show the objects in the OBJECT(POINTER) format so it will be easy to locate all instances of an object or references to it when looking at logs. llvm-svn: 117641
* Fixed the "frame variable -G NAME" that would print globalGreg Clayton2010-10-281-8/+9
| | | | | | | | variables by name. It was accidentally getting all the globals for the compile unit that contained the global variable named NAME. llvm-svn: 117516
* Updated the lldb_private::Flags class to have better method names and madeGreg Clayton2010-10-274-23/+33
| | | | | | | | | | | | | | | | | 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-201-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
* Did a bit of parameter renaming.Greg Clayton2010-10-152-28/+28
| | | | llvm-svn: 116562
* Separated the DWARF index for types from that the index of the namespacesGreg Clayton2010-10-154-8/+19
| | | | | | | | | | | since we can't parse DW_TAG_namespace DIEs as types. They are only decls in clang. All of the types we handle right now have both clang "XXXType" classes to go with the "XXXDecl" classes which means they can be used within the lldb_private::Type class. I need to check to see which other decls that don't have associated type objects need to float around the debugger and possibly make a lldb_private::Decl class to manage them. llvm-svn: 116558
OpenPOWER on IntegriCloud