[Lldb-commits] [lldb] r161482 - in /lldb/branches/apple/python-GIL: ./ examples/summaries/cocoa/ include/lldb/Core/ include/lldb/Target/ lldb.xcodeproj/ resources/ source/Commands/ source/Core/ source/Expression/ source/Host/macosx/launcherXPCService/ source/Interpreter/ source/Plugins/Disassembler/llvm/ source/Target/ test/ test/functionalities/breakpoint/breakpoint_command/ test/plugins/ tools/debugserver/debugserver.xcodeproj/ www/

Filipe Cabecinhas me at filcab.net
Wed Aug 8 02:20:15 PDT 2012


Author: filcab
Date: Wed Aug  8 04:20:15 2012
New Revision: 161482

URL: http://llvm.org/viewvc/llvm-project?rev=161482&view=rev
Log:
Merge changes from ToT trunk.

Added:
    lldb/branches/apple/python-GIL/include/lldb/Core/cxa_demangle.h
      - copied unchanged from r161293, lldb/trunk/include/lldb/Core/cxa_demangle.h
    lldb/branches/apple/python-GIL/source/Core/cxa_demangle.cpp
      - copied, changed from r161293, lldb/trunk/source/Core/cxa_demangle.cpp
    lldb/branches/apple/python-GIL/test/plugins/builder_freebsd9.py
      - copied unchanged from r161467, lldb/trunk/test/plugins/builder_freebsd9.py
Modified:
    lldb/branches/apple/python-GIL/   (props changed)
    lldb/branches/apple/python-GIL/examples/summaries/cocoa/objc_runtime.py
    lldb/branches/apple/python-GIL/include/lldb/Core/Disassembler.h
    lldb/branches/apple/python-GIL/include/lldb/Core/Opcode.h
    lldb/branches/apple/python-GIL/include/lldb/Target/Process.h
    lldb/branches/apple/python-GIL/include/lldb/Target/ThreadPlanTracer.h
    lldb/branches/apple/python-GIL/lldb.xcodeproj/project.pbxproj
    lldb/branches/apple/python-GIL/resources/LLDB-Info.plist
    lldb/branches/apple/python-GIL/source/Commands/CommandObjectBreakpointCommand.cpp
    lldb/branches/apple/python-GIL/source/Commands/CommandObjectCommands.cpp
    lldb/branches/apple/python-GIL/source/Commands/CommandObjectDisassemble.cpp
    lldb/branches/apple/python-GIL/source/Commands/CommandObjectType.cpp
    lldb/branches/apple/python-GIL/source/Core/ArchSpec.cpp
    lldb/branches/apple/python-GIL/source/Core/Disassembler.cpp
    lldb/branches/apple/python-GIL/source/Core/FormatManager.cpp
    lldb/branches/apple/python-GIL/source/Core/Mangled.cpp
    lldb/branches/apple/python-GIL/source/Core/Opcode.cpp
    lldb/branches/apple/python-GIL/source/Core/ValueObject.cpp
    lldb/branches/apple/python-GIL/source/Expression/ClangExpressionParser.cpp
    lldb/branches/apple/python-GIL/source/Expression/ClangFunction.cpp
    lldb/branches/apple/python-GIL/source/Expression/ClangUserExpression.cpp
    lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist
    lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist
    lldb/branches/apple/python-GIL/source/Interpreter/CommandInterpreter.cpp
    lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupValueObjectDisplay.cpp
    lldb/branches/apple/python-GIL/source/Interpreter/ScriptInterpreterPython.cpp
    lldb/branches/apple/python-GIL/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
    lldb/branches/apple/python-GIL/source/Target/Target.cpp
    lldb/branches/apple/python-GIL/source/Target/ThreadPlanTracer.cpp
    lldb/branches/apple/python-GIL/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
    lldb/branches/apple/python-GIL/test/lldbtest.py
    lldb/branches/apple/python-GIL/tools/debugserver/debugserver.xcodeproj/project.pbxproj
    lldb/branches/apple/python-GIL/www/python-reference.html
    lldb/branches/apple/python-GIL/www/varformats.html

Propchange: lldb/branches/apple/python-GIL/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug  8 04:20:15 2012
@@ -1 +1 @@
-/lldb/trunk:156467-161091
+/lldb/trunk:156467-161467

Modified: lldb/branches/apple/python-GIL/examples/summaries/cocoa/objc_runtime.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/examples/summaries/cocoa/objc_runtime.py?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/examples/summaries/cocoa/objc_runtime.py (original)
+++ lldb/branches/apple/python-GIL/examples/summaries/cocoa/objc_runtime.py Wed Aug  8 04:20:15 2012
@@ -220,7 +220,7 @@
 	def check_valid(self):
 		logger = lldb.formatters.Logger.Logger()
 		self.valid = 1
-	
+
 		self.isaPointer = Utilities.read_child_of(self.valobj,0,self.sys_params.types_cache.addr_ptr_type)
 		if not(Utilities.is_valid_pointer(self.isaPointer,self.sys_params.pointer_size,allow_tagged=0)):
 			logger >> "Marking as invalid - isaPointer is invalid"
@@ -461,7 +461,7 @@
 		self.val = (pointer & ~0x0000000000000000FF) >> 8
 		self.class_bits = (pointer & 0xE) >> 1
 		self.i_bits = (pointer & 0xF0) >> 4
-		
+
 		if self.sys_params.is_lion:
 			if self.class_bits in TaggedClass_Values_Lion:
 				self.name = TaggedClass_Values_Lion[self.class_bits]
@@ -522,7 +522,7 @@
 	def is_valid(self):
 		return 0
 
- at functools.total_ordering
+
 class Version:
 	def __init__(self, major, minor, release, build_string):
 		self._major = major
@@ -561,6 +561,18 @@
 		       (self.release == other.release) and \
 		       (self.build_string == other.build_string)
 
+	# Python 2.6 doesn't have functools.total_ordering, so we have to implement
+	# other comparators
+	def __gt__(self, other):
+		return other < self
+
+	def __le__(self, other):
+		return not other < self
+
+	def __ge__(self, other):
+		return not self < other
+
+
 runtime_version = lldb.formatters.cache.Cache()
 os_version = lldb.formatters.cache.Cache()
 types_caches = lldb.formatters.cache.Cache()
@@ -578,22 +590,22 @@
 		global os_version
 		global types_caches
 		global isa_caches
-		
+
 		process = valobj.GetTarget().GetProcess()
 		self.pid = process.GetProcessID()
-		
+
 		if runtime_version.look_for_key(self.pid):
 			self.runtime_version = runtime_version.get_value(self.pid)
 		else:
 			self.runtime_version = ObjCRuntime.runtime_version(process)
 			runtime_version.add_item(self.pid,self.runtime_version)
-		
+
 		if os_version.look_for_key(self.pid):
 			self.is_lion = os_version.get_value(self.pid)
 		else:
 			self.is_lion = Utilities.check_is_osx_lion(valobj.GetTarget())
 			os_version.add_item(self.pid,self.is_lion)
-		
+
 		if types_caches.look_for_key(self.pid):
 			self.types_cache = types_caches.get_value(self.pid)
 		else:
@@ -602,7 +614,7 @@
 			self.types_cache.addr_ptr_type = self.types_cache.addr_type.GetPointerType()
 			self.types_cache.uint32_t = valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedInt)
 			types_caches.add_item(self.pid,self.types_cache)
-		
+
 		if isa_caches.look_for_key(self.pid):
 			self.isa_cache = isa_caches.get_value(self.pid)
 		else:

Modified: lldb/branches/apple/python-GIL/include/lldb/Core/Disassembler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/include/lldb/Core/Disassembler.h?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/include/lldb/Core/Disassembler.h (original)
+++ lldb/branches/apple/python-GIL/include/lldb/Core/Disassembler.h Wed Aug  8 04:20:15 2012
@@ -233,6 +233,7 @@
 };
 
 class Disassembler :
+    public STD_ENABLE_SHARED_FROM_THIS(Disassembler),
     public PluginInterface
 {
 public:
@@ -246,7 +247,7 @@
         eOptionMarkPCAddress    = (1u << 3)  // Mark the disassembly line the contains the PC
     };
 
-    static Disassembler*
+    static lldb::DisassemblerSP
     FindPlugin (const ArchSpec &arch, const char *plugin_name);
 
     static lldb::DisassemblerSP

Modified: lldb/branches/apple/python-GIL/include/lldb/Core/Opcode.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/include/lldb/Core/Opcode.h?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/include/lldb/Core/Opcode.h (original)
+++ lldb/branches/apple/python-GIL/include/lldb/Core/Opcode.h Wed Aug  8 04:20:15 2012
@@ -33,6 +33,7 @@
             eTypeInvalid,
             eType8,
             eType16,
+            eType16_2, // a 32-bit Thumb instruction, made up of two words
             eType32,
             eType64,
             eTypeBytes
@@ -86,6 +87,7 @@
             case Opcode::eTypeInvalid:  break;
             case Opcode::eType8:        return m_data.inst8;
             case Opcode::eType16:       break;
+            case Opcode::eType16_2:     break;
             case Opcode::eType32:       break;
             case Opcode::eType64:       break;
             case Opcode::eTypeBytes:    break;
@@ -102,6 +104,7 @@
             case Opcode::eTypeInvalid:  break;
             case Opcode::eType8:        return m_data.inst8;
             case Opcode::eType16:       return m_data.inst16;
+            case Opcode::eType16_2:     break;
             case Opcode::eType32:       break;
             case Opcode::eType64:       break;
             case Opcode::eTypeBytes:    break;
@@ -117,6 +120,7 @@
             case Opcode::eTypeInvalid:  break;
             case Opcode::eType8:        return m_data.inst8;
             case Opcode::eType16:       return m_data.inst16;
+            case Opcode::eType16_2:     // passthrough
             case Opcode::eType32:       return m_data.inst32;
             case Opcode::eType64:       break;
             case Opcode::eTypeBytes:    break;
@@ -132,6 +136,7 @@
             case Opcode::eTypeInvalid:  break;
             case Opcode::eType8:        return m_data.inst8;
             case Opcode::eType16:       return m_data.inst16;
+            case Opcode::eType16_2:     // passthrough
             case Opcode::eType32:       return m_data.inst32;
             case Opcode::eType64:       return m_data.inst64;
             case Opcode::eTypeBytes:    break;
@@ -152,6 +157,13 @@
             m_type = eType16;
             m_data.inst16 = inst;
         }
+        
+        void
+        SetOpcode16_2 (uint32_t inst)
+        {
+            m_type = eType16_2;
+            m_data.inst32 = inst;
+        }
 
         void
         SetOpcode32 (uint32_t inst)
@@ -203,6 +215,7 @@
             case Opcode::eTypeInvalid: break;
             case Opcode::eType8:     return sizeof(m_data.inst8);
             case Opcode::eType16:    return sizeof(m_data.inst16);
+            case Opcode::eType16_2:  // passthrough
             case Opcode::eType32:    return sizeof(m_data.inst32);
             case Opcode::eType64:    return sizeof(m_data.inst64);
             case Opcode::eTypeBytes: return m_data.inst.length;
@@ -212,8 +225,7 @@
         
         // Get the opcode exactly as it would be laid out in memory.
         uint32_t
-        GetData (DataExtractor &data,
-                 lldb::AddressClass address_class) const;
+        GetData (DataExtractor &data) const;
 
     protected:
 
@@ -227,6 +239,7 @@
                 case Opcode::eTypeInvalid: break;
                 case Opcode::eType8:     return &m_data.inst8;
                 case Opcode::eType16:    return &m_data.inst16;
+                case Opcode::eType16_2:  // passthrough
                 case Opcode::eType32:    return &m_data.inst32;
                 case Opcode::eType64:    return &m_data.inst64;
                 case Opcode::eTypeBytes: return m_data.inst.bytes;

Modified: lldb/branches/apple/python-GIL/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/include/lldb/Target/Process.h?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/include/lldb/Target/Process.h (original)
+++ lldb/branches/apple/python-GIL/include/lldb/Target/Process.h Wed Aug  8 04:20:15 2012
@@ -1212,6 +1212,12 @@
         return m_stop_id != UINT32_MAX;
     }
     
+    bool
+    IsLastResumeForUserExpression () const
+    {
+        return m_resume_id == m_last_user_expression_resume;
+    }
+    
     void
     SetRunningUserExpression (bool on)
     {

Modified: lldb/branches/apple/python-GIL/include/lldb/Target/ThreadPlanTracer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/include/lldb/Target/ThreadPlanTracer.h?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/include/lldb/Target/ThreadPlanTracer.h (original)
+++ lldb/branches/apple/python-GIL/include/lldb/Target/ThreadPlanTracer.h Wed Aug  8 04:20:15 2012
@@ -120,7 +120,7 @@
     TypeFromUser
     GetIntPointerType();
 
-    std::auto_ptr<Disassembler> m_disassembler_ap;
+    lldb::DisassemblerSP    m_disassembler_sp;
     TypeFromUser            m_intptr_type;
     std::vector<RegisterValue> m_register_values;
     lldb::DataBufferSP      m_buffer_sp;

Modified: lldb/branches/apple/python-GIL/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/lldb.xcodeproj/project.pbxproj?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/branches/apple/python-GIL/lldb.xcodeproj/project.pbxproj Wed Aug  8 04:20:15 2012
@@ -512,6 +512,7 @@
 		AFF87C89150FF672000E1742 /* com.apple.debugserver-secure.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = AFF87C88150FF672000E1742 /* com.apple.debugserver-secure.plist */; };
 		AFF87C8F150FF688000E1742 /* com.apple.debugserver.applist.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = AFF87C8E150FF688000E1742 /* com.apple.debugserver.applist.plist */; };
 		B207C4931429607D00F36E4E /* CommandObjectWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B207C4921429607D00F36E4E /* CommandObjectWatchpoint.cpp */; };
+		B21EB71515CC99F100E60059 /* cxa_demangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B21EB71415CC99F100E60059 /* cxa_demangle.cpp */; settings = {COMPILER_FLAGS = "-frtti"; }; };
 		B2462247141AD37D00F3D409 /* OptionGroupWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2462246141AD37D00F3D409 /* OptionGroupWatchpoint.cpp */; };
 		B271B11413D6139300C3FEDB /* FormatClasses.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94A9112D13D5DF210046D8A6 /* FormatClasses.cpp */; };
 		B27318421416AC12006039C8 /* WatchpointList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27318411416AC12006039C8 /* WatchpointList.cpp */; };
@@ -1538,6 +1539,8 @@
 		AFF87C8E150FF688000E1742 /* com.apple.debugserver.applist.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.apple.debugserver.applist.plist; path = tools/debugserver/source/com.apple.debugserver.applist.plist; sourceTree = "<group>"; };
 		B207C4921429607D00F36E4E /* CommandObjectWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectWatchpoint.cpp; path = source/Commands/CommandObjectWatchpoint.cpp; sourceTree = "<group>"; };
 		B207C4941429609C00F36E4E /* CommandObjectWatchpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectWatchpoint.h; path = source/Commands/CommandObjectWatchpoint.h; sourceTree = "<group>"; };
+		B21EB71415CC99F100E60059 /* cxa_demangle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cxa_demangle.cpp; path = source/Core/cxa_demangle.cpp; sourceTree = "<group>"; };
+		B21EB71815CC9B7500E60059 /* cxa_demangle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = cxa_demangle.h; path = include/lldb/Core/cxa_demangle.h; sourceTree = "<group>"; };
 		B23DD24F12EDFAC1000C3894 /* ARMUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMUtils.h; path = Utility/ARMUtils.h; sourceTree = "<group>"; };
 		B2462246141AD37D00F3D409 /* OptionGroupWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupWatchpoint.cpp; path = source/Interpreter/OptionGroupWatchpoint.cpp; sourceTree = "<group>"; };
 		B2462248141AD39B00F3D409 /* OptionGroupWatchpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupWatchpoint.h; path = include/lldb/Interpreter/OptionGroupWatchpoint.h; sourceTree = "<group>"; };
@@ -2399,7 +2402,9 @@
 				26BC7D6810F1B77400F91463 /* Log.h */,
 				26BC7E7F10F1B85900F91463 /* Log.cpp */,
 				26BC7D6910F1B77400F91463 /* Mangled.h */,
+				B21EB71815CC9B7500E60059 /* cxa_demangle.h */,
 				26BC7E8010F1B85900F91463 /* Mangled.cpp */,
+				B21EB71415CC99F100E60059 /* cxa_demangle.cpp */,
 				2682100C143A59AE004BCF2D /* MappedHash.h */,
 				26BC7D6A10F1B77400F91463 /* Module.h */,
 				26BC7E8110F1B85900F91463 /* Module.cpp */,
@@ -3922,6 +3927,7 @@
 				2694E99D14FC0BB30076DE67 /* PlatformFreeBSD.cpp in Sources */,
 				2694E9A414FC0BBD0076DE67 /* PlatformLinux.cpp in Sources */,
 				26B1EFAE154638AF00E2DAC7 /* DWARFDeclContext.cpp in Sources */,
+				B21EB71515CC99F100E60059 /* cxa_demangle.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -4194,9 +4200,9 @@
 				CLANG_LINK_OBJC_RUNTIME = NO;
 				CLANG_OBJC_RUNTIME = NO;
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 163;
+				DYLIB_CURRENT_VERSION = 165;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4253,10 +4259,10 @@
 				CLANG_LINK_OBJC_RUNTIME = NO;
 				CLANG_OBJC_RUNTIME = NO;
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
 				DEAD_CODE_STRIPPING = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 163;
+				DYLIB_CURRENT_VERSION = 165;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4313,7 +4319,7 @@
 				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
 				DEBUGGING_SYMBOLS = YES;
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -4340,7 +4346,7 @@
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.7;
@@ -4358,7 +4364,7 @@
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.7;
@@ -4373,8 +4379,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 163;
-				DYLIB_CURRENT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
+				DYLIB_CURRENT_VERSION = 165;
 				EXECUTABLE_EXTENSION = a;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4404,8 +4410,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 163;
-				DYLIB_CURRENT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
+				DYLIB_CURRENT_VERSION = 165;
 				EXECUTABLE_EXTENSION = a;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4435,8 +4441,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 163;
-				DYLIB_CURRENT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
+				DYLIB_CURRENT_VERSION = 165;
 				EXECUTABLE_EXTENSION = a;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4526,7 +4532,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4567,10 +4573,10 @@
 				CLANG_OBJC_RUNTIME = NO;
 				COMBINE_HIDPI_IMAGES = YES;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
 				DEAD_CODE_STRIPPING = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 163;
+				DYLIB_CURRENT_VERSION = 165;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4886,7 +4892,7 @@
 		26F5C26C10F3D9A5009D5894 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				CURRENT_PROJECT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4916,7 +4922,7 @@
 		26F5C26D10F3D9A5009D5894 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				CURRENT_PROJECT_VERSION = 163;
+				CURRENT_PROJECT_VERSION = 165;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",

Modified: lldb/branches/apple/python-GIL/resources/LLDB-Info.plist
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/resources/LLDB-Info.plist?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/resources/LLDB-Info.plist (original)
+++ lldb/branches/apple/python-GIL/resources/LLDB-Info.plist Wed Aug  8 04:20:15 2012
@@ -17,7 +17,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>163</string>
+	<string>165</string>
 	<key>CFBundleName</key>
 	<string>${EXECUTABLE_NAME}</string>
 </dict>

Modified: lldb/branches/apple/python-GIL/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Commands/CommandObjectBreakpointCommand.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Commands/CommandObjectBreakpointCommand.cpp Wed Aug  8 04:20:15 2012
@@ -558,7 +558,7 @@
                         else if (m_options.m_function_name.size())
                         {
                             std::string oneliner(m_options.m_function_name);
-                            oneliner += "(frame, bp_loc, dict)";
+                            oneliner += "(frame, bp_loc, internal_dict)";
                             m_interpreter.GetScriptInterpreter()->SetBreakpointCommandCallback (bp_options,
                                                                                                 oneliner.c_str());
                         }

Modified: lldb/branches/apple/python-GIL/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Commands/CommandObjectCommands.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Commands/CommandObjectCommands.cpp Wed Aug  8 04:20:15 2012
@@ -330,7 +330,7 @@
 
 static const char *g_python_command_instructions =   "Enter your Python command(s). Type 'DONE' to end.\n"
                                                      "You must define a Python function with this signature:\n"
-                                                     "def my_command_impl(debugger, args, result, dict):";
+                                                     "def my_command_impl(debugger, args, result, internal_dict):";
 
 
 class CommandObjectCommandsAlias : public CommandObjectRaw

Modified: lldb/branches/apple/python-GIL/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Commands/CommandObjectDisassemble.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Commands/CommandObjectDisassemble.cpp Wed Aug  8 04:20:15 2012
@@ -243,7 +243,7 @@
     }
 
     const char *plugin_name = m_options.GetPluginName ();
-    Disassembler *disassembler = Disassembler::FindPlugin(m_options.arch, plugin_name);
+    DisassemblerSP disassembler = Disassembler::FindPlugin(m_options.arch, plugin_name);
 
     if (disassembler == NULL)
     {

Modified: lldb/branches/apple/python-GIL/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Commands/CommandObjectType.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Commands/CommandObjectType.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Commands/CommandObjectType.cpp Wed Aug  8 04:20:15 2012
@@ -742,7 +742,7 @@
 //-------------------------------------------------------------------------
 
 static const char *g_summary_addreader_instructions = "Enter your Python command(s). Type 'DONE' to end.\n"
-                                                       "def function (valobj,dict):";
+                                                       "def function (valobj,internal_dict):";
 
 class TypeScriptAddInputReader : public InputReaderEZ
 {
@@ -1050,7 +1050,7 @@
             return false;
         }
         
-        std::string code = ("     " + m_options.m_python_function + "(valobj,dict)");
+        std::string code = ("     " + m_options.m_python_function + "(valobj,internal_dict)");
         
         script_format.reset(new ScriptSummaryFormat(m_options.m_flags,
                                                     funct_name,

Modified: lldb/branches/apple/python-GIL/source/Core/ArchSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Core/ArchSpec.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/ArchSpec.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/ArchSpec.cpp Wed Aug  8 04:20:15 2012
@@ -16,6 +16,7 @@
 #include "llvm/Support/ELF.h"
 #include "llvm/Support/Host.h"
 #include "llvm/Support/MachO.h"
+#include "lldb/Core/RegularExpression.h"
 #include "lldb/Host/Endian.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Target/Platform.h"
@@ -487,6 +488,44 @@
 {
     if (triple_cstr && triple_cstr[0])
     {
+        if (isdigit(triple_cstr[0]))
+        {
+            // Accept "12-10" or "12.10" as cpu type/subtype
+            char *end = NULL;
+            uint32_t cpu = ::strtoul (triple_cstr, &end, 0);
+            if (cpu != 0 && end && ((*end == '-') || (*end == '.')))
+            {
+                uint32_t sub = ::strtoul (end + 1, &end, 0);
+                if (sub != 0 && end && ((*end == '-') || (*end == '.') || (*end == '\0')))
+                {
+                    if (SetArchitecture (eArchTypeMachO, cpu, sub))
+                    {
+                        if (*end == '-')
+                        {
+                            llvm::StringRef vendor_os (end + 1);
+                            size_t dash_pos = vendor_os.find('-');
+                            if (dash_pos != llvm::StringRef::npos)
+                            {
+                                llvm::StringRef vendor_str(vendor_os.substr(0, dash_pos));
+                                m_triple.setVendorName(vendor_str);
+                                const size_t vendor_start_pos = dash_pos+1;
+                                dash_pos = vendor_os.find(vendor_start_pos, '-');
+                                if (dash_pos == llvm::StringRef::npos)
+                                {
+                                    if (vendor_start_pos < vendor_os.size())
+                                        m_triple.setOSName(vendor_os.substr(vendor_start_pos));
+                                }
+                                else
+                                {
+                                    m_triple.setOSName(vendor_os.substr(vendor_start_pos, dash_pos - vendor_start_pos));
+                                }
+                            }
+                        }
+                        return true;
+                    }
+                }
+            }
+        }
         llvm::StringRef triple_stref (triple_cstr);
         if (triple_stref.startswith (LLDB_ARCH_DEFAULT))
         {

Modified: lldb/branches/apple/python-GIL/source/Core/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Core/Disassembler.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/Disassembler.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/Disassembler.cpp Wed Aug  8 04:20:15 2012
@@ -37,7 +37,7 @@
 using namespace lldb_private;
 
 
-Disassembler*
+DisassemblerSP
 Disassembler::FindPlugin (const ArchSpec &arch, const char *plugin_name)
 {
     Timer scoped_timer (__PRETTY_FUNCTION__,
@@ -45,7 +45,6 @@
                         arch.GetArchitectureName(),
                         plugin_name);
 
-    std::auto_ptr<Disassembler> disassembler_ap;
     DisassemblerCreateInstance create_callback = NULL;
     
     if (plugin_name)
@@ -53,23 +52,23 @@
         create_callback = PluginManager::GetDisassemblerCreateCallbackForPluginName (plugin_name);
         if (create_callback)
         {
-            disassembler_ap.reset (create_callback(arch));
+            DisassemblerSP disassembler_sp(create_callback(arch));
             
-            if (disassembler_ap.get())
-                return disassembler_ap.release();
+            if (disassembler_sp.get())
+                return disassembler_sp;
         }
     }
     else
     {
         for (uint32_t idx = 0; (create_callback = PluginManager::GetDisassemblerCreateCallbackAtIndex(idx)) != NULL; ++idx)
         {
-            disassembler_ap.reset (create_callback(arch));
+            DisassemblerSP disassembler_sp(create_callback(arch));
 
-            if (disassembler_ap.get())
-                return disassembler_ap.release();
+            if (disassembler_sp.get())
+                return disassembler_sp;
         }
     }
-    return NULL;
+    return DisassemblerSP();
 }
 
 
@@ -221,7 +220,7 @@
     lldb::DisassemblerSP disasm_sp;
     if (range.GetByteSize() > 0 && range.GetBaseAddress().IsValid())
     {
-        disasm_sp.reset (Disassembler::FindPlugin(arch, plugin_name));
+        disasm_sp = Disassembler::FindPlugin(arch, plugin_name);
 
         if (disasm_sp)
         {
@@ -248,7 +247,7 @@
     
     if (bytes)
     {
-        disasm_sp.reset(Disassembler::FindPlugin(arch, plugin_name));
+        disasm_sp = Disassembler::FindPlugin(arch, plugin_name);
         
         if (disasm_sp)
         {
@@ -282,19 +281,19 @@
 {
     if (disasm_range.GetByteSize())
     {
-        std::auto_ptr<Disassembler> disasm_ap (Disassembler::FindPlugin(arch, plugin_name));
+        lldb::DisassemblerSP disasm_sp (Disassembler::FindPlugin(arch, plugin_name));
 
-        if (disasm_ap.get())
+        if (disasm_sp.get())
         {
             AddressRange range;
             ResolveAddress (exe_ctx, disasm_range.GetBaseAddress(), range.GetBaseAddress());
             range.SetByteSize (disasm_range.GetByteSize());
             
-            size_t bytes_disassembled = disasm_ap->ParseInstructions (&exe_ctx, range, &strm);
+            size_t bytes_disassembled = disasm_sp->ParseInstructions (&exe_ctx, range, &strm);
             if (bytes_disassembled == 0)
                 return false;
 
-            return PrintInstructions (disasm_ap.get(),
+            return PrintInstructions (disasm_sp.get(),
                                       debugger,
                                       arch,
                                       exe_ctx,
@@ -323,16 +322,16 @@
 {
     if (num_instructions > 0)
     {
-        std::auto_ptr<Disassembler> disasm_ap (Disassembler::FindPlugin(arch, plugin_name));
-        if (disasm_ap.get())
+        lldb::DisassemblerSP disasm_sp (Disassembler::FindPlugin(arch, plugin_name));
+        if (disasm_sp.get())
         {
             Address addr;
             ResolveAddress (exe_ctx, start_address, addr);
 
-            size_t bytes_disassembled = disasm_ap->ParseInstructions (&exe_ctx, addr, num_instructions);
+            size_t bytes_disassembled = disasm_sp->ParseInstructions (&exe_ctx, addr, num_instructions);
             if (bytes_disassembled == 0)
                 return false;
-            return PrintInstructions (disasm_ap.get(),
+            return PrintInstructions (disasm_sp.get(),
                                       debugger,
                                       arch,
                                       exe_ctx,
@@ -894,7 +893,7 @@
 uint32_t
 Instruction::GetData (DataExtractor &data)
 {
-    return m_opcode.GetData(data, GetAddressClass ());
+    return m_opcode.GetData(data);
 }
 
 InstructionList::InstructionList() :

Modified: lldb/branches/apple/python-GIL/source/Core/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Core/FormatManager.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/FormatManager.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/FormatManager.cpp Wed Aug  8 04:20:15 2012
@@ -772,7 +772,7 @@
     .SetHideItemNames(false);
     
 #ifndef LLDB_DISABLE_PYTHON
-    std::string code("     lldb.formatters.cpp.libcxx.stdstring_SummaryProvider(valobj,dict)");
+    std::string code("     lldb.formatters.cpp.libcxx.stdstring_SummaryProvider(valobj,internal_dict)");
     lldb::TypeSummaryImplSP std_string_summary_sp(new ScriptSummaryFormat(stl_summary_flags, "lldb.formatters.cpp.libcxx.stdstring_SummaryProvider",code.c_str()));
     
     TypeCategoryImpl::SharedPointer libcxx_category_sp = GetCategory(m_libcxx_category_name);
@@ -868,7 +868,7 @@
 {
     
     std::string code("     ");
-    code.append(funct_name).append("(valobj,dict)");
+    code.append(funct_name).append("(valobj,internal_dict)");
     
     lldb::TypeSummaryImplSP summary_sp(new ScriptSummaryFormat(flags,
                                                                funct_name,

Modified: lldb/branches/apple/python-GIL/source/Core/Mangled.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Core/Mangled.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/Mangled.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/Mangled.cpp Wed Aug  8 04:20:15 2012
@@ -7,7 +7,17 @@
 //
 //===----------------------------------------------------------------------===//
 
+
+#if defined(__APPLE__)
+#define USE_BUILTIN_LIBCXXABI_DEMANGLER 1
+#endif
+
+#if defined(USE_BUILTIN_LIBCXXABI_DEMANGLER)
+#include "lldb/Core/cxa_demangle.h"
+#else
 #include <cxxabi.h>
+#endif
+
 
 #include "llvm/ADT/DenseMap.h"
 
@@ -194,7 +204,11 @@
             {
                 // We didn't already mangle this name, demangle it and if all goes well
                 // add it to our map.
+#if defined(USE_BUILTIN_LIBCXXABI_DEMANGLER)
+                char *demangled_name = lldb_cxxabiv1::__cxa_demangle (mangled_cstr, NULL, NULL, NULL);
+#else
                 char *demangled_name = abi::__cxa_demangle (mangled_cstr, NULL, NULL, NULL);
+#endif
 
                 if (demangled_name)
                 {

Modified: lldb/branches/apple/python-GIL/source/Core/Opcode.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Core/Opcode.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/Opcode.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/Opcode.cpp Wed Aug  8 04:20:15 2012
@@ -40,7 +40,7 @@
     case Opcode::eType16:
         bytes_written = s->Printf ("0x%4.4x", m_data.inst16); 
         break;
-
+    case Opcode::eType16_2:
     case Opcode::eType32:
         bytes_written = s->Printf ("0x%8.8x", m_data.inst32); 
         break;
@@ -76,6 +76,7 @@
         case Opcode::eTypeInvalid: break;
         case Opcode::eType8:
         case Opcode::eType16:
+        case Opcode::eType16_2:
         case Opcode::eType32:
         case Opcode::eType64:    return lldb::endian::InlHostByteOrder();
         case Opcode::eTypeBytes:
@@ -85,7 +86,7 @@
 }
 
 uint32_t
-Opcode::GetData (DataExtractor &data, lldb::AddressClass address_class) const
+Opcode::GetData (DataExtractor &data) const
 {
     uint32_t byte_size = GetByteSize ();
     
@@ -99,27 +100,20 @@
                 
             case Opcode::eType8:    buffer_sp.reset (new DataBufferHeap (&m_data.inst8,  byte_size)); break;
             case Opcode::eType16:   buffer_sp.reset (new DataBufferHeap (&m_data.inst16, byte_size)); break;
-            case Opcode::eType32:
+            case Opcode::eType16_2:
                 {
-                    // The only thing that uses eAddressClassCodeAlternateISA currently
-                    // is Thumb. If this ever changes, we will need to pass in more
-                    // information like an additional "const ArchSpec &arch". For now
-                    // this will do
-                    if (address_class == eAddressClassCodeAlternateISA)
-                    {
-                        // 32 bit thumb instruction, we need to sizzle this a bit
-                        uint8_t buf[4];
-                        buf[0] = m_data.inst.bytes[2];
-                        buf[1] = m_data.inst.bytes[3];
-                        buf[2] = m_data.inst.bytes[0];
-                        buf[3] = m_data.inst.bytes[1];
-                        buffer_sp.reset (new DataBufferHeap (buf, byte_size));
-                        break;
-                    }
-                    buffer_sp.reset (new DataBufferHeap (&m_data.inst32, byte_size));
+                    // 32 bit thumb instruction, we need to sizzle this a bit
+                    uint8_t buf[4];
+                    buf[0] = m_data.inst.bytes[2];
+                    buf[1] = m_data.inst.bytes[3];
+                    buf[2] = m_data.inst.bytes[0];
+                    buf[3] = m_data.inst.bytes[1];
+                    buffer_sp.reset (new DataBufferHeap (buf, byte_size));
                 }
                 break;
-
+            case Opcode::eType32:
+                buffer_sp.reset (new DataBufferHeap (&m_data.inst32, byte_size));
+                break;
             case Opcode::eType64:   buffer_sp.reset (new DataBufferHeap (&m_data.inst64, byte_size)); break;
             case Opcode::eTypeBytes:buffer_sp.reset (new DataBufferHeap (GetOpcodeBytes(), byte_size)); break;
                 break;

Modified: lldb/branches/apple/python-GIL/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Core/ValueObject.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/ValueObject.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/ValueObject.cpp Wed Aug  8 04:20:15 2012
@@ -843,6 +843,7 @@
                     ModuleSP module_sp (GetModule());
                     if (module_sp)
                     {
+                        addr = addr + offset;
                         Address so_addr;
                         module_sp->ResolveFileAddress(addr, so_addr);
                         ExecutionContext exe_ctx (GetExecutionContextRef());
@@ -2020,7 +2021,9 @@
     {
         // We haven't made a synthetic array member for expression yet, so
         // lets make one and cache it for any future reference.
-        synthetic_child_sp = GetValueForExpressionPath(expression);
+        synthetic_child_sp = GetValueForExpressionPath(expression,
+                                                       NULL, NULL, NULL,
+                                                       GetValueForExpressionPathOptions().DontAllowSyntheticChildren());
         
         // Cache the value if we got one back...
         if (synthetic_child_sp.get())
@@ -2486,10 +2489,14 @@
                     else if (options.m_no_synthetic_children == false) // let's try with synthetic children
                     {
                         if (root->IsSynthetic())
-                            child_valobj_sp = root;
-                        else
-                            child_valobj_sp = root->GetSyntheticValue();
-                        
+                        {
+                            *first_unparsed = expression_cstr;
+                            *reason_to_stop = ValueObject::eExpressionPathScanEndReasonNoSuchChild;
+                            *final_result = ValueObject::eExpressionPathEndResultTypeInvalid;
+                            return ValueObjectSP();
+                        }
+
+                        child_valobj_sp = root->GetSyntheticValue();
                         if (child_valobj_sp.get())
                             child_valobj_sp = child_valobj_sp->GetChildMemberWithName(child_name, true);
                     }
@@ -2524,6 +2531,14 @@
                     }
                     else if (options.m_no_synthetic_children == false) // let's try with synthetic children
                     {
+                        if (root->IsSynthetic())
+                        {
+                            *first_unparsed = expression_cstr;
+                            *reason_to_stop = ValueObject::eExpressionPathScanEndReasonNoSuchChild;
+                            *final_result = ValueObject::eExpressionPathEndResultTypeInvalid;
+                            return ValueObjectSP();
+                        }
+                        
                         child_valobj_sp = root->GetSyntheticValue(true);
                         if (child_valobj_sp)
                             child_valobj_sp = child_valobj_sp->GetChildMemberWithName(child_name, true);

Copied: lldb/branches/apple/python-GIL/source/Core/cxa_demangle.cpp (from r161293, lldb/trunk/source/Core/cxa_demangle.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Core/cxa_demangle.cpp?p2=lldb/branches/apple/python-GIL/source/Core/cxa_demangle.cpp&p1=lldb/trunk/source/Core/cxa_demangle.cpp&r1=161293&r2=161482&rev=161482&view=diff
==============================================================================
--- lldb/trunk/source/Core/cxa_demangle.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/cxa_demangle.cpp Wed Aug  8 04:20:15 2012
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "cxa_demangle.h"
+#include "lldb/Core/cxa_demangle.h"
 
 #include <stdlib.h>
 #include <string.h>

Modified: lldb/branches/apple/python-GIL/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Expression/ClangExpressionParser.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Expression/ClangExpressionParser.cpp Wed Aug  8 04:20:15 2012
@@ -754,7 +754,7 @@
     
     ArchSpec arch(target->GetArchitecture());
     
-    Disassembler *disassembler = Disassembler::FindPlugin(arch, NULL);
+    lldb::DisassemblerSP disassembler = Disassembler::FindPlugin(arch, NULL);
     
     if (disassembler == NULL)
     {

Modified: lldb/branches/apple/python-GIL/source/Expression/ClangFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Expression/ClangFunction.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Expression/ClangFunction.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Expression/ClangFunction.cpp Wed Aug  8 04:20:15 2012
@@ -504,13 +504,23 @@
     
     call_plan_sp->SetPrivate(true);
     
-    return exe_ctx.GetProcessRef().RunThreadPlan (exe_ctx, call_plan_sp, 
-                                                  stop_others, 
-                                                  try_all_threads, 
-                                                  discard_on_error,
-                                                  single_thread_timeout_usec, 
-                                                  errors);
-}  
+    // <rdar://problem/12027563> we need to make sure we record the fact that we are running an expression here
+    // otherwise this fact will fail to be recorded when fetching an Objective-C object description
+    if (exe_ctx.GetProcessPtr())
+        exe_ctx.GetProcessPtr()->SetRunningUserExpression(true);
+    
+    ExecutionResults results = exe_ctx.GetProcessRef().RunThreadPlan (exe_ctx, call_plan_sp,
+                                                                      stop_others, 
+                                                                      try_all_threads, 
+                                                                      discard_on_error,
+                                                                      single_thread_timeout_usec, 
+                                                                      errors);
+    
+    if (exe_ctx.GetProcessPtr())
+        exe_ctx.GetProcessPtr()->SetRunningUserExpression(false);
+    
+    return results;
+}
 
 ExecutionResults
 ClangFunction::ExecuteFunction(

Modified: lldb/branches/apple/python-GIL/source/Expression/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Expression/ClangUserExpression.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Expression/ClangUserExpression.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Expression/ClangUserExpression.cpp Wed Aug  8 04:20:15 2012
@@ -556,8 +556,10 @@
         lldb::addr_t object_ptr = 0;
         lldb::addr_t cmd_ptr = 0;
         
-        if (!PrepareToExecuteJITExpression (error_stream, exe_ctx, struct_address, object_ptr, cmd_ptr))
+        if (!PrepareToExecuteJITExpression (error_stream, exe_ctx, struct_address, object_ptr, cmd_ptr)) {
+            error_stream.Printf("Errored out in %s, couldn't PrepareToExecuteJITExpression", __FUNCTION__);
             return eExecutionSetupError;
+        }
         
         const bool stop_others = true;
         const bool try_all_threads = true;
@@ -572,8 +574,10 @@
                                                                           ((m_needs_object_ptr && m_objectivec) ? &cmd_ptr : NULL),
                                                                           shared_ptr_to_me));
         
-        if (call_plan_sp == NULL || !call_plan_sp->ValidatePlan (NULL))
+        if (call_plan_sp == NULL || !call_plan_sp->ValidatePlan (NULL)) {
+            error_stream.Printf("Errored out in %s, couldn't ValidatePlan", __FUNCTION__);
             return eExecutionSetupError;
+        }
         
         lldb::addr_t function_stack_pointer = static_cast<ThreadPlanCallFunction *>(call_plan_sp.get())->GetFunctionStackPointer();
     
@@ -630,6 +634,7 @@
         if  (FinalizeJITExecution (error_stream, exe_ctx, result, function_stack_pointer))
             return eExecutionCompleted;
         else
+            error_stream.Printf("Errored out in %s: Couldn't FinalizeJITExpression", __FUNCTION__);
             return eExecutionSetupError;
     }
     else

Modified: lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist (original)
+++ lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherRootXPCService-Info.plist Wed Aug  8 04:20:15 2012
@@ -25,7 +25,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>163</string>
+	<string>165</string>
 	<key>NSHumanReadableCopyright</key>
 	<string>Copyright © 2012 Apple Inc. All rights reserved.</string>
 	<key>XPCService</key>

Modified: lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist (original)
+++ lldb/branches/apple/python-GIL/source/Host/macosx/launcherXPCService/LauncherXPCService-Info.plist Wed Aug  8 04:20:15 2012
@@ -25,7 +25,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>163</string>
+	<string>165</string>
 	<key>NSHumanReadableCopyright</key>
 	<string>Copyright © 2012 Apple Inc. All rights reserved.</string>
 	<key>XPCService</key>

Modified: lldb/branches/apple/python-GIL/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Interpreter/CommandInterpreter.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/CommandInterpreter.cpp Wed Aug  8 04:20:15 2012
@@ -231,8 +231,10 @@
         ProcessAliasOptionsArgs (cmd_obj_sp, "--", alias_arguments_vector_sp);
         AddAlias ("p", cmd_obj_sp);
         AddAlias ("print", cmd_obj_sp);
+        AddAlias ("call", cmd_obj_sp);
         AddOrReplaceAliasOptions ("p", alias_arguments_vector_sp);
         AddOrReplaceAliasOptions ("print", alias_arguments_vector_sp);
+        AddOrReplaceAliasOptions ("call", alias_arguments_vector_sp);
 
         alias_arguments_vector_sp.reset (new OptionArgVector);
         ProcessAliasOptionsArgs (cmd_obj_sp, "-o --", alias_arguments_vector_sp);

Modified: lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupValueObjectDisplay.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupValueObjectDisplay.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupValueObjectDisplay.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupValueObjectDisplay.cpp Wed Aug  8 04:20:15 2012
@@ -40,7 +40,7 @@
     { LLDB_OPT_SET_1, false, "objc",             'O', no_argument,       NULL, 0, eArgTypeNone,      "Print as an Objective-C object."},
     { LLDB_OPT_SET_1, false, "ptr-depth",        'P', required_argument, NULL, 0, eArgTypeCount,     "The number of pointers to be traversed when dumping values (default is zero)."},
     { LLDB_OPT_SET_1, false, "show-types",       'T', no_argument,       NULL, 0, eArgTypeNone,      "Show variable types when dumping values."},
-    { LLDB_OPT_SET_1, false, "no-summary-depth", 'Y', optional_argument, NULL, 0, eArgTypeCount,     "Set a depth for omitting summary information (default is 1)."},
+    { LLDB_OPT_SET_1, false, "no-summary-depth", 'Y', optional_argument, NULL, 0, eArgTypeCount,     "Set the depth at which omitting summary information stops (default is 1)."},
     { LLDB_OPT_SET_1, false, "raw-output",       'R', no_argument,       NULL, 0, eArgTypeNone,      "Don't use formatting options."},
     { LLDB_OPT_SET_1, false, "show-all-children",'A', no_argument,       NULL, 0, eArgTypeNone,      "Ignore the upper bound on the number of children to show."},
     { 0, false, NULL, 0, 0, NULL, NULL, eArgTypeNone, NULL }

Modified: lldb/branches/apple/python-GIL/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Interpreter/ScriptInterpreterPython.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/ScriptInterpreterPython.cpp Wed Aug  8 04:20:15 2012
@@ -1393,9 +1393,9 @@
     StringList auto_generated_function;
     auto_generated_function.AppendString (signature);
     auto_generated_function.AppendString ("     global_dict = globals()");   // Grab the global dictionary
-    auto_generated_function.AppendString ("     new_keys = dict.keys()");    // Make a list of keys in the session dict
+    auto_generated_function.AppendString ("     new_keys = internal_dict.keys()");    // Make a list of keys in the session dict
     auto_generated_function.AppendString ("     old_keys = global_dict.keys()"); // Save list of keys in global dict
-    auto_generated_function.AppendString ("     global_dict.update (dict)"); // Add the session dictionary to the 
+    auto_generated_function.AppendString ("     global_dict.update (internal_dict)"); // Add the session dictionary to the 
     // global dictionary.
     
     // Wrap everything up inside the function, increasing the indentation.
@@ -1407,7 +1407,7 @@
         auto_generated_function.AppendString (sstr.GetData());
     }
     auto_generated_function.AppendString ("     for key in new_keys:");  // Iterate over all the keys from session dict
-    auto_generated_function.AppendString ("         dict[key] = global_dict[key]");  // Update session dict values
+    auto_generated_function.AppendString ("         internal_dict[key] = global_dict[key]");  // Update session dict values
     auto_generated_function.AppendString ("         if key not in old_keys:");       // If key was not originally in global dict
     auto_generated_function.AppendString ("             del global_dict[key]");      //  ...then remove key/value from global dict
     
@@ -1435,7 +1435,7 @@
     // ValueObject as parameter to the function.
     
     std::string auto_generated_function_name(GenerateUniqueName("lldb_autogen_python_type_print_func", num_created_functions, name_token));
-    sstr.Printf ("def %s (valobj, dict):", auto_generated_function_name.c_str());
+    sstr.Printf ("def %s (valobj, internal_dict):", auto_generated_function_name.c_str());
     
     if (!GenerateFunction(sstr.GetData(), user_input))
         return false;
@@ -1458,7 +1458,7 @@
     
     std::string auto_generated_function_name(GenerateUniqueName("lldb_autogen_python_cmd_alias_func", num_created_functions));
 
-    sstr.Printf ("def %s (debugger, args, result, dict):", auto_generated_function_name.c_str());
+    sstr.Printf ("def %s (debugger, args, result, internal_dict):", auto_generated_function_name.c_str());
     
     if (!GenerateFunction(sstr.GetData(),user_input))
         return false;
@@ -1578,7 +1578,7 @@
         return false;
 
     std::string auto_generated_function_name(GenerateUniqueName("lldb_autogen_python_bp_callback_func_",num_created_functions));
-    sstr.Printf ("def %s (frame, bp_loc, dict):", auto_generated_function_name.c_str());
+    sstr.Printf ("def %s (frame, bp_loc, internal_dict):", auto_generated_function_name.c_str());
     
     if (!GenerateFunction(sstr.GetData(), user_input))
         return false;

Modified: lldb/branches/apple/python-GIL/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Wed Aug  8 04:20:15 2012
@@ -36,6 +36,7 @@
         Instruction(address, addr_class),
         m_is_valid(false),
         m_disasm(disasm),
+        m_disasm_sp(disasm.shared_from_this()),
         m_does_branch(eLazyBoolCalculate)
     {
     }
@@ -133,18 +134,20 @@
                     if ((thumb_opcode & 0xe000) != 0xe000 || ((thumb_opcode & 0x1800u) == 0))
                     {
                         m_opcode.SetOpcode16 (thumb_opcode);
+                        m_is_valid = true;
                     }
                     else
                     {
                         thumb_opcode <<= 16;
                         thumb_opcode |= data.GetU16(&data_offset);
-                        m_opcode.SetOpcode32 (thumb_opcode);
+                        m_opcode.SetOpcode16_2 (thumb_opcode);
                         m_is_valid = true;
                     }
                 }
                 else
                 {
                     m_opcode.SetOpcode32 (data.GetU32(&data_offset));
+                    m_is_valid = true;
                 }
             }
             else
@@ -195,7 +198,7 @@
         DataExtractor data;
         const AddressClass address_class = GetAddressClass ();
 
-        if (m_opcode.GetData(data, address_class))
+        if (m_opcode.GetData(data))
         {
             char out_string[512];
             
@@ -415,6 +418,7 @@
     
     bool                    m_is_valid;
     DisassemblerLLVMC      &m_disasm;
+    DisassemblerSP          m_disasm_sp; // for ownership
     LazyBool                m_does_branch;
     
     static bool             s_regex_compiled;

Modified: lldb/branches/apple/python-GIL/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Target/Target.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Target/Target.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Target/Target.cpp Wed Aug  8 04:20:15 2012
@@ -1935,7 +1935,12 @@
         
     if (!m_process_sp)
         return;
-        
+    
+    // <rdar://problem/12027563> make sure we check that we are not stopped because of us running a user expression
+    // since in that case we do not want to run the stop-hooks
+    if (m_process_sp->GetModIDRef().IsLastResumeForUserExpression())
+        return;
+    
     if (m_stop_hooks.empty())
         return;
         

Modified: lldb/branches/apple/python-GIL/source/Target/ThreadPlanTracer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Target/ThreadPlanTracer.cpp?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Target/ThreadPlanTracer.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Target/ThreadPlanTracer.cpp Wed Aug  8 04:20:15 2012
@@ -96,7 +96,7 @@
 
 ThreadPlanAssemblyTracer::ThreadPlanAssemblyTracer (Thread &thread, lldb::StreamSP &stream_sp) :
     ThreadPlanTracer (thread, stream_sp),
-    m_disassembler_ap (),
+    m_disassembler_sp (),
     m_intptr_type (),
     m_register_values ()
 {
@@ -104,7 +104,7 @@
 
 ThreadPlanAssemblyTracer::ThreadPlanAssemblyTracer (Thread &thread) :
     ThreadPlanTracer (thread),
-    m_disassembler_ap (),
+    m_disassembler_sp (),
     m_intptr_type (),
     m_register_values ()
 {
@@ -113,9 +113,9 @@
 Disassembler *
 ThreadPlanAssemblyTracer::GetDisassembler ()
 {
-    if (m_disassembler_ap.get() == NULL)
-        m_disassembler_ap.reset(Disassembler::FindPlugin(m_thread.GetProcess()->GetTarget().GetArchitecture(), NULL));
-    return m_disassembler_ap.get();
+    if (m_disassembler_sp.get() == NULL)
+        m_disassembler_sp = Disassembler::FindPlugin(m_thread.GetProcess()->GetTarget().GetArchitecture(), NULL);
+    return m_disassembler_sp.get();
 }
 
 TypeFromUser

Modified: lldb/branches/apple/python-GIL/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py (original)
+++ lldb/branches/apple/python-GIL/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py Wed Aug  8 04:20:15 2012
@@ -86,7 +86,7 @@
                           "here.close()"])
         self.expect("breakpoint command list 3", "Breakpoint 3 command ok",
             substrs = ["Breakpoint commands:",
-                          "bktptcmd.function(frame, bp_loc, dict)"])
+                          "bktptcmd.function(frame, bp_loc, internal_dict)"])
 
         self.runCmd("command script import --allow-reload ./bktptcmd.py")
 

Modified: lldb/branches/apple/python-GIL/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/test/lldbtest.py?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/test/lldbtest.py (original)
+++ lldb/branches/apple/python-GIL/test/lldbtest.py Wed Aug  8 04:20:15 2012
@@ -1070,7 +1070,7 @@
             elif running:
                 # For process launch, wait some time before possible next try.
                 time.sleep(self.timeWaitNextLaunch)
-                with recording(self, True) as sbuf:
+                with recording(self, trace) as sbuf:
                     print >> sbuf, "Command '" + cmd + "' failed!"
 
         if check:

Modified: lldb/branches/apple/python-GIL/tools/debugserver/debugserver.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/tools/debugserver/debugserver.xcodeproj/project.pbxproj?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/tools/debugserver/debugserver.xcodeproj/project.pbxproj (original)
+++ lldb/branches/apple/python-GIL/tools/debugserver/debugserver.xcodeproj/project.pbxproj Wed Aug  8 04:20:15 2012
@@ -480,7 +480,7 @@
 					i386,
 				);
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 190;
+				CURRENT_PROJECT_VERSION = 192;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -501,7 +501,7 @@
 					armv7s,
 				);
 				"ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_64_BIT)";
-				CURRENT_PROJECT_VERSION = 190;
+				CURRENT_PROJECT_VERSION = 192;
 				DEAD_CODE_STRIPPING = YES;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -527,7 +527,7 @@
 					x86_64,
 					i386,
 				);
-				CURRENT_PROJECT_VERSION = 190;
+				CURRENT_PROJECT_VERSION = 192;
 				DEAD_CODE_STRIPPING = YES;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -546,7 +546,7 @@
 			buildSettings = {
 				"CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist";
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 190;
+				CURRENT_PROJECT_VERSION = 192;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks;
 				"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = (
@@ -599,7 +599,7 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
 				"CODE_SIGN_IDENTITY[sdk=macosx*]" = lldb_codesign;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 190;
+				CURRENT_PROJECT_VERSION = 192;
 				FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks;
 				"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = (
 					"$(SDKROOT)/System/Library/PrivateFrameworks",
@@ -651,7 +651,7 @@
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
 				"CODE_SIGN_IDENTITY[sdk=macosx*]" = lldb_codesign;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 190;
+				CURRENT_PROJECT_VERSION = 192;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks;
 				"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = (

Modified: lldb/branches/apple/python-GIL/www/python-reference.html
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/www/python-reference.html?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/www/python-reference.html (original)
+++ lldb/branches/apple/python-GIL/www/python-reference.html Wed Aug  8 04:20:15 2012
@@ -300,12 +300,12 @@
                     debugging requirements. </p>
                 <p>To write a python function that implements a new LDB command define the function to take four arguments as follows:</p>
                         
-        <code><pre><tt>def command_function(<b>debugger</b>, <b>command</b>, <b>result</b>, <b>dict</b>):
+        <code><pre><tt>def command_function(<b>debugger</b>, <b>command</b>, <b>result</b>, <b>internal_dict</b>):
           <font color=green># Your code goes here</font>
         </tt></pre></code>
 
 		Optionally, you can also provide a Python docstring, and LLDB will use it when providing help for your command, as in:
-        <code><pre><tt>def command_function(<b>debugger</b>, <b>command</b>, <b>result</b>, <b>dict</b>):
+        <code><pre><tt>def command_function(<b>debugger</b>, <b>command</b>, <b>result</b>, <b>internal_dict</b>):
           <font color=green>"""This command takes a lot of options and does many fancy things"""</font>    
           <font color=green># Your code goes here</font>
         </tt></pre></code>
@@ -357,7 +357,7 @@
         </tr>
         <tr>
             <td class="content">
-                <b>dict</b>
+                <b>internal_dict</b>
             </td>
             <td class="content">
                 <b>python dict object</b>
@@ -373,11 +373,11 @@
           don't have to change your PYTHONPATH for temporary scripts.  It also has another convenience
           that if your new script module has a function of the form:</p>
 
-<code><pre><tt>def __lldb_init_module(<b>debugger</b>, <b>dict</b>):
+<code><pre><tt>def __lldb_init_module(<b>debugger</b>, <b>internal_dict</b>):
     <font color=green># Command Initialization code goes here</font>
 </tt></pre></code>
 
-        <p>where <b>debugger</b> and <b>dict</b> are as above, that function will get run when the module is loaded
+        <p>where <b>debugger</b> and <b>internal_dict</b> are as above, that function will get run when the module is loaded
            allowing you to add whatever commands you want into the current debugger. Note that
            this function will only be run when using the LLDB comand <b>command script import</b>,
            it will not get run if anyone imports your module from another module. 
@@ -410,11 +410,11 @@
 import optparse
 import shlex
 
-def ls(debugger, command, result, dict):
+def ls(debugger, command, result, internal_dict):
     result.PutCString(commands.getoutput('/bin/ls %s' % command))
 
 <font color=green># And the initialization code to add your commands </font>
-def __lldb_init_module(debugger, dict):
+def __lldb_init_module(debugger, internal_dict):
     debugger.HandleCommand('command script add -f ls.ls ls')
     print 'The "ls" python command has been installed and is ready for use.'
 </tt></pre></code>

Modified: lldb/branches/apple/python-GIL/www/varformats.html
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/www/varformats.html?rev=161482&r1=161481&r2=161482&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/www/varformats.html (original)
+++ lldb/branches/apple/python-GIL/www/varformats.html Wed Aug  8 04:20:15 2012
@@ -819,7 +819,7 @@
                         <td class="content">
                             <b>(lldb)</b> type summary add -P Rectangle<br/>
                             Enter your Python command(s). Type 'DONE' to end.<br/>
-def function (valobj,dict):<br/>
+def function (valobj,internal_dict):<br/>
          height_val = valobj.GetChildMemberWithName('height')<br/>
          width_val = valobj.GetChildMemberWithName('width')<br/>
          height = height_val.GetValueAsUnsigned(0)<br/>
@@ -841,9 +841,9 @@
             the LLDB <a href="docs.html">doxygen documentation</a> when it becomes available.</p>
             
             <p>As a brief introduction, your script is encapsulated into a function that is
-            passed two parameters: <code>valobj</code> and <code>dict</code>.</p>
+            passed two parameters: <code>valobj</code> and <code>internal_dict</code>.</p>
             
-            <p><code>dict</code> is an internal support parameter used by LLDB and you should
+            <p><code>internal_dict</code> is an internal support parameter used by LLDB and you should
             not touch it.<br/><code>valobj</code> is the object encapsulating the actual
             variable being displayed, and its type is <a href="http://llvm.org/svn/llvm-project/lldb/trunk/include/lldb/API/SBValue.h">SBValue</a>.
  			Out of the many possible operations on an SBValue, the basic one is retrieve the children objects
@@ -1029,7 +1029,7 @@
 			  must be implemented by the Python class):</p>
 		<code>
 			<font color=blue>class</font> SyntheticChildrenProvider:<br/>
-			    <font color=blue>def</font> __init__(self, valobj, dict):<br/>
+			    <font color=blue>def</font> __init__(self, valobj, internal_dict):<br/>
 			        <i>this call should initialize the Python object using valobj as the variable to provide synthetic children for</i> <br/>
 			    <font color=blue>def</font> num_children(self): <br/>
 			        <i>this call should return the number of children that you want your object to have</i> <br/>





More information about the lldb-commits mailing list