summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ObjCLanguageRuntime.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* This patch is part of ongoing work to extract typeSean Callanan2012-09-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | information from the Objective-C runtime. This patch takes the old AppleObjCSymbolVendor and replaces it with an AppleObjCTypeVendor, which is much more lightweight. Specifically, the SymbolVendor needs to pretend that there is a backing symbol file for the Types it vends, whereas a TypeVendor only vends bare ClangASTTypes. These ClangASTTypes only need to exist in an ASTContext. The ClangASTSource now falls back to the runtime's TypeVendor (if one exists) if the debug information doesn't find a complete type for a particular Objective-C interface. The runtime's TypeVendor maintains an ASTContext full of types it knows about, and re-uses the ISA-based type query information used by the ValueObjects. Currently, the runtime's TypeVendor doesn't provide useful answers because we haven't yet implemented a way to iterate across all ISAs contained in the target process's runtime. That's the next step. llvm-svn: 163651
* <rdar://problem/11485744> Implement important data formatters in C++. Have ↵Enrico Granata2012-09-041-0/+82
| | | | | | the Objective-C language runtime plugin expose class descriptors objects akin to the objc_runtime.py Pythonic implementation. Rewrite the data formatters for some core Cocoa classes in C++ instead of Python. llvm-svn: 163155
* <rdar://problem/11757916>Greg Clayton2012-08-291-0/+2
| | | | | | | | | | | | Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes: - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was. - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile() Cleaned up header includes a bit as well. llvm-svn: 162860
* <rdar://problem/11113279>Greg Clayton2012-03-261-8/+6
| | | | | | | | | | Fixed type lookups to "do the right thing". Prior to this fix, looking up a type using "foo::bar" would result in a type list that contains all types that had "bar" as a basename unless the symbol file was able to match fully qualified names (which our DWARF parser does not). This fix will allow type matches to be made based on the basename and then have the types that don't match filtered out. Types by name can be fully qualified, or partially qualified with the new "bool exact_match" parameter to the Module::FindTypes() method. This fixes some issue that we discovered with dynamic type resolution as well as improves the overall type lookups in LLDB. llvm-svn: 153482
* Updated the revision of LLVM/Clang used by LLDB.Sean Callanan2012-03-081-1/+2
| | | | | | | | | | | | | | | This takes two important changes: - Calling blocks is now supported. You need to cast their return values, but that works fine. - We now can correctly run JIT-compiled expressions that use floating-point numbers. Also, we have taken a fix that allows us to ignore access control in Objective-C as in C++. llvm-svn: 152286
* Added support for looking up the complete type forSean Callanan2012-02-221-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Objective-C classes. This allows LLDB to find ivars declared in class extensions in modules other than where the debugger is currently stopped (we already supported this when the debugger was stopped in the same module as the definition). This involved the following main changes: - The ObjCLanguageRuntime now knows how to hunt for the authoritative version of an Objective-C type. It looks for the symbol indicating a definition, and then gets the type from the module containing that symbol. - ValueObjects now report their type with a potential override, and the override is set if the type of the ValueObject is an Objective-C class or pointer type that is defined somewhere other than the original reported type. This means that "frame variable" will always use the complete type if one is available. - The ClangASTSource now looks for the complete type when looking for ivars. This means that "expr" will always use the complete type if one is available. - I added a testcase that verifies that both "frame variable" and "expr" work. llvm-svn: 151214
* Added a new class to the lldb python module:Greg Clayton2012-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | lldb.value() It it designed to be given a lldb.SBValue object and it allows natural use of a variable value: pt = lldb.value(lldb.frame.FindVariable("pt")) print pt print pt.x print pt.y pt = lldb.frame.FindVariable("rectangle_array") print rectangle_array[12] print rectangle_array[5].origin.x Note that array access works just fine and works on arrays or pointers: pt = lldb.frame.FindVariable("point_ptr") print point_ptr[5].y Also note that pointer child accesses are done using a "." instead of "->": print point_ptr.x llvm-svn: 149464
* Fixed an issue with the Instruction subclasses where the strings mightGreg Clayton2012-01-191-6/+16
| | | | | | | | | | be fetched too many times and the DisassemblerLLVM was appending to strings when the opcode, mnemonic and comment accessors were called multiple times and if any of the strings were empty. Also fixed the test suite failures from recent Objective C modifications. llvm-svn: 148460
* Fix to ensure that methods aren't called on NULLSean Callanan2012-01-191-7/+9
| | | | | | objects. llvm-svn: 148450
* Added an extra way to chop up an objective C prototype and use it where ↵Greg Clayton2012-01-191-18/+25
| | | | | | necessary. llvm-svn: 148445
* Changed lldb_private::Type over to use the intrusive ref counted pointersGreg Clayton2011-10-181-1/+1
| | | | | | | | | | | so we don't have to lookup types in a type list by ID. Changed the DWARF parser to remove the "can externally complete myself" bits from the type when we are in the process of completing the type itself to avoid an onslaught of external visible decl requests from the clang::ExternalASTSource. llvm-svn: 142461
* Enable all the new accelerator tables if they are present and don't manuallyGreg Clayton2011-10-041-16/+16
| | | | | | | | | | index the DWARF. Also fixed an issue with memory accelerator tables with a size of 1 where we would loop infinitely. Added support for parsing the new .apple_namespaces section which gives us a memory hash table for looking up namespaces. llvm-svn: 141128
* Move the SourceManager from the Debugger to the Target. That way it can ↵Jim Ingham2011-09-081-1/+1
| | | | | | | | | | store the per-Target default Source File & Line. Set the default Source File & line to main (if it can be found.) at startup. Selecting the current thread & or frame resets the current source file & line, and "source list" as well as the breakpoint command "break set -l <NUM>" will use the current source file. llvm-svn: 139323
* Factor out the code that parses ObjC Method names into a static methodJim Ingham2011-08-151-0/+63
| | | | | | | in ObjCLanguageRuntime. Add the category-free name of symbols to the Symtab name-to-index list. llvm-svn: 137600
* Add support for looking up ivar offset from the ObjC runtime.Jim Ingham2011-06-241-0/+7
| | | | llvm-svn: 133831
* Adding support for fetching the Dynamic Value for ObjC Objects.Jim Ingham2011-05-021-0/+43
| | | | llvm-svn: 130701
* Modified all logging calls to hand out shared pointers to make sure weGreg Clayton2010-11-061-1/+1
| | | | | | | | | | | don't crash if we disable logging when some code already has a copy of the logger. Prior to this fix, logs were handed out as pointers and if they were held onto while a log got disabled, then it could cause a crash. Now all logs are handed out as shared pointers so this problem shouldn't happen anymore. We are also using our new shared pointers that put the shared pointer count and the object into the same allocation for a tad better performance. llvm-svn: 118319
* Add a ObjC V1 runtime, and a generic AppleObjCRuntime plugin.Jim Ingham2010-11-041-20/+0
| | | | | | Also move the Checker creation into the Apple Runtime code. llvm-svn: 118255
* Re-enabled LLDB's pointer checkers, and moved theSean Callanan2010-11-041-0/+19
| | | | | | | implementation of the Objective-C object checkers into the Objective-C language runtime. llvm-svn: 118226
* Add "-o" option to "expression" which prints the object description if ↵Jim Ingham2010-09-301-0/+3
| | | | | | available. llvm-svn: 115115
* Replace the vestigial Value::GetOpaqueCLangQualType with the more correct ↵Jim Ingham2010-09-281-2/+25
| | | | | | | | Value::GetValueOpaqueClangQualType. But mostly, move the ObjC Trampoline handling code from the MacOSX dyld plugin to the AppleObjCRuntime classes. llvm-svn: 114935
* Committing the skeleton of Language runtime plugin classes.Jim Ingham2010-09-231-0/+27
llvm-svn: 114620
OpenPOWER on IntegriCloud