History log of /external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
52f792329be5db8e38961350589e97e8f2823acd 12-Jul-2013 Greg Clayton <gclayton@apple.com> Huge change to clean up types.

A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error.

This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
7940069905bee0b2e5f0661bf37c9f906ddf8603 10-Jul-2013 Greg Clayton <gclayton@apple.com> Cleanup on the unified section list changes. Main changes are:
- ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags
- Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections.

Other cleanups:
- Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly
- Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently
- Modified the Symtab class to store a file address lookup table for more efficient lookups
- Removed Section::Finalize() and SectionList::Finalize() as they did nothing
- Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs
- Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
3e11c7ec050648ba865f1d451f8cb46fd39072a8 19-Jun-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Sort out a number of mismatched integer types in order to cut down the number of compiler warnings.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
884288bcb6824452a3c64eb772c0976501acc47a 03-Jun-2013 Matt Kopec <Matt.Kopec@intel.com> Fix various build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
0e191607adcb0ea8ebd06c278be648a7f5c0097f 10-May-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13854277>
<rdar://problem/13594769>

Main changes in this patch include:
- cleanup plug-in interface and use ConstStrings for plug-in names
- Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp
- Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging

The plug-in interface changes:

Modified the lldb_private::PluginInterface class that all plug-ins inherit from:

Changed:

virtual const char * GetPluginName() = 0;

To:

virtual ConstString GetPluginName() = 0;

Removed:

virtual const char * GetShortPluginName() = 0;

- Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names.
- Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc.






git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
6a25e5571a5b4173aae6fa6d0baffc75f5f8ecd2 24-Apr-2013 Sean Callanan <scallanan@apple.com> Fixed a build problem.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
967a99733b4246892250519bd4f14c8290c1988d 24-Apr-2013 Sean Callanan <scallanan@apple.com> Added support for pulling Objective-C class symbols
out of the runtime. This allows calling static methods
on classes whose symbols have been stripped out of the
binary.

<rdar://problem/12042992>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
d9661be3c9f884d9a7a78174038387edd04c5d93 24-Apr-2013 Enrico Granata <egranata@apple.com> Changes to the ObjC runtime



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
d387b462eecb908af265ecc7006781b4532073ad 19-Apr-2013 Greg Clayton <gclayton@apple.com> Fixed some linux buildbot warnings.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
102b2c2681c9a830afe25bfea35557421905e42c 19-Apr-2013 Greg Clayton <gclayton@apple.com> After discussing with Chris Lattner, we require C++11, so lets get rid of the macros and just use C++11.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
81a96aa6242f7b559770f5dc62316253cb8cb0d4 18-Apr-2013 Greg Clayton <gclayton@apple.com> Since we use C++11, we should switch over to using std::unique_ptr when C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++.

Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
12fbcf5bdbc54e49bf565ec067b3b484c28a52fe 05-Apr-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13563628>

Introducing a negative cache for ObjCLanguageRuntime::LookupInCompleteClassCache()
This helps speed up the (common) case of us looking for classes that are hidden deep within Cocoa internals and repeatedly failing at finding type information for them.
In order for this to work, we need to clean this cache whenever debug information is added. A new symbols loaded event is added that is triggered with add-dsym (before modules loaded would be triggered for both adding modules and adding symbols).
Interested parties can register for this event. Internally, we make sure to clean the negative cache whenever symbols are added.
Lastly, ClassDescriptor::IsTagged() has been refactored to GetTaggedPointerInfo() that also (optionally) returns info and value bits. In this way, data formatters can share tagged pointer code instead of duplicating the required arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
4e0557ff031f14b3cde50269844503fda1622420 29-Mar-2013 Sean Callanan <scallanan@apple.com> Fixed a crash if the Objective-C runtime module
wasn't loaded into the underlying process or
couldn't be found.

<rdar://problem/13533671>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
952e9dc874944fcdbbb224f3ec4fc2c859376f64 28-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13521159>

LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.

All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
3dc2a5b732ae161b8ae51d376a8f0060a7d9e2a8 20-Mar-2013 Enrico Granata <egranata@apple.com> Cleanup to the ObjC runtime to remove the now useless ClassDescriptor_Invalid

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
cba09f60618744e2155bc97c9049fa9c797698ad 19-Mar-2013 Enrico Granata <egranata@apple.com> This checkin removes the last Cocoa formatters that were implemented in Python and reimplements them in C++. The Python Cocoa formatters are not shipped as part of LLDB anymore, but still exist in the source repository for user reference. Python formatters still exist for STL classes and users can still define their own Python formatters

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
f5af85a2946ed4e1ff4766829d328cfb4961f259 08-Mar-2013 Enrico Granata <egranata@apple.com> Initial checkin of a new project: LLDB Performance Testing Infrastructure

This is a very basic implementation of a library that easily allows to drive LLDB.framework to write test cases for performance

This is separate from the LLDB testsuite in test/ in that:
a) this uses C++ instead of Python to avoid measures being affected by SWIG
b) this is in very early development and needs lots of tweaking before it can be considered functionally complete
c) this is not meant to test correctness but to help catch performance regressions

There is a sample application built against the library (in darwin/sketch) that uses the famous sample app Sketch as an inferior to measure certain basic parameters of LLDB's behavior.
The resulting output is a PLIST much like the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>fetch-frames</key>
<real>0.13161715522222225</real>
</dict>
<dict>
<key>file-line-bkpt</key>
<real>0.029111678750000002</real>
</dict>
<dict>
<key>fetch-modules</key>
<real>0.00026376766666666668</real>
</dict>
<dict>
<key>fetch-vars</key>
<real>0.17820429311111111</real>
</dict>
<dict>
<key>run-expr</key>
<real>0.029676525769230768</real>
</dict>
</array>
</plist>

Areas for improvement:
- code cleanups (I will be out of the office for a couple days this coming week, but please keep ideas coming!)
- more metrics and test cases
- better error checking

This toolkit also comprises a simple event-loop-driven controller for LLDB, similar yet much simpler to what the Driver does to implement the lldb command-line tool.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
fe21d4f351f560921e615a6677afe1c057aa7f28 22-Feb-2013 Matt Kopec <Matt.Kopec@intel.com> Fix clang warnings related to python macro redefinition and printf format specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
9bf4c4add7b7b0a173afe0b3246ce3dfa795dcbb 14-Feb-2013 Greg Clayton <gclayton@apple.com> A lot more cleanup on the AppleObjCRuntimeV2 class.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
2e045fc8de471b2338909d5f4a8e934deb067fa0 14-Feb-2013 Greg Clayton <gclayton@apple.com> Cleaned up and removed unused code.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
ce490e3161b17c3f2904d6e797bb5e5517d651c2 13-Feb-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13210494>

Parse objective C information as efficiently as possible and without taking dangerous runtime locks.

Reworked the way objective C information is parsed by:
1 - don't read all class names up front, this is about 500K of data with names
2 - add a 32 bit hash map that maps a hash of a name to the Class pointer (isa)
3 - Improved name lookups by using the new hash map
4 - split up reading the objc runtime info into dynamic and shared cache since the shared cache only needs to be read once.
5 - When reading all isa values, also get the 32 bit hash instead of the name
6 - Read names lazily now that we don't need all names up front
7 - Allow the hash maps to not be there and still have this function correctly

There is dead code in here with all of the various methods I tried. I want to check this in first to not lose any of it in case we need to revert to any of the extra code. I will promptly cleanup and commit again.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
36da2aa6dc5ad9994b638ed09eb81c44cc05540b 25-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
1a469c75c0597abc2a9abdf86b624b2e71ea8650 23-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12711206>

Extending ValueObjectDynamicValue so that it stores a TypeAndOrName instead of a TypeSP.
This change allows us to reflect the notion that a ValueObject can have a dynamic type for which we have no debug information.
Previously, we would coalesce that to the static type of the object, potentially losing relevant information or even getting it wrong.
This fix ensures we can correctly report the class name for Cocoa objects whose types are hidden classes that we know nothing about (e.g. __NSArrayI for immutable arrays).
As a side effect, our --show-types argument to frame variable no longer needs to append custom dynamic type information.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
7398e43346866f08c5a0c584204567f150f2565d 16-Jan-2013 Sean Callanan <scallanan@apple.com> Fixes to the code I just committed to reflect
that we now also have to ignore breakpoints
when running the expression to collect isas.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
9540568d3120dae0ef61a64fcc0410c1778fbb88 16-Jan-2013 Sean Callanan <scallanan@apple.com> Modified the Objective-C runtime to fetch Objective-C
isas and corresponding names from the underlying process
in a manner much quicker than the current approach.

The current approach accesses memory in the underlying
process with a random-access pattern as it walks across
the data structures associated with each isa. This
involves a great deal of back-and-forth with debugserver,
resulting in performance problems, especially with iOS
targets.

The new approach attempts to run an expression in the
target that collects the isas and names into two large
buffers, which LLDB then collects in one shot.

<rdar://problem/12914539>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
b794020ffbd6473c59a6e98be044df50abf7fc30 15-Jan-2013 Jim Ingham <jingham@apple.com> Separated the "expr --unwind-on-error" behavior into two parts, actual errors (i.e. crashes) which continue to be
controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately controls behavior when a called
function hits a breakpoint. For breakpoints, we don't unwind, we either stop, or ignore the breakpoint, which makes
more sense.
Also make both these behaviors globally settable through "settings set".
Also handle the case where a breakpoint command calls code that ends up re-hitting the breakpoint. We were recursing
and crashing. Now we just stop without calling the second command.

<rdar://problem/12986644>
<rdar://problem/9119325>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
b9db9d5bb01963774f28540dbe2c5a11f586ff29 07-Dec-2012 Daniel Malea <daniel.malea@intel.com> Fix a few more clang (3.2) warnings on Linux:
- remove unused members
- add NO_PEDANTIC to selected Makefiles
- fix return values (removed NULL as needed)
- disable warning about four-char-constants
- remove unneeded const from operator*() declaration
- add missing lambda function return types
- fix printf() with no format string
- change sizeof to use a type name instead of variable name
- fix Linux ProcessMonitor.cpp to be 32/64 bit friendly
- disable warnings emitted by swig-generated C++ code

Patch by Matt Kopec!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
d891f9b872103235cfd2ed452c6f14a4394d9b3a 05-Dec-2012 Daniel Malea <daniel.malea@intel.com> Fix Linux build warnings due to redefinition of macros:
- add new header lldb-python.h to be included before other system headers
- short term fix (eventually python dependencies must be cleaned up)

Patch by Matt Kopec!




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
c07d1993157ac8251084e11b9df23b6169e99ac3 04-Dec-2012 Sean Callanan <scallanan@apple.com> Cache the names for Objective-C classes if we know
them while making our initial run through the
Objective-C runtime's class tables.

<rdar://problem/12799087>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
25b2109486963038a436bdb82fd327a6e5bb8d6d 04-Dec-2012 Daniel Malea <daniel.malea@intel.com> A few more build fixes for gcc 4.6:
- use const char* instead of char* as needed in ObjC language runtime plugin
- use int to iterate through enum (operator++ on enum not defined)
- use initializer list instead of inline initialization of const field



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
5f35a4be95aed0e5b2cb36f7d785bcbfc67284ae 29-Nov-2012 Daniel Malea <daniel.malea@intel.com> Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
d27e543e9c5f81ef1288afbc9e48de2da5976a8a 15-Nov-2012 Sean Callanan <scallanan@apple.com> In cases where the Objective-C ivar symbols are stripped out,
expressions that refer to ivars will not work because Clang
emits IR that refers to them to get the ivar offsets.
However, it is possible to search the runtime for these values.

I have added support for reading the relevant tables to the
Objective-C runtime, and extended ClangExpressionDeclMap to
query that information if and only if it doesn't find the symbols
in the binary.

Also added a testcase.

<rdar://problem/12628122>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
146d9522c95c0c8c5409539813b55e08b99196ee 08-Nov-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12586350>

This commit does three things:
(a) introduces a new notification model for adding/removing/changing modules to a ModuleList, and applies it to the Target's ModuleList, so that we make sure to always trigger the right set of actions
whenever modules come and go in a target. Certain spots in the code still need to "manually" notify the Target for several reasons, so this is a work in progress
(b) adds a new capability to the Platforms: locating a scripting resources associated to a module. A scripting resource is a Python file that can load commands, formatters, ... and any other action
of interest corresponding to the loading of a module. At the moment, this is only implemented on Mac OS X and only for files inside .dSYM bundles - the next step is going to be letting
the frameworks themselves hold their scripting resources. Implementors of platforms for other systems are free to implement "the right thing" for their own worlds
(c) hooking up items (a) and (b) so that targets auto-load the scripting resources as the corresponding modules get loaded in a target. This has a few caveats at the moment:
- the user needs to manually add the .py file to the dSYM (soon, it will also work in the framework itself)
- if two modules with the same name show up during the lifetime of an LLDB session, the second one won't be able to load its scripting resource, but will otherwise work just fine



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
93e269368c0568c572d5b42a4783532832b3b93c 31-Oct-2012 Greg Clayton <gclayton@apple.com> Patch for issue found by Carlo Kok. Fixed a type issue where an ';' was incorrectly following an if statement. There actually isn't a need for the if statement, so it was removed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
c62f5ab9b1c977dac97c94d4105cc9daca04fd5a 27-Oct-2012 Sean Callanan <scallanan@apple.com> Fixes to the Objective-C V2 runtime:

- Only read the statically-defined isa table in the
shared cache once. Only the dynamically-constructed
isa table can change.

- Ignore the statically-defined isa table if its
version isn't what we expect.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
90c6cd5764ed78d4b45606f6ee648c71ec298c03 25-Oct-2012 Greg Clayton <gclayton@apple.com> Changed the V1 and V2 runtimes to be able to detect when the ISA hash table has changed, and auto update as needed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
ef22b90240618ed8056dac14a756dff574f8218a 24-Oct-2012 Greg Clayton <gclayton@apple.com> Objective C cleanup. Removed an cache that was no longer needed and changes the code that gets the dynamic type and class name to use our new Objective C cache.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
a510437e795477e5f629263d3d191d982c991733 11-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12331741>

Dynamic type code must be efficient and fast. Now it is.

Added ObjC v1 support for getting the complete list of ISA values.

The main flow of the AppleObjCRuntime subclasses is now they must override "virtual bool UpdateISAToDescriptorMap_Impl();". This function will update the complete list of ISA values and create ClassDescriptorSP objects for each one. Now we have the complete list of valid ISA values which we can use for verification when doing dynamic typing.

Refactored a bunch of stuff so that the AppleObjCRuntime subclasses don't have to implement as many functions as they used to.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
edb0d27883a1409acb428b50af9b67044a3f5909 10-Oct-2012 Greg Clayton <gclayton@apple.com> Someone was using vi and left a little something in the code.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
bc92c019bdd23c468d19f6ac486e00564b32ef6a 10-Oct-2012 Sean Callanan <scallanan@apple.com> Switched AppleObjCRuntimeV2::CreateClassDescriptor
over to simply update its cache and then look up
the descriptor in the cache. This is fine because
the cache now builds much faster (since descriptors
are minimal).

Metaclasses aren't in the cache, so I switched
the Describe method for class descriptors from using
GetClassDescriptor to manually creating an automatic
ClassDescriptorV2.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
65529e3a02d91c25a779d8bac0c5bcd97c503ebd 10-Oct-2012 Sean Callanan <scallanan@apple.com> Thinned the AppleObjCRuntimeV2's class descriptors.
The following are now derived lazily:

- The name of the class (cached);
- the instance size of the class (not cached);

The following have been removed entirely:

- Whether the class is realized. This is an
implementation detail.
- The contents of the objc_class object. That
object can be read as needed.
- Whether the class is valid. The fact that
we vended a class to begin with means it's
valid. We will only give up looking parts
of it up if they are not in the format we
expect.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
be2e964838bbbc4af7a3552ededd8cc17d75c517 09-Oct-2012 Sean Callanan <scallanan@apple.com> Cleanup in the AppleObjCRuntimeV2 to make descriptors
lighter-weight so that the cache can be populated
faster.

- I Added a ProcessWP to the runtime so I can
take it out of the individual descriptors, saving
space;
- I made the constructors for the descriptors
private so that only the runtime can invoke them;
and
- I removed the constructor that takes a ValueObject
since the logic for using a ValueObject is in the
runtime.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
be2f3aac39c2f7e3e6cce513800b35fa4b8f5429 09-Oct-2012 Greg Clayton <gclayton@apple.com> Changes to clean up the runtime and how the ISA caches are managed.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
bf41e19c78f0c84671d21eadec3954ab6db550c1 05-Oct-2012 Jason Molenda <jmolenda@apple.com> Ran the sources through the compiler with -Wshadow warnings
enabled after we'd found a few bugs that were caused by shadowed
local variables; the most important issue this turned up was
a common mistake of trying to obtain a mutex lock for the scope
of a code block by doing

Mutex::Locker(m_map_mutex);

This doesn't assign the lock object to a local variable; it is
a temporary that has its dtor called immediately. Instead,

Mutex::Locker locker(m_map_mutex);

does what is intended. For some reason -Wshadow happened to
highlight these as shadowed variables.

I also fixed a few obivous and easy shadowed variable issues
across the code base but there are a couple dozen more that
should be fixed when someone has a free minute.
<rdar://problem/12437585>




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
d123b989d453c70244b04d4c9ef7792214e9010a 28-Sep-2012 Sean Callanan <scallanan@apple.com> Improved the runtime reading to also get data
out of the metaclass, so as to enumerate class
methods for an object.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
2a5ca48974884c1344e3eff4a60ae63e05fa8ea7 27-Sep-2012 Sean Callanan <scallanan@apple.com> Fixed some bugs in the runtime reader code. Also
added a parser for method signatures in the
Objective-C @encode format.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
df5741456dfe0da46bb6f144a3f97a2925e23de9 26-Sep-2012 Filipe Cabecinhas <me@filcab.net> Make lldb more C++11 friendly.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
41ea0eb4624a8c5d53c340fc29e31c3ebdd645af 21-Sep-2012 Sean Callanan <scallanan@apple.com> Fixed an oddity in the Objective-C class descriptors
where the descriptor took a pointer to an object and
expected the Initialize function to dereference that
pointer and extract the isa value. This caused one
of our tests to fail.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
d83ecab0aeb229504737e34b2f03c07fcb967480 20-Sep-2012 Sean Callanan <scallanan@apple.com> More work for reading the Objective-C runtime.
We can now read the relevant data structures for
the method list, and use a callback mechanism to
report their details to the AppleObjCTypeVendor,
which constructs appropriate Clang types.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
807338c64aecb0fd95bede6a56951da565a3a9bd 20-Sep-2012 Greg Clayton <gclayton@apple.com> Don't get everything when resolving the symbol context of the ObjC Class symbol, just the module + symbol.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
c3b0aa959395671385aa1f4c8201d8a484079f1d 19-Sep-2012 Sean Callanan <scallanan@apple.com> Updated AppleObjCV2Runtime to load the class
data structures more rapidly. Also added fields
for the other data structures in a class.

I also fixed a problem where I accidentally used
hasExternalLexicalStorage() instead of
hasExternalVisibleStorage() to mark an
incomplete object.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
81a5a09e76cfc1f110c0416e372f9f6cc27d79cf 18-Sep-2012 Sean Callanan <scallanan@apple.com> Objective-C runtime class descriptors can now
populate Clang ObjCInterfaceDecls with their
ivars, methods, and properties. The default
implementation does nothing. I have also made
sure that AppleObjCRuntimeV2 creates
ObjCInterfaceDecls that actually get queried
appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
4d0fa042181391e4fde953ebb5600d93022b3331 17-Sep-2012 Enrico Granata <egranata@apple.com> Make the Class Descriptors able to fetch the class name for unrealized classes

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
a0d8a78a18afe2f83480141a71c1f3f182aa2cc5 17-Sep-2012 Sean Callanan <scallanan@apple.com> Re-applied Enrico's patch that I so rudely
stomped on.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
670891ffe073d76933fbef6dbd3bb66979ad8b73 17-Sep-2012 Enrico Granata <egranata@apple.com> Stop validating the vtable_ptr since it's not actually guaranteed to be correct

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
6fe8d36ff420335095d437b35ff96fe4b7cd3ed9 15-Sep-2012 Sean Callanan <scallanan@apple.com> More runtime work. We now successfully traverse
the dynamic and static runtime class tables to
construct our isa table. This is putting the runtime
in contact with unrealized classes, which we need
to deal with in order to get accurate information.
That's the next piece of work.

<rdar://problem/10986023>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
f91e78f58692785db4daecf8461481b95827dcf2 13-Sep-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11086338> Implementing support for synthetic children generated by running C++ code instead of Python scripts ; Adding a bunch of value-generating APIs to our private code layer ; Providing synthetic children for NSArray

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
c718b9652bb1a7aea5d133123fcc8bc87277002c 11-Sep-2012 Sean Callanan <scallanan@apple.com> This patch is part of ongoing work to extract type
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.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
7eb083121db9e5d3a9a863e77b4a183c466028a7 06-Sep-2012 Enrico Granata <egranata@apple.com> Patch from Daniel Malea to fix the build on Linux. Thanks

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
ae2ae94bd72daf435204e99a0e03ccc64470a843 04-Sep-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11485744> Implement important data formatters in C++. Have 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.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
49ce8969d3154e1560106cfe530444c09410f217 29-Aug-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11757916>

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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
20c37084dbfb8d704b3dabcd978a0afc060cd87d 18-May-2012 Jim Ingham <jingham@apple.com> Make the debug output that comes as printf's from code called in the target for getting ObjC class names and ObjC method implementations only come out when doing verbose logging.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
aad177d702404a9b0b72006339a66cf45809b478 17-May-2012 Jim Ingham <jingham@apple.com> Reduce the timeout value for the "get class name" and "po" functions to .1 second. 1 second (what they were before) is way too long.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
9f95fb63a492b53206d578f46e73899d60d70321 06-Apr-2012 Greg Clayton <gclayton@apple.com> In a prior commit, I changed the parameters around on a ModuleList::FindTypes where the old parameters that existing clients were using would have been compatible, so I renamed ModuleList::FindTypes to ModuleList::FindTypes2. Then I made fixes and verified I updated and fixed all client code, but I forgot to rename the function back to ModuleList::FindTypes(). I am doing that now and also cleaning up the C++ dynamic type code a bit.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
dc0a38c5a727cae5362b218a3180d0f4265a619d 27-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11113279>

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.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
30dad103fe1a9f79c63d78c2c6b288ee4994f006 10-Mar-2012 Jim Ingham <jingham@apple.com> Meta classes can't have dynamic types...
<rdar://problem/11021925>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
a1dfecfa891e0d08373776f555b3c992467a21af 07-Mar-2012 Sean Callanan <scallanan@apple.com> Look up ivar offset symbols correctly. We now
treat Objective-C ivar symbols as their own kind
of symbol rather than lumping them in with generic
"runtime" symbols.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
0c31d3d3a4a1d00d53346d8a23b0519f47e55d1f 07-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10997402>

This fix really needed to happen as a previous fix I had submitted for
calculating symbol sizes made many symbols appear to have zero size since
the function that was calculating the symbol size was calling another function
that would cause the calculation to happen again. This resulted in some symbols
having zero size when they shouldn't. This could then cause infinite stack
traces and many other side affects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
4722b10307668368bf0f12fa6b8691e4f4cb5488 06-Mar-2012 Jim Ingham <jingham@apple.com> Add a command and an SB API to create exception breakpoints. Make the break output prettier for Exception breakpoints.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
3df164e694d4e03905f8725c46b68b8dcc104deb 05-Mar-2012 Jim Ingham <jingham@apple.com> Make it possible to set Exception breakpoints when the target doesn't yet
have a process, then fetch the right runtime resolver when the process is made.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
c105362e1fd33664939811569dc4a540959e7db7 03-Mar-2012 Jim Ingham <jingham@apple.com> First step to making an LanguageRuntime Exception breakpoint API.
<rdar://problem/10196277>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
3508c387c3f0c9ecc439d98048fd7694d41bab1b 24-Feb-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10103468>

I started work on being able to add symbol files after a debug session
had started with a new "target symfile add" command and quickly ran into
problems with stale Address objects in breakpoint locations that had
lldb_private::Section pointers into modules that had been removed or
replaced. This also let to grabbing stale modules from those sections.
So I needed to thread harded the Address, Section and related objects.

To do this I modified the ModuleChild class to now require a ModuleSP
on initialization so that a weak reference can created. I also changed
all places that were handing out "Section *" to have them hand out SectionSP.
All ObjectFile, SymbolFile and SymbolVendors were inheriting from ModuleChild
so all of the find plug-in, static creation function and constructors now
require ModuleSP references instead of Module *.

Address objects now have weak references to their sections which can
safely go stale when a module gets destructed.

This checkin doesn't complete the "target symfile add" command, but it
does get us a lot clioser to being able to do such things without a high
risk of crashing or memory corruption.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
b4d7fc0c466d446876e5f2d701f0e574dd0be8e7 17-Feb-2012 Greg Clayton <gclayton@apple.com> This checking is part one of trying to add some threading safety to our
internals. The first part of this is to use a new class:

lldb_private::ExecutionContextRef

This class holds onto weak pointers to the target, process, thread and frame
and it also contains the thread ID and frame Stack ID in case the thread and
frame objects go away and come back as new objects that represent the same
logical thread/frame.

ExecutionContextRef objcets have accessors to access shared pointers for
the target, process, thread and frame which might return NULL if the backing
object is no longer available. This allows for references to persistent program
state without needing to hold a shared pointer to each object and potentially
keeping that object around for longer than it needs to be.

You can also "Lock" and ExecutionContextRef (which contains weak pointers)
object into an ExecutionContext (which contains strong, or shared pointers)
with code like

ExecutionContext exe_ctx (my_obj->GetExectionContextRef().Lock());



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
f03d97e519811a029578cc120a7a2725cdf2aad1 12-Jan-2012 Jim Ingham <jingham@apple.com> Discriminate between the lldb_private::Type's for ObjC Classes that come from debug info, and those that
are made up from the ObjC runtime symbols. For now the latter contain nothing but the fact that the name
describes an ObjC class, and so are not useful for things like dynamic types.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
1586d9720002e407a3a097baf302de5fa4ca9c1b 17-Dec-2011 Jim Ingham <jingham@apple.com> Add the ability to capture the return value in a thread's stop info, and print it
as part of the thread format output.
Currently this is only done for the ThreadPlanStepOut.
Add a convenience API ABI::GetReturnValueObject.
Change the ValueObject::EvaluationPoint to BE an ExecutionContextScope, rather than
trying to hand out one of its subsidiary object's pointers. That way this will always
be good.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
1d8b089cc7aae720a4fe1d3be3349a0c43ae7341 16-Dec-2011 Jim Ingham <jingham@apple.com> Remove unnecessary #include.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
4a2e33769873d68d5703da5742c0e248f46e3a72 15-Dec-2011 Greg Clayton <gclayton@apple.com> Expose new read memory fucntion through python in SBProcess:

size_t
SBProcess::ReadCStringFromMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error);

uint64_t
SBProcess::ReadUnsignedFromMemory (addr_t addr, uint32_t byte_size, lldb::SBError &error);

lldb::addr_t
SBProcess::ReadPointerFromMemory (addr_t addr, lldb::SBError &error);

These ReadCStringFromMemory() has some SWIG type magic that makes it return the
python string directly and the "buf" is not needed:

error = SBError()
max_cstr_len = 256
cstr = lldb.process.ReadCStringFromMemory (0x1000, max_cstr_len, error)
if error.Success():
....

The other two functions behave as expteced. This will make it easier to get integer values
from the inferior process that are correctly byte swapped. Also for pointers, the correct
pointer byte size will be used.

Also cleaned up a few printf style warnings for the 32 bit lldb build on darwin.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
249f4c468f1aae726d5a30db12243e590e7ec010 05-Dec-2011 Greg Clayton <gclayton@apple.com> Fixed the remaining test suite failures after the recent objective C cleanup
and fixes we did. Now that objective C classes are represented by symbols with
their own type, there were a few more places in the objective C code that needed
to be fixed when searching for dynamic types.

Cleaned up the objective C runtime plug-in a bit to not keep having to create
constant strings and make one less memory access when we find an "isa" in the
objective C cache.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
673f3dbea64b116166dfa668006cdc84224a27c0 30-Nov-2011 Sean Callanan <scallanan@apple.com> Added support to the Objective-C language runtime
to find Objective-C class types by looking in the
symbol tables for the individual object files.

I did this as follows:

- I added code to SymbolFileSymtab that vends
Clang types for symbols matching the pattern
"_OBJC_CLASS_$_NSMyClassName," making them
appear as Objective-C classes. This only occurs
in modules that do not have debug information,
since otherwise SymbolFileDWARF would be in
charge of looking up types.

- I made a new SymbolVendor subclass for the
Apple Objective-C runtime that is in charge of
making global lookups of Objective-C types. It
currently just sends out type lookup requests to
the appropriate SymbolFiles, but in the future we
will probably extend it to query the runtime more
completely.

I also modified a testcase whose behavior is changed
by the fact that we now actually return an Objective-C
type for __NSCFString.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
ba560cc7d03c9f7d9df81e60201c5ec75cff5232 01-Nov-2011 Jim Ingham <jingham@apple.com> Enhanced the ObjC DynamicCheckerFunction to test for "object responds to selector" as well as
"object borked"... Also made the error when the checker fails reflect this fact rather than
report a crash at 0x0.

Also a little cleanup:
- StopInfoMachException had a redundant copy of the description string.
- ThreadPlanCallFunction had a redundant copy of the thread, and had a
copy of the process that it didn't really need.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
20b8a9643335e959d8822d720618be13c363f28e 27-Oct-2011 Sean Callanan <scallanan@apple.com> Added an extra parameter to the object-checker
functions in the Objective-C language runtime
that is set to the selector that is being passed
to the object.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
4c8353bd5be6e5abcab8fe27965d477aace75cf2 19-Oct-2011 Greg Clayton <gclayton@apple.com> Changed lldb_private::Type over to use the intrusive ref counted pointers
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
d6d47976b71187907c1cdeea86fabf7d5534314f 23-Sep-2011 Jim Ingham <jingham@apple.com> Added the ability to restrict breakpoints by function name, function regexp, selector
etc to specific source files.
Added SB API's to specify these source files & also more than one module.
Added an "exact" option to CompileUnit's FindLineEntry API.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
6e0101c86555a06b3bd4cb6104b35abfae0b0057 17-Sep-2011 Greg Clayton <gclayton@apple.com> Convert lldb::ModuleSP to use an instrusive ref counted pointer.
We had some cases where getting the shared pointer for a module from
the global module list was causing a performance issue when debugging
with DWARF in .o files. Now that the module uses intrusive ref counts,
we can easily convert any pointer to a shared pointer.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
915448044bac6fdac22a33cc46697dcb771a8df2 06-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Redesign of the interaction between Python and frozen objects:
- introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from
a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored
in frozen objects ; now such reads transparently move from host to target as required
- as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also
removed code that enabled to recognize an expression result VO as such
- introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO
representing a T* or T[], and doing dereferences transparently
in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData
- as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it
en lieu of doing the raw read itself
- introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers,
this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory)
in public layer this returns an SBData, just like GetPointeeData()
- introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData
the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any
of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values
- added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing
Solved a bug where global pointers to global variables were not dereferenced correctly for display
New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128
Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command
Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type
of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file
addresses that generate file address children UNLESS we have a live process)
Updated help text for summary-string
Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers
Edited the syntax and help for some commands to have proper argument types


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
37f962e785be99dc4f0c5e9d02416992ff03bbd0 22-Aug-2011 Greg Clayton <gclayton@apple.com> Added a new plug-in type: lldb_private::OperatingSystem. The operating system
plug-ins are add on plug-ins for the lldb_private::Process class that can add
thread contexts that are read from memory. It is common in kernels to have
a lot of threads that are not currently executing on any cores (JTAG debugging
also follows this sort of thing) and are context switched out whose state is
stored in memory data structures. Clients can now subclass the OperatingSystem
plug-ins and then make sure their Create functions correcltly only enable
themselves when the right binary/target triple are being debugged. The
operating system plug-ins get a chance to attach themselves to processes just
after launching or attaching and are given a lldb_private::Process object
pointer which can be inspected to see if the main executable, target triple,
or any shared libraries match a case where the OS plug-in should be used.
Currently the OS plug-ins can create new threads, define the register contexts
for these threads (which can all be different if desired), and populate and
manage the thread info (stop reason, registers in the register context) as
the debug session goes on.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
074e3b6c2eac1438a85e464796cbc19b4354d5ad 17-Aug-2011 Enrico Granata <granata.enrico@gmail.com> New category "gnu-libstdc++" provides summary for std::string and synthetic children for types std::map, std::list and std::vector
The category is enabled by default. If you run into issues with it, disable it and the previous behavior of LLDB is restored
** This is a temporary solution. The general solution to having formatters pulled in at startup should involve going through the Platform.
Fixed an issue in type synthetic list where a category with synthetic providers in it was not shown if all the providers were regex-based


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
e5e34cb15f031237004b05abfa623c71f879f6c0 17-Aug-2011 Enrico Granata <granata.enrico@gmail.com> When defining a scripted command, it is possible to provide a docstring and that will be used as the help text for the command
If no docstring is provided, a default help text is created
LLDB will refuse to create scripted commands if the scripting language is anything but Python
Some additional comments in AppleObjCRuntimeV2.cpp to describe the memory layout expected by the dynamic type lookup code


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
a2275b369e09ddcc844c5f5b418bc6e9db898733 15-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Objective-C runtime now caches resolved ISA information for increased efficiency

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
0f3cf06cfcf1fa3f5ea51cac61599befca6a105f 10-Aug-2011 Johnny Chen <johnny.chen@apple.com> Fix indentation for a log statement.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
0c3d6d6eb941a60b44fbf49e879601d4e5ccebba 04-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Basic handling of Objective-C tagged pointers: return a custom ISA and typename when one is detected

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
441f08ca9d17fad237b93a71aeab9dad74ea1258 03-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixed an issue where the KVO swizzled type would be returned as the dynamic type instead of the actual user-level type
- see the test case in lang/objc/objc-dynamic-value for an example
Objective-C dynamic type lookup now works for every Objective-C type
- previously, true dynamic lookup was only performed for type id


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
afb7c85df796f74262917e44dd68f668dade3911 02-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixed a bug where a variable could not be formatted in a summary if its datatype already had a custom format
Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers:
- expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory),
if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target)
pointer to the Python code
Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used:
- Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
979e20d127335143ffc89c2e37ec3a8b717ff22d 29-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Public API changes:
- Completely new implementation of SBType
- Various enhancements in several other classes
Python synthetic children providers for std::vector<T>, std::list<T> and std::map<K,V>:
- these return the actual elements into the container as the children of the container
- basic template name parsing that works (hopefully) on both Clang and GCC
- find them in examples/synthetic and in the test suite in functionalities/data-formatter/data-formatter-python-synth
New summary string token ${svar :
- the syntax is just the same as in ${var but this new token lets you read the values
coming from the synthetic children provider instead of the actual children
- Python providers above provide a synthetic child len that returns the number of elements
into the container
Full bug fix for the issue in which getting byte size for a non-complete type would crash LLDB
Several other fixes, including:
- inverted the order of arguments in the ClangASTType constructor
- EvaluationPoint now only returns SharedPointer's to Target and Process
- the help text for several type subcommands now correctly indicates argument-less options as such


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
9cbb1250bcab4f1db6b78b898483ee7a2ee34478 23-Jul-2011 Jim Ingham <jingham@apple.com> Don't delete & remake the exception breakpoints every time you need them. Make them once & enable/disable
them as appropriate.
Also reformatted the lldb summaries to make them easier to read, and added one. I'll do more as I get time.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
b302b2f50e079b11a12ebafc29104c198f4f15e4 30-Jun-2011 Greg Clayton <gclayton@apple.com> Centralize all of the type name code so that we always strip the leading
"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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
58513667f6765aa8db13cdc4abd500340c1cac80 25-Jun-2011 Jim Ingham <jingham@apple.com> Add support for looking up ivar offset from the ObjC runtime.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
c0fa53324d62a48257c092a3347d6e7236aa3152 23-May-2011 Greg Clayton <gclayton@apple.com> Added new lldb_private::Process memory read/write functions to stop a bunch
of duplicated code from appearing all over LLDB:

lldb::addr_t
Process::ReadPointerFromMemory (lldb::addr_t vm_addr, Error &error);

bool
Process::WritePointerToMemory (lldb::addr_t vm_addr, lldb::addr_t ptr_value, Error &error);

size_t
Process::ReadScalarIntegerFromMemory (lldb::addr_t addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Error &error);

size_t
Process::WriteScalarToMemory (lldb::addr_t vm_addr, const Scalar &scalar, uint32_t size, Error &error);

in lldb_private::Process the following functions were renamed:

From:
uint64_t
Process::ReadUnsignedInteger (lldb::addr_t load_addr,
size_t byte_size,
Error &error);

To:
uint64_t
Process::ReadUnsignedIntegerFromMemory (lldb::addr_t load_addr,
size_t byte_size,
uint64_t fail_value,
Error &error);

Cleaned up a lot of code that was manually doing what the above functions do
to use the functions listed above.

Added the ability to get a scalar value as a buffer that can be written down
to a process (byte swapping the Scalar value if needed):

uint32_t
Scalar::GetAsMemoryData (void *dst,
uint32_t dst_len,
lldb::ByteOrder dst_byte_order,
Error &error) const;

The "dst_len" can be smaller that the size of the scalar and the least
significant bytes will be written. "dst_len" can also be larger and the
most significant bytes will be padded with zeroes.

Centralized the code that adds or removes address bits for callable and opcode
addresses into lldb_private::Target:

lldb::addr_t
Target::GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const;

lldb::addr_t
Target::GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const;

All necessary lldb_private::Address functions now use the target versions so
changes should only need to happen in one place if anything needs updating.

Fixed up a lot of places that were calling :

addr_t
Address::GetLoadAddress(Target*);

to call the Address::GetCallableLoadAddress() or Address::GetOpcodeLoadAddress()
as needed. There were many places in the breakpoint code where things could
go wrong for ARM if these weren't used.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
10de7d1db3ec782ea2ccda1f39c0a40b9c301594 04-May-2011 Jim Ingham <jingham@apple.com> Change "frame var" over to using OptionGroups (and thus the OptionGroupVariableObjectDisplay).
Change the boolean "use_dynamic" over to a tri-state, no-dynamic, dynamic-w/o running target,
and dynamic with running target.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
ef80aabe53b7fdf61309ba6d3d6865c94c681345 02-May-2011 Jim Ingham <jingham@apple.com> Adding support for fetching the Dynamic Value for ObjC Objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
e41494a9092e15192012a5e0a8a1ffd66c70b8bb 16-Apr-2011 Jim Ingham <jingham@apple.com> Add support for "dynamic values" for C++ classes. This currently only works for "frame var" and for the
expressions that are simple enough to get passed to the "frame var" underpinnings. The parser code will
have to be changed to also query for the dynamic types & offsets as it is looking up variables.

The behavior of "frame var" is controlled in two ways. You can pass "-d {true/false} to the frame var
command to get the dynamic or static value of the variables you are printing.

There's also a general setting:

target.prefer-dynamic-value (boolean) = 'true'

which is consulted if you call "frame var" without supplying a value for the -d option.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
0de37195f17fefb536157b3296a18999116b8125 01-Apr-2011 Jim Ingham <jingham@apple.com> Remove unneeded ExecutionContextScope variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
b344843f75ef893762c93fd0a22d2d45712ce74d 24-Mar-2011 Greg Clayton <gclayton@apple.com> Fixed the LLDB build so that we can have private types, private enums and
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
3bb825931521bc4b288274cb0b3c7f5c16c83126 18-Jan-2011 Jim Ingham <jingham@apple.com> Add a method on the ObjC Language Runtime that returns the runtime version.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
be899b43742c732292d3a50d4f59c7e1afaa0d65 17-Jan-2011 Greg Clayton <gclayton@apple.com> Another fix for the objective C runtime object checker to not use NULL when it isn't defined.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
d5d0eadc3f5798d759de2852fe62249b602e0261 17-Jan-2011 Greg Clayton <gclayton@apple.com> Fix the objective C object validator that I broke. When we have ObjC runtime
V2 and we only have gdb_class_getClass, then make sure the isa isn't NULL
before trying to call gdb_class_getClass otherwise we end up deadlocking the
objective C runtime.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
0d62dfd4974eb23f550f992e594894b96c5696d1 14-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed an error in the type map for "char **" that was a bad memory smasher.
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
6507dd90b5d27662537caee49a3a3cc236f85a53 10-Dec-2010 Jim Ingham <jingham@apple.com> Changing the ObjC find method implementation to use a ClangUtilityFunction inserted into the target. Consolidate all the
logic for finding the target of a method dispatch into this function, insert & call it. Gets calls to super, and all the
fixup & fixedup variants working properly. Also gets the class from the object so that we step through KVO wrapper methods
into the actual user code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
67dc8e72e52967cbdd8a6aeca98526f434cad10a 12-Nov-2010 Sean Callanan <scallanan@apple.com> Removed redundant code for object introspection.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
57452832fdce249dd673710c5603a9b44c672d1b 09-Nov-2010 Greg Clayton <gclayton@apple.com> Fixed an issue in the DWARF parser that was causing forward declarations
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 '$'.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
ea9d4267a629a1c732eb0400fa0288cee31ad49d 05-Nov-2010 Jim Ingham <jingham@apple.com> Added the equivalent of gdb's "unwind-on-signal" to the expression command, and a parameter to control it in ClangUserExpression, and on down to ClangFunction.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
f7731456d3d6c1fddbd1a9b3504f20b21425b857 05-Nov-2010 Sean Callanan <scallanan@apple.com> Fixed error handling when the utility functions
that check pointer validity fail to parse. Now
lldb does not crash in that case. Also added
support for checking Objective-C class validity
in the Version 1 runtime as well as Version 2
runtimes with varying levels of available debug
support.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
2eac2b9b61bfbe6079bab86e879263d63046ac0a 04-Nov-2010 Jim Ingham <jingham@apple.com> Add a ObjC V1 runtime, and a generic AppleObjCRuntime plugin.

Also move the Checker creation into the Apple Runtime code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp