summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF
Commit message (Collapse)AuthorAgeFilesLines
...
* This is an overhaul of the expression parser codeSean Callanan2011-08-052-22/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | that detects what context the current expression is meant to execute in. LLDB now properly consults the method declaration in the debug information rather than trying to hunt down the "this" or "self" pointer by name, which can be misleading. Other fixes include: - LLDB now properly detects that it is inside an inlined C++ member function. - LLDB now allows access to non-const members when in const code. - The functions in SymbolFile that locate the DeclContext containing a DIE have been renamed to reflect what they actually do. I have added new functions that find the DeclContext for the DIE itself. I have also introduced testcases for C++ and Objective-C. llvm-svn: 136999
* Make sure we track CXX and objc method decls.Greg Clayton2011-08-041-0/+3
| | | | llvm-svn: 136920
* Fixed a bug in which the DWARF reader did not distinguishSean Callanan2011-08-022-3/+14
| | | | | | | | | | | | | appropriately between C++ static methods and non-static methods. This bug made it impossible to call most static methods, either because Clang did not recognize that a method could be called without providing a "this" parameter, or because Clang did not properly mangle the name of the method when searching for it in the target. Also added a testcase. llvm-svn: 136733
* This change brings in the latest LLVM/Clang, andSean Callanan2011-07-302-16/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | completes the support in the LLDB expression parser for incomplete types. Clang now imports types lazily, and we complete those types as necessary. Changes include: - ClangASTSource now supports three APIs which it passes to ClangExpressionDeclMap. CompleteType completes a TagDecl or an ObjCInterfaceDecl when needed; FindExternalVisibleDecls finds named entities that are visible in the expression's scope; and FindExternalLexicalDecls performs a (potentially restricted) search for entities inside a lexical scope like a namespace. These changes mean that entities in namespaces should work normally. - The SymbolFileDWARF code for searching a context for a specific name is now more general, and can search arbitrary contexts. - We are continuing to adapt our calls into LLVM from interfaces that take start and end iterators when accepting multiple items to interfaces that use ArrayRef. - I have cleaned up some code, especially our use of namespaces. This change is neutral for our testsuite and greatly improves correctness for large programs (like Clang) with complicated type systems. It should also lay the groundwork for improving the expression parser's performance as we are lazier and lazier about providing type information. llvm-svn: 136555
* Added the ability to _not_ skip the prologue when settings breakpoints Greg Clayton2011-07-122-10/+40
| | | | | | | | | | | | | | by name by adding an extra parameter to the lldb_private::Target breakpoint setting functions. Added a function in the DWARF symbol file plug-in that can dump errors and prints out which DWARF file the error is happening in so we can track down what used to be assertions easily. Fixed the MacOSX kernel plug-in to properly read the kext images and set the kext breakpoint to watch for kexts as they are loaded. llvm-svn: 134990
* Stop the lldb_private::RegularExpression class from implicitlyGreg Clayton2011-07-071-1/+1
| | | | | | | constructing itself and causing unexpected things to happen in LLDB. llvm-svn: 134598
* Added "target variable" command that allows introspection of globalGreg Clayton2011-07-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables prior to running your binary. Zero filled sections now get section data correctly filled with zeroes when Target::ReadMemory reads from the object file section data. Added new option groups and option values for file lists. I still need to hook up all of the options to "target variable" to allow more complete introspection by file and shlib. Added the ability for ValueObjectVariable objects to be created with only the target as the execution context. This allows them to be read from the object files through Target::ReadMemory(...). Added a "virtual Module * GetModule()" function to the ValueObject class. By default it will look to the parent variable object and return its module. The module is needed when we have global variables that have file addresses (virtual addresses that are specific to module object files) and in turn allows global variables to be displayed prior to running. Removed all of the unused proxy object support that bit rotted in lldb_private::Value. Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code with the more efficient "FileSpec::Equal (lhs, rhs)". Improved logging in GDB remote plug-in. llvm-svn: 134579
* Centralize all of the type name code so that we always strip the leadingGreg Clayton2011-06-301-1/+1
| | | | | | | | "struct ", "class ", and "union " from the start of any type names that are extracted from clang QualType objects. I had to fix test suite cases that were expecting the struct/union/class prefix to be there. llvm-svn: 134132
* This commit adds broad architectural support for hierarchicalGreg Clayton2011-06-253-6/+96
| | | | | | | | | | | | | | | | | | | | | | | inspection of namespaces in the expression parser. ClangExpressionDeclMap hitherto reported that namespaces had been completely imported, even though the namespaces are returned empty. To deal with this situation, ClangASTSource was recently extended with an API to complete incomplete type definitions, and, for greater efficiency, to complete these definitions partially, returning only those objects that have a given name. This commit supports these APIs on LLDB's side, and uses it to provide information on types resident in namespaces. Namespaces are now imported as they were -- that is to say, empty -- but with minimal import mode on. This means that Clang will come back and request their contents by name as needed. We now respond with information on the contained types; this will be followed soon by information on functions and variables. llvm-svn: 133852
* Fixed variable parsing to not parse block variables over and over due to anGreg Clayton2011-06-174-98/+206
| | | | | | | | | | | | | | | issue in the way block variables are marked as parsed. In the DWARF parser we always parse all blocks for a function at once, so we can mark all blocks as having all variables parsed and avoid recursive function calls to try and reparse things that have already been handled. Fixed an issue with how variables get scoped into blocks. The DWARF parser can now handle abtract class definitions that contain concrete static variables. When the concrete instance of the class functions get instantiated, they will track down the concrete block for the abtract block and add the variable to each block. llvm-svn: 133302
* Improved the packet throughput when debugging with GDB remote by over 3x onGreg Clayton2011-06-171-49/+78
| | | | | | | | | | | | | darwin (not sure about other platforms). Modified the communication and connection classes to not require the BytesAvailable function. Now the "Read(...)" function has a timeout in microseconds. Fixed a lot of assertions that were firing off in certain cases and replaced them with error output and code that can deal with the assertion case. llvm-svn: 133224
* Header file cleanup and moved an inline to the implementation file.Greg Clayton2011-06-102-6/+11
| | | | llvm-svn: 132828
* lldb-59.Greg Clayton2011-05-301-1/+5
| | | | llvm-svn: 132304
* Do not parse DIE's outside a compilation units range.Stephen Wilson2011-05-201-11/+19
| | | | | | | | | | | | | | | In DWARFCompileUnit::ExtractDIEsIfNeeded we are relying on a compilation units DIEs to be terminated by a null entry. I think the standard is fairly clear that all sibling chains are to be terminated by null, but at least gcc 4.5.2 disagrees -- the top level chain drops the final entry. This results in us interpreting the next compilation unit header as a DIE. Regardless of whether gcc is right or wrong, we should not overstep a compilation units extent. This patch ensures that we do not attempt to extract a DIE beyond the length specified for a given DWARFCompileUnit by ensuring our current offset is strictly less than the start of the next CU. llvm-svn: 131721
* Use the portable memchr function instead of the BSD-only strnstrPeter Collingbourne2011-05-191-2/+2
| | | | llvm-svn: 131646
* Removed some assertions that could crash the controlling programGreg Clayton2011-05-171-5/+11
| | | | | | and turned them into warnings to stderr. llvm-svn: 131470
* For the purposes of setting breakpoints treat methods defined in the class ↵Jim Ingham2011-05-141-0/+18
| | | | | | and methods defined in a category on the class as the same. llvm-svn: 131331
* Fixed a case where if a function, inlined function, or global with a mangledGreg Clayton2011-04-211-14/+42
| | | | | | | name had a DW_AT_name that was the same string as the DW_AT_MIPS_linkage_name, then it would get added twice to the DWARF index. llvm-svn: 129942
* Rename some variables, no functionality change.Johnny Chen2011-04-181-8/+7
| | | | llvm-svn: 129724
* Work around a llvm gcc bug where the name of a reference doesn't include the ↵Jim Ingham2011-04-151-1/+10
| | | | | | "&". llvm-svn: 129620
* Get rid the of set membership test (log(m)) and, instead, use an index ↵Johnny Chen2011-04-151-3/+4
| | | | | | | | | variable 'i' which advances when src collides with a purged slot. Hi Stephen, you're welcome to overwrite/or improve upon this version. Thanks. llvm-svn: 129611
* Update both the src and dst pointers at the end of the loop.Johnny Chen2011-04-151-1/+1
| | | | | | Stephen Wilson is working on a better performing patch in the meantime. llvm-svn: 129605
* Optimize address range coalescing.Johnny Chen2011-04-151-22/+35
| | | | | | | | | | | | | | | | | | | | | | | DWARFDebugAranges::Sort() calls std::stable_sort() over a set of address ranges and then proceeds to collapse neighboring ranges together. One problem with the current implementation is that it does an incomplete job. When a pair of ranges are merged the next pair considered does not include the just-merged range. IOW, three consecutive ranges are never collapsed into one. Another problem is that for each range merged we are calling std::vector::erase() which "shifts" all remaining elements of the vector by one position on every merge. The end result (in the worst case) is a quadratic algorithm -- not good when the input vector is large. The following patch merges all consecutive ranges and removes the quadratic behavior. The implementation uses an auxiliary vector of indices in order to remember all ranges that can be dropped, then performs the coalescing of ranges in a single pass. Patch from Stephen Wilson with some minor modification by me. llvm-svn: 129595
* Added auto completion for architecture names and for platforms.Greg Clayton2011-04-131-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified the OptionGroupOptions to be able to specify only some of the options that should be appended by using the usage_mask in the group defintions and also provided a way to remap them to a new usage mask after the copy. This allows options to be re-used and also targetted for specific option groups. Modfied the CommandArgumentType to have a new eArgTypePlatform enumeration. Taught the option parser to be able to automatically use the appropriate auto completion for a given options if nothing is explicitly specified in the option definition. So you don't have to specify it in the option definition tables. Renamed the default host platform name to "host", and the default platform hostname to be "localhost". Modified the "file" and "platform select" commands to make sure all options and args are good prior to creating a new platform. Also defer the computation of the architecture in the file command until all options are parsed and the platform has either not been specified or reset to a new value to avoid computing the arch more than once. Switch the PluginManager code over to using llvm::StringRef for string comparisons and got rid of all the AccessorXXX functions in lieu of the newer mutex + collection singleton accessors. llvm-svn: 129483
* Add missing headers.Stephen Wilson2011-04-081-0/+1
| | | | | | | | Something changed in commit r129112 where a few standard headers vanished from the include chain when building on Linux. Fix up by including limits.h for INT_MAX and PATH_MAX where needed, and stdio.h for printf(). llvm-svn: 129130
* Add the rest of the mechanisms to make ARM instruction emulation ↵Caroline Tice2011-04-051-0/+2
| | | | | | usable/possible. llvm-svn: 128907
* Added some functions to our API related to classifying symbols as code, data,Greg Clayton2011-03-311-1/+3
| | | | | | | | | | | | const data, etc, and also for SBAddress objects to classify their type of section they are in and also getting the module for a section offset address. lldb::SymbolType SBSymbol::GetType(); lldb::SectionType SBAddress::GetSectionType (); lldb::SBModule SBAddress::GetModule (); llvm-svn: 128602
* Fixed the LLDB build so that we can have private types, private enums andGreg Clayton2011-03-242-3/+11
| | | | | | | | public types and public enums. This was done to keep the SWIG stuff from parsing all sorts of enums and types that weren't needed, and allows us to abstract our API better. llvm-svn: 128239
* Split all of the core of LLDB.framework/lldb.so into aGreg Clayton2011-03-201-0/+3
| | | | | | | | | | | | | | | | | | | | static archive that can be linked against. LLDB.framework/lldb.so exports a very controlled API. Splitting the API into a static library allows other tools (debugserver for now) to use the power of the LLDB debugger core, yet not export it as its API is not portable or maintainable. The Host layer and many of the other internal only APIs can now be statically linked against. Now LLDB.framework/lldb.so links against "liblldb-core.a" instead of compiling the .o files only for the shared library. This fix is only for compiling with Xcode as the Makefile based build already does this. The Xcode projecdt compiler has been changed to LLVM. Anyone using Xcode 3 will need to manually change the compiler back to GCC 4.2, or update to Xcode 4. llvm-svn: 127963
* Added a fix that should help incorrect type uniquing. There was an issueGreg Clayton2011-03-153-13/+88
| | | | | | | | for templatized types that could cause parts of a std::vector (and I am sure other STL types) to be incorrectly uniqued to each other wreaking havoc on variable display for types within the same executable module. llvm-svn: 127662
* Added a fix to not re-use object files when doing DWARF with debug map.Greg Clayton2011-03-151-16/+7
| | | | llvm-svn: 127659
* LLDB now has "Platform" plug-ins. Platform plug-ins are plug-ins that provideGreg Clayton2011-03-086-88/+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-271-11/+21
| | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud