[Lldb-commits] [lldb] r156962 - in /lldb/branches/apple/python-GIL: ./ examples/python/ include/lldb/API/ include/lldb/Core/ include/lldb/Utility/ lldb.xcodeproj/ resources/ scripts/ scripts/Python/interface/ source/API/ source/Commands/ source/Core/ source/Expression/ source/Host/macosx/launcherXPCService/ source/Interpreter/ source/Plugins/DynamicLoader/MacOSX-DYLD/ source/Plugins/OperatingSystem/Darwin-Kernel/ source/Plugins/Process/gdb-remote/ source/Plugins/SymbolFile/DWARF/ source/Symbol/ source/Target/ test/ tes...

Filipe Cabecinhas me at filcab.net
Wed May 16 16:32:55 PDT 2012


Author: filcab
Date: Wed May 16 18:32:55 2012
New Revision: 156962

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

Modified:
    lldb/branches/apple/python-GIL/   (props changed)
    lldb/branches/apple/python-GIL/examples/python/crashlog.py
    lldb/branches/apple/python-GIL/include/lldb/API/SBBreakpointLocation.h
    lldb/branches/apple/python-GIL/include/lldb/Core/DataVisualization.h
    lldb/branches/apple/python-GIL/include/lldb/Core/Debugger.h
    lldb/branches/apple/python-GIL/include/lldb/Core/FormatManager.h
    lldb/branches/apple/python-GIL/include/lldb/Utility/Utils.h
    lldb/branches/apple/python-GIL/lldb.xcodeproj/project.pbxproj
    lldb/branches/apple/python-GIL/llvm.zip
    lldb/branches/apple/python-GIL/resources/LLDB-Info.plist
    lldb/branches/apple/python-GIL/scripts/Python/interface/SBBreakpointLocation.i
    lldb/branches/apple/python-GIL/scripts/disasm-gdb-remote.pl
    lldb/branches/apple/python-GIL/scripts/llvm.fix-target-amalgamated.diff
    lldb/branches/apple/python-GIL/source/API/SBBreakpointLocation.cpp
    lldb/branches/apple/python-GIL/source/Commands/CommandObjectThread.cpp
    lldb/branches/apple/python-GIL/source/Core/DataVisualization.cpp
    lldb/branches/apple/python-GIL/source/Core/Debugger.cpp
    lldb/branches/apple/python-GIL/source/Core/FormatManager.cpp
    lldb/branches/apple/python-GIL/source/Core/ValueObject.cpp
    lldb/branches/apple/python-GIL/source/Expression/ASTResultSynthesizer.cpp
    lldb/branches/apple/python-GIL/source/Expression/ClangExpressionParser.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/OptionGroupArchitecture.cpp
    lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupOutputFile.cpp
    lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupPlatform.cpp
    lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupUUID.cpp
    lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupValueObjectDisplay.cpp
    lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupVariable.cpp
    lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupWatchpoint.cpp
    lldb/branches/apple/python-GIL/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
    lldb/branches/apple/python-GIL/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
    lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
    lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/branches/apple/python-GIL/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/branches/apple/python-GIL/source/Symbol/ClangASTType.cpp
    lldb/branches/apple/python-GIL/source/Target/Process.cpp
    lldb/branches/apple/python-GIL/test/functionalities/abbreviation/TestAbbreviations.py
    lldb/branches/apple/python-GIL/test/functionalities/alias/TestAliases.py
    lldb/branches/apple/python-GIL/test/functionalities/load_unload/Makefile
    lldb/branches/apple/python-GIL/test/lldbtest.py
    lldb/branches/apple/python-GIL/test/redo.py
    lldb/branches/apple/python-GIL/tools/debugserver/debugserver.xcodeproj/project.pbxproj
    lldb/branches/apple/python-GIL/tools/debugserver/source/RNBSocket.cpp
    lldb/branches/apple/python-GIL/tools/driver/Driver.cpp

Propchange: lldb/branches/apple/python-GIL/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 16 18:32:55 2012
@@ -1 +1 @@
-/lldb/trunk:156467-156855
+/lldb/trunk:156467-156961

Modified: lldb/branches/apple/python-GIL/examples/python/crashlog.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/examples/python/crashlog.py?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/examples/python/crashlog.py (original)
+++ lldb/branches/apple/python-GIL/examples/python/crashlog.py Wed May 16 18:32:55 2012
@@ -421,7 +421,8 @@
                                 print image
                     if matches_found == 0:
                         for (image_idx, image) in enumerate(crash_log.images):
-                            if string.find(image.get_resolved_path(), image_path) >= 0:
+                            resolved_image_path = image.get_resolved_path()
+                            if resolved_image_path and string.find(image.get_resolved_path(), image_path) >= 0:
                                 print image
         else:
             for crash_log in self.crash_logs:

Modified: lldb/branches/apple/python-GIL/include/lldb/API/SBBreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/include/lldb/API/SBBreakpointLocation.h?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/include/lldb/API/SBBreakpointLocation.h (original)
+++ lldb/branches/apple/python-GIL/include/lldb/API/SBBreakpointLocation.h Wed May 16 18:32:55 2012
@@ -28,6 +28,9 @@
     const lldb::SBBreakpointLocation &
     operator = (const lldb::SBBreakpointLocation &rhs);
 
+    break_id_t
+    GetID ();
+    
     bool
     IsValid() const;
 

Modified: lldb/branches/apple/python-GIL/include/lldb/Core/DataVisualization.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/include/lldb/Core/DataVisualization.h?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/include/lldb/Core/DataVisualization.h (original)
+++ lldb/branches/apple/python-GIL/include/lldb/Core/DataVisualization.h Wed May 16 18:32:55 2012
@@ -74,18 +74,24 @@
     static lldb::TypeSummaryImplSP
     GetSummaryForType (lldb::TypeNameSpecifierImplSP type_sp);
     
+#ifndef LLDB_DISABLE_PYTHON
     static lldb::SyntheticChildrenSP
     GetSyntheticChildrenForType (lldb::TypeNameSpecifierImplSP type_sp);
+#endif
     
     static lldb::TypeFilterImplSP
     GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp);
 
+#ifndef LLDB_DISABLE_PYTHON
     static lldb::TypeSyntheticImplSP
     GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp);
+#endif
     
+#ifndef LLDB_DISABLE_PYTHON
     static lldb::SyntheticChildrenSP
     GetSyntheticChildren(ValueObject& valobj,
                          lldb::DynamicValueType use_dynamic);
+#endif
     
     static bool
     AnyMatches(ConstString type_name,

Modified: lldb/branches/apple/python-GIL/include/lldb/Core/Debugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/include/lldb/Core/Debugger.h?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/include/lldb/Core/Debugger.h (original)
+++ lldb/branches/apple/python-GIL/include/lldb/Core/Debugger.h Wed May 16 18:32:55 2012
@@ -506,12 +506,6 @@
     bool
     CheckIfTopInputReaderIsDone ();
     
-    void
-    DisconnectInput()
-    {
-        m_input_comm.Clear ();
-    }
-
     SourceManager::SourceFileCache &
     GetSourceFileCache ()
     {

Modified: lldb/branches/apple/python-GIL/include/lldb/Core/FormatManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/include/lldb/Core/FormatManager.h?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/include/lldb/Core/FormatManager.h (original)
+++ lldb/branches/apple/python-GIL/include/lldb/Core/FormatManager.h Wed May 16 18:32:55 2012
@@ -131,6 +131,7 @@
         return retval;
     }
     
+#ifndef LLDB_DISABLE_PYTHON
     SynthNavigator::MapValueType
     GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp)
     {
@@ -146,6 +147,7 @@
         
         return retval;
     }
+#endif
     
     lldb::TypeNameSpecifierImplSP
     GetTypeNameSpecifierForSummaryAtIndex (uint32_t index)
@@ -503,9 +505,11 @@
     GetSummaryFormat (ValueObject& valobj,
          lldb::DynamicValueType use_dynamic);
     
+#ifndef LLDB_DISABLE_PYTHON
     lldb::SyntheticChildrenSP
     GetSyntheticChildren (ValueObject& valobj,
                           lldb::DynamicValueType use_dynamic);
+#endif
     
 private:
     
@@ -655,18 +659,24 @@
     lldb::TypeFilterImplSP
     GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp);
 
+#ifndef LLDB_DISABLE_PYTHON
     lldb::TypeSyntheticImplSP
     GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp);
+#endif
     
+#ifndef LLDB_DISABLE_PYTHON
     lldb::SyntheticChildrenSP
     GetSyntheticChildrenForType (lldb::TypeNameSpecifierImplSP type_sp);
+#endif
     
+#ifndef LLDB_DISABLE_PYTHON
     lldb::SyntheticChildrenSP
     GetSyntheticChildren (ValueObject& valobj,
                           lldb::DynamicValueType use_dynamic)
     {
         return m_categories_map.GetSyntheticChildren(valobj, use_dynamic);
     }
+#endif
     
     bool
     AnyMatches (ConstString type_name,

Modified: lldb/branches/apple/python-GIL/include/lldb/Utility/Utils.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/include/lldb/Utility/Utils.h?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/include/lldb/Utility/Utils.h (original)
+++ lldb/branches/apple/python-GIL/include/lldb/Utility/Utils.h Wed May 16 18:32:55 2012
@@ -10,11 +10,13 @@
 #ifndef utility_Utils_h_
 #define utility_Utils_h_
 
+// These utilities have llvm namespace.
+#include "llvm/ADT/STLExtras.h"
+
 namespace lldb_private {
 
-// Return the number of elements of a static array.
-template <typename T, unsigned size>
-inline unsigned arraysize(T (&v)[size]) { return size; }
+// Add lldb utilities here.
 
 } // namespace lldb_private
+
 #endif // utility_Utils

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=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/branches/apple/python-GIL/lldb.xcodeproj/project.pbxproj Wed May 16 18:32:55 2012
@@ -4173,9 +4173,9 @@
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_LINK_OBJC_RUNTIME = NO;
 				CLANG_OBJC_RUNTIME = NO;
-				CURRENT_PROJECT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 146;
+				DYLIB_CURRENT_VERSION = 147;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4235,10 +4235,10 @@
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CLANG_LINK_OBJC_RUNTIME = NO;
 				CLANG_OBJC_RUNTIME = NO;
-				CURRENT_PROJECT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
 				DEAD_CODE_STRIPPING = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 146;
+				DYLIB_CURRENT_VERSION = 147;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4296,7 +4296,7 @@
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				CURRENT_PROJECT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
 				DEBUGGING_SYMBOLS = YES;
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -4322,7 +4322,7 @@
 				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.7;
@@ -4339,7 +4339,7 @@
 				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.7;
@@ -4353,8 +4353,8 @@
 		2689FFD513353D7A00698AC0 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				CURRENT_PROJECT_VERSION = 146;
-				DYLIB_CURRENT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
+				DYLIB_CURRENT_VERSION = 147;
 				EXECUTABLE_EXTENSION = a;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4382,8 +4382,8 @@
 		2689FFD613353D7A00698AC0 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				CURRENT_PROJECT_VERSION = 146;
-				DYLIB_CURRENT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
+				DYLIB_CURRENT_VERSION = 147;
 				EXECUTABLE_EXTENSION = a;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4411,8 +4411,8 @@
 		2689FFD713353D7A00698AC0 /* BuildAndIntegration */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				CURRENT_PROJECT_VERSION = 146;
-				DYLIB_CURRENT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
+				DYLIB_CURRENT_VERSION = 147;
 				EXECUTABLE_EXTENSION = a;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4498,7 +4498,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4538,10 +4538,10 @@
 				CLANG_LINK_OBJC_RUNTIME = NO;
 				CLANG_OBJC_RUNTIME = NO;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
 				DEAD_CODE_STRIPPING = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 146;
+				DYLIB_CURRENT_VERSION = 147;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4842,7 +4842,7 @@
 		26F5C26C10F3D9A5009D5894 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				CURRENT_PROJECT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4872,7 +4872,7 @@
 		26F5C26D10F3D9A5009D5894 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				CURRENT_PROJECT_VERSION = 146;
+				CURRENT_PROJECT_VERSION = 147;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",

Modified: lldb/branches/apple/python-GIL/llvm.zip
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/llvm.zip?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
Binary files - no diff available.

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=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/resources/LLDB-Info.plist (original)
+++ lldb/branches/apple/python-GIL/resources/LLDB-Info.plist Wed May 16 18:32:55 2012
@@ -17,7 +17,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>146</string>
+	<string>147</string>
 	<key>CFBundleName</key>
 	<string>${EXECUTABLE_NAME}</string>
 </dict>

Modified: lldb/branches/apple/python-GIL/scripts/Python/interface/SBBreakpointLocation.i
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/scripts/Python/interface/SBBreakpointLocation.i?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/scripts/Python/interface/SBBreakpointLocation.i (original)
+++ lldb/branches/apple/python-GIL/scripts/Python/interface/SBBreakpointLocation.i Wed May 16 18:32:55 2012
@@ -29,6 +29,9 @@
 
     ~SBBreakpointLocation ();
 
+    break_id_t
+    GetID ();
+    
     bool
     IsValid() const;
 

Modified: lldb/branches/apple/python-GIL/scripts/disasm-gdb-remote.pl
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/scripts/disasm-gdb-remote.pl?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/scripts/disasm-gdb-remote.pl (original)
+++ lldb/branches/apple/python-GIL/scripts/disasm-gdb-remote.pl Wed May 16 18:32:55 2012
@@ -1749,6 +1749,7 @@
 	
 		my $key = '';
 		my $value = '';
+		my $comment = '';
         if ($_[0] =~ /[0-9a-fA-F]/ && $_[1] =~ /[0-9a-fA-F]/)
     	{
     		my $reg_num = get8(\@_);
@@ -1780,7 +1781,26 @@
 			if (length($char) == 0 or $char eq ';' or $char eq '#') { last; }
 			$value .= $char;
 		}
-		printf("\t%*s = %s\n", $max_register_name_len, $key, $value);
+		if ($key eq 'metype')
+		{
+		    our %metype_to_name = (
+		        '1' => ' (EXC_BAD_ACCESS)',
+                '2' => ' (EXC_BAD_INSTRUCTION)',
+                '3' => ' (EXC_ARITHMETIC)',
+                '4' => ' (EXC_EMULATION)',
+                '5' => ' (EXC_SOFTWARE)',
+                '6' => ' (EXC_BREAKPOINT)',
+                '7' => ' (EXC_SYSCALL)',
+                '8' => ' (EXC_MACH_SYSCALL)',
+                '9' => ' (EXC_RPC_ALERT)',
+                '10' => ' (EXC_CRASH)'
+            );
+            if (exists $metype_to_name{$value})
+            {
+                $comment = $metype_to_name{$value};
+            }
+		}
+		printf("\t%*s = %s$comment\n", $max_register_name_len, $key, $value);
 	}
 }
 
@@ -1791,13 +1811,56 @@
 sub dump_stop_reply_packet
 {
 	my $what = shift(@_);
-	if ($what eq 'S')
-	{
-		print 'signal ( 0x' . shift(@_) . shift(@_) . " )\n";
-	}
-	elsif ($what eq 'T')
+	if ($what eq 'S' or $what eq 'T')
 	{
-		print 'signal ( 0x' . shift(@_) . shift(@_) . " )\n";
+	    my $signo = get8(\@_);
+	    
+	    our %signo_to_name = (
+                '1'  => ' SIGHUP',
+                '2'  => ' SIGINT',
+                '3'  => ' SIGQUIT',
+                '4'  => ' SIGILL',
+                '5'  => ' SIGTRAP',
+                '6'  => ' SIGABRT',
+                '7'  => ' SIGPOLL/SIGEMT',
+                '8'  => ' SIGFPE',
+                '9'  => ' SIGKILL',
+                '10' => ' SIGBUS',
+                '11' => ' SIGSEGV',
+                '12' => ' SIGSYS',
+                '13' => ' SIGPIPE',
+                '14' => ' SIGALRM',
+                '15' => ' SIGTERM',
+                '16' => ' SIGURG',
+                '17' => ' SIGSTOP',
+                '18' => ' SIGTSTP',
+                '19' => ' SIGCONT',
+                '20' => ' SIGCHLD',
+                '21' => ' SIGTTIN',
+                '22' => ' SIGTTOU',
+                '23' => ' SIGIO',
+                '24' => ' SIGXCPU',
+                '25' => ' SIGXFSZ',
+                '26' => ' SIGVTALRM',
+                '27' => ' SIGPROF',
+                '28' => ' SIGWINCH',
+                '29' => ' SIGINFO',
+                '30' => ' SIGUSR1',
+                '31' => ' SIGUSR2',
+                '145' => ' TARGET_EXC_BAD_ACCESS',        # 0x91
+                '146' => ' TARGET_EXC_BAD_INSTRUCTION',   # 0x92
+                '147' => ' TARGET_EXC_ARITHMETIC',        # 0x93
+                '148' => ' TARGET_EXC_EMULATION',         # 0x94
+                '149' => ' TARGET_EXC_SOFTWARE',          # 0x95
+                '150' => ' TARGET_EXC_BREAKPOINT'         # 0x96
+        );
+        my $signo_str = sprintf("%i", $signo);
+        my $signo_name = '';
+	    if (exists $signo_to_name{$signo_str})
+        {
+            $signo_name = $signo_to_name{$signo_str};
+        }
+		printf ("signal (signo=%u$signo_name)\n", $signo);
 		dump_stop_reply_data (@_);
 	}
 	elsif ($what eq 'W')

Modified: lldb/branches/apple/python-GIL/scripts/llvm.fix-target-amalgamated.diff
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/scripts/llvm.fix-target-amalgamated.diff?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/scripts/llvm.fix-target-amalgamated.diff (original)
+++ lldb/branches/apple/python-GIL/scripts/llvm.fix-target-amalgamated.diff Wed May 16 18:32:55 2012
@@ -41,6 +41,25 @@
                       []>;
  
  // Vector Move Operations.
+Index: lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+===================================================================
+--- lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp	(revision 152265)
++++ lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp	(working copy)
+@@ -212,12 +212,12 @@
+   } else {
+     assert(Op.isExpr() && "unknown operand kind in printOperand");
+     // If a symbolic branch target was added as a constant expression then print
+-    // that address in hex.
++    // that address in hex. And only print 32 unsigned bits for the address.
+     const MCConstantExpr *BranchTarget = dyn_cast<MCConstantExpr>(Op.getExpr());
+     int64_t Address;
+     if (BranchTarget && BranchTarget->EvaluateAsAbsolute(Address)) {
+       O << "0x";
+-      O.write_hex(Address);
++      O.write_hex((uint32_t)Address);
+     }
+     else {
+       // Otherwise, just print the expression.
 Index: lib/Target/ARM/ARMInstrThumb2.td
 ===================================================================
 --- lib/Target/ARM/ARMInstrThumb2.td	(revision 152265)
@@ -53,41 +72,6 @@
  }
  
  let isNotDuplicable = 1, isIndirectBranch = 1 in {
-Index: lib/Target/ARM/ARMInstrThumb.td
-===================================================================
---- lib/Target/ARM/ARMInstrThumb.td	(revision 152265)
-+++ lib/Target/ARM/ARMInstrThumb.td	(working copy)
-@@ -413,11 +413,11 @@
-                   "bl${p}\t$func",
-                   [(ARMtcall tglobaladdr:$func)]>,
-              Requires<[IsThumb, IsNotIOS]> {
--    bits<22> func;
--    let Inst{26} = func{21};
-+    bits<24> func;
-+    let Inst{26} = func{23};
-     let Inst{25-16} = func{20-11};
--    let Inst{13} = 1;
--    let Inst{11} = 1;
-+    let Inst{13} = func{22};
-+    let Inst{11} = func{21};
-     let Inst{10-0} = func{10-0};
-   }
- 
-@@ -427,10 +427,11 @@
-                    "blx${p}\t$func",
-                    [(ARMcall tglobaladdr:$func)]>,
-               Requires<[IsThumb, HasV5T, IsNotIOS]> {
--    bits<21> func;
-+    bits<24> func;
-+    let Inst{26} = func{23};
-     let Inst{25-16} = func{20-11};
--    let Inst{13} = 1;
--    let Inst{11} = 1;
-+    let Inst{13} = func{22};
-+    let Inst{11} = func{21};
-     let Inst{10-1} = func{10-1};
-     let Inst{0} = 0; // func{0} is assumed zero
-   }
 Index: lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
 ===================================================================
 --- lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp	(revision 152265)
@@ -189,6 +173,41 @@
    }
    case ARM::fixup_arm_thumb_cp:
      // Offset by 4, and don't encode the low two bits. Two bytes of that
+Index: lib/Target/ARM/ARMInstrThumb.td
+===================================================================
+--- lib/Target/ARM/ARMInstrThumb.td	(revision 152265)
++++ lib/Target/ARM/ARMInstrThumb.td	(working copy)
+@@ -413,11 +413,11 @@
+                   "bl${p}\t$func",
+                   [(ARMtcall tglobaladdr:$func)]>,
+              Requires<[IsThumb, IsNotIOS]> {
+-    bits<22> func;
+-    let Inst{26} = func{21};
++    bits<24> func;
++    let Inst{26} = func{23};
+     let Inst{25-16} = func{20-11};
+-    let Inst{13} = 1;
+-    let Inst{11} = 1;
++    let Inst{13} = func{22};
++    let Inst{11} = func{21};
+     let Inst{10-0} = func{10-0};
+   }
+ 
+@@ -427,10 +427,11 @@
+                    "blx${p}\t$func",
+                    [(ARMcall tglobaladdr:$func)]>,
+               Requires<[IsThumb, HasV5T, IsNotIOS]> {
+-    bits<21> func;
++    bits<24> func;
++    let Inst{26} = func{23};
+     let Inst{25-16} = func{20-11};
+-    let Inst{13} = 1;
+-    let Inst{11} = 1;
++    let Inst{13} = func{22};
++    let Inst{11} = func{21};
+     let Inst{10-1} = func{10-1};
+     let Inst{0} = 0; // func{0} is assumed zero
+   }
 Index: lib/Target/ARM/Disassembler/ARMDisassembler.cpp
 ===================================================================
 --- lib/Target/ARM/Disassembler/ARMDisassembler.cpp	(revision 152265)

Modified: lldb/branches/apple/python-GIL/source/API/SBBreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/API/SBBreakpointLocation.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/API/SBBreakpointLocation.cpp (original)
+++ lldb/branches/apple/python-GIL/source/API/SBBreakpointLocation.cpp Wed May 16 18:32:55 2012
@@ -281,6 +281,18 @@
     return true;
 }
 
+break_id_t
+SBBreakpointLocation::GetID ()
+{
+    if (m_opaque_sp)
+    {
+        Mutex::Locker api_locker (m_opaque_sp->GetBreakpoint().GetTarget().GetAPIMutex());
+        return m_opaque_sp->GetID ();
+    }
+    else
+        return LLDB_INVALID_BREAK_ID;
+}
+
 SBBreakpoint
 SBBreakpointLocation::GetBreakpoint ()
 {

Modified: lldb/branches/apple/python-GIL/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Commands/CommandObjectThread.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Commands/CommandObjectThread.cpp Wed May 16 18:32:55 2012
@@ -543,6 +543,10 @@
                     result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
                     result.SetStatus (eReturnStatusSuccessFinishNoResult);
                 }
+                else
+                {
+                    result.SetStatus (eReturnStatusSuccessContinuingNoResult);
+                }
             }
             else
             {

Modified: lldb/branches/apple/python-GIL/source/Core/DataVisualization.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Core/DataVisualization.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/DataVisualization.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/DataVisualization.cpp Wed May 16 18:32:55 2012
@@ -109,18 +109,22 @@
     return GetFormatManager().GetSummaryForType(type_sp);
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 lldb::SyntheticChildrenSP
 DataVisualization::GetSyntheticChildren (ValueObject& valobj,
                                          lldb::DynamicValueType use_dynamic)
 {
     return GetFormatManager().GetSyntheticChildren(valobj, use_dynamic);
 }
+#endif
 
+#ifndef LLDB_DISABLE_PYTHON
 lldb::SyntheticChildrenSP
 DataVisualization::GetSyntheticChildrenForType (lldb::TypeNameSpecifierImplSP type_sp)
 {
     return GetFormatManager().GetSyntheticChildrenForType(type_sp);
 }
+#endif
 
 lldb::TypeFilterImplSP
 DataVisualization::GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp)
@@ -128,11 +132,13 @@
     return GetFormatManager().GetFilterForType(type_sp);
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 lldb::TypeSyntheticImplSP
 DataVisualization::GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp)
 {
     return GetFormatManager().GetSyntheticForType(type_sp);
 }
+#endif
 
 bool
 DataVisualization::AnyMatches (ConstString type_name,

Modified: lldb/branches/apple/python-GIL/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Core/Debugger.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/Debugger.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/Debugger.cpp Wed May 16 18:32:55 2012
@@ -387,8 +387,14 @@
         }
     }
     BroadcasterManager::Clear ();
-    DisconnectInput();
-
+    
+    // Close the input file _before_ we close the input read communications class
+    // as it does NOT own the input file, our m_input_file does.
+    GetInputFile().Close ();
+    // Now that we have closed m_input_file, we can now tell our input communication
+    // class to close down. Its read thread should quickly exit after we close
+    // the input file handle above.
+    m_input_comm.Clear ();
 }
 
 bool

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=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/FormatManager.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/FormatManager.cpp Wed May 16 18:32:55 2012
@@ -497,6 +497,7 @@
     return filter_chosen_sp;
 }
 
+#ifndef LLDB_DISABLE_PYTHON
 lldb::TypeSyntheticImplSP
 FormatManager::GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp)
 {
@@ -522,7 +523,9 @@
     }
     return synth_chosen_sp;
 }
+#endif
 
+#ifndef LLDB_DISABLE_PYTHON
 lldb::SyntheticChildrenSP
 FormatManager::GetSyntheticChildrenForType (lldb::TypeNameSpecifierImplSP type_sp)
 {
@@ -535,7 +538,9 @@
     else
         return lldb::SyntheticChildrenSP(synth_sp.get());
 }
+#endif
 
+#ifndef LLDB_DISABLE_PYTHON
 lldb::SyntheticChildrenSP
 CategoryMap::GetSyntheticChildren (ValueObject& valobj,
                                    lldb::DynamicValueType use_dynamic)
@@ -556,6 +561,7 @@
     }
     return lldb::SyntheticChildrenSP();
 }
+#endif
 
 void
 CategoryMap::LoopThrough(CallbackType callback, void* param)

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=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Core/ValueObject.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Core/ValueObject.cpp Wed May 16 18:32:55 2012
@@ -250,7 +250,9 @@
     {
         SetValueFormat(DataVisualization::ValueFormats::GetFormat (*this, eNoDynamicValues));
         SetSummaryFormat(DataVisualization::GetSummaryFormat (*this, use_dynamic));
+#ifndef LLDB_DISABLE_PYTHON
         SetSyntheticChildren(DataVisualization::GetSyntheticChildren (*this, use_dynamic));
+#endif
 
         m_last_format_mgr_revision = DataVisualization::GetCurrentRevision();
         m_last_format_mgr_dynamic = use_dynamic;

Modified: lldb/branches/apple/python-GIL/source/Expression/ASTResultSynthesizer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Expression/ASTResultSynthesizer.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Expression/ASTResultSynthesizer.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Expression/ASTResultSynthesizer.cpp Wed May 16 18:32:55 2012
@@ -260,6 +260,21 @@
         // No auxiliary variable necessary; expression returns void
         return true;
     
+    // In C++11, last_expr can be a LValueToRvalue implicit cast.  Strip that off if that's the
+    // case.
+    
+    do {
+        ImplicitCastExpr *implicit_cast = dyn_cast<ImplicitCastExpr>(last_expr);
+        
+        if (!implicit_cast)
+            break;
+        
+        if (!implicit_cast->getCastKind() == CK_LValueToRValue)
+            break;
+        
+        last_expr = implicit_cast->getSubExpr();
+    } while (0);
+    
     // is_lvalue is used to record whether the expression returns an assignable Lvalue or an
     // Rvalue.  This is relevant because they are handled differently.
     //
@@ -354,7 +369,7 @@
                 
         ExprResult address_of_expr = m_sema->CreateBuiltinUnaryOp(SourceLocation(), UO_AddrOf, last_expr);
         
-        m_sema->AddInitializerToDecl(result_decl, address_of_expr.take(), true, true);
+        m_sema->AddInitializerToDecl(result_decl, address_of_expr.take(), true, false);
     }
     else
     {
@@ -373,7 +388,7 @@
         if (!result_decl)
             return false;
         
-        m_sema->AddInitializerToDecl(result_decl, last_expr, true, true);
+        m_sema->AddInitializerToDecl(result_decl, last_expr, true, false);
     }
     
     DC->addDecl(result_decl);

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=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Expression/ClangExpressionParser.cpp Wed May 16 18:32:55 2012
@@ -215,12 +215,14 @@
         break;
     case lldb::eLanguageTypeC_plus_plus:
         m_compiler->getLangOpts().CPlusPlus = true;
+        m_compiler->getLangOpts().CPlusPlus0x = true;
         break;
     case lldb::eLanguageTypeObjC_plus_plus:
     default:
         m_compiler->getLangOpts().ObjC1 = true;
         m_compiler->getLangOpts().ObjC2 = true;
         m_compiler->getLangOpts().CPlusPlus = true;
+        m_compiler->getLangOpts().CPlusPlus0x = true;
         break;
     }
     

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=156962&r1=156961&r2=156962&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 May 16 18:32:55 2012
@@ -25,7 +25,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>146</string>
+	<string>147</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=156962&r1=156961&r2=156962&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 May 16 18:32:55 2012
@@ -25,7 +25,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>146</string>
+	<string>147</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=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/CommandInterpreter.cpp Wed May 16 18:32:55 2012
@@ -1326,6 +1326,7 @@
     StreamString revised_command_line;
     size_t actual_cmd_name_len = 0;
     std::string next_word;
+    StringList matches;
     while (!done)
     {
         char quote_char = '\0';
@@ -1346,7 +1347,7 @@
             }
             else
             {
-                cmd_obj = GetCommandObject (next_word.c_str());
+                cmd_obj = GetCommandObject (next_word.c_str(), &matches);
                 if (cmd_obj)
                 {
                     actual_cmd_name_len += next_word.length();
@@ -1392,7 +1393,26 @@
 
         if (cmd_obj == NULL)
         {
-            result.AppendErrorWithFormat ("'%s' is not a valid command.\n", next_word.c_str());
+            uint32_t num_matches = matches.GetSize();
+            if (matches.GetSize() > 1) {
+                std::string error_msg;
+                error_msg.assign ("Ambiguous command '");
+                error_msg.append(next_word.c_str());
+                error_msg.append ("'.");
+
+                error_msg.append (" Possible matches:");
+
+                for (uint32_t i = 0; i < num_matches; ++i) {
+                    error_msg.append ("\n\t");
+                    error_msg.append (matches.GetStringAtIndex(i));
+                }
+                error_msg.append ("\n");
+                result.AppendRawError (error_msg.c_str(), error_msg.size());
+            } else {
+                // We didn't have only one match, otherwise we wouldn't get here.
+                assert(num_matches == 0);
+                result.AppendErrorWithFormat ("'%s' is not a valid command.\n", next_word.c_str());
+            }
             result.SetStatus (eReturnStatusFailed);
             return false;
         }

Modified: lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupArchitecture.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupArchitecture.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupArchitecture.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupArchitecture.cpp Wed May 16 18:32:55 2012
@@ -36,7 +36,7 @@
 uint32_t
 OptionGroupArchitecture::GetNumDefinitions ()
 {
-    return arraysize(g_option_table);
+    return llvm::array_lengthof(g_option_table);
 }
 
 const OptionDefinition *

Modified: lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupOutputFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupOutputFile.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupOutputFile.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupOutputFile.cpp Wed May 16 18:32:55 2012
@@ -38,7 +38,7 @@
 uint32_t
 OptionGroupOutputFile::GetNumDefinitions ()
 {
-    return arraysize(g_option_table);
+    return llvm::array_lengthof(g_option_table);
 }
 
 const OptionDefinition *

Modified: lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupPlatform.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupPlatform.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupPlatform.cpp Wed May 16 18:32:55 2012
@@ -99,8 +99,8 @@
 OptionGroupPlatform::GetNumDefinitions ()
 {
     if (m_include_platform_option)
-        return arraysize(g_option_table);
-    return arraysize(g_option_table) - 1;
+        return llvm::array_lengthof(g_option_table);
+    return llvm::array_lengthof(g_option_table) - 1;
 }
 
 

Modified: lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupUUID.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupUUID.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupUUID.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupUUID.cpp Wed May 16 18:32:55 2012
@@ -36,7 +36,7 @@
 uint32_t
 OptionGroupUUID::GetNumDefinitions ()
 {
-    return arraysize(g_option_table);
+    return llvm::array_lengthof(g_option_table);
 }
 
 const OptionDefinition *

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=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupValueObjectDisplay.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupValueObjectDisplay.cpp Wed May 16 18:32:55 2012
@@ -49,7 +49,7 @@
 uint32_t
 OptionGroupValueObjectDisplay::GetNumDefinitions ()
 {
-    return arraysize(g_option_table);
+    return llvm::array_lengthof(g_option_table);
 }
 
 const OptionDefinition *

Modified: lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupVariable.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupVariable.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupVariable.cpp Wed May 16 18:32:55 2012
@@ -107,9 +107,9 @@
     // Count the "--no-args", "--no-locals" and "--show-globals" 
     // options if we are showing frame specific options.
     if (include_frame_options)
-        return arraysize(g_option_table);
+        return llvm::array_lengthof(g_option_table);
     else
-        return arraysize(g_option_table) - NUM_FRAME_OPTS;
+        return llvm::array_lengthof(g_option_table) - NUM_FRAME_OPTS;
 }
 
 

Modified: lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupWatchpoint.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupWatchpoint.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Interpreter/OptionGroupWatchpoint.cpp Wed May 16 18:32:55 2012
@@ -99,5 +99,5 @@
 uint32_t
 OptionGroupWatchpoint::GetNumDefinitions ()
 {
-    return arraysize(g_option_table);
+    return llvm::array_lengthof(g_option_table);
 }

Modified: lldb/branches/apple/python-GIL/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Wed May 16 18:32:55 2012
@@ -289,7 +289,7 @@
     module_spec.GetUUID() = image_info.uuid;
     ModuleSP module_sp (target_images.FindFirstModule (module_spec));
     
-    if (module_sp)
+    if (module_sp && !module_spec.GetUUID().IsValid() && !module_sp->GetUUID().IsValid())
     {
         // No UUID, we must rely upon the cached module modification 
         // time and the modification time of the file on disk
@@ -301,22 +301,19 @@
     {
         if (can_create)
         {
-            if (!module_sp)
+            module_sp = m_process->GetTarget().GetSharedModule (module_spec);
+            if (!module_sp || module_sp->GetObjectFile() == NULL)
             {
-                module_sp = m_process->GetTarget().GetSharedModule (module_spec);
-                if (!module_sp || module_sp->GetObjectFile() == NULL)
-                {
-                    const bool add_image_to_target = true;
-                    const bool load_image_sections_in_target = false;
-                    module_sp = m_process->ReadModuleFromMemory (image_info.file_spec,
-                                                                 image_info.address,
-                                                                 add_image_to_target,
-                                                                 load_image_sections_in_target);
-                }
-
-                if (did_create_ptr)
-                    *did_create_ptr = module_sp;
+                const bool add_image_to_target = true;
+                const bool load_image_sections_in_target = false;
+                module_sp = m_process->ReadModuleFromMemory (image_info.file_spec,
+                                                             image_info.address,
+                                                             add_image_to_target,
+                                                             load_image_sections_in_target);
             }
+
+            if (did_create_ptr)
+                *did_create_ptr = module_sp;
         }
     }
     return module_sp;

Modified: lldb/branches/apple/python-GIL/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp Wed May 16 18:32:55 2012
@@ -76,7 +76,7 @@
         }
 
         // We can limit the creation of this plug-in to "*-apple-macosx" or "*-apple-ios" triples
-        // if we command out the lines below...
+        // if we comment out the lines below...
 //        if (create)
 //        {
 //            const llvm::Triple &triple_ref = process->GetTarget().GetArchitecture().GetTriple();

Modified: lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Wed May 16 18:32:55 2012
@@ -848,7 +848,7 @@
     { "q15",  NULL,   16,  0, eEncodingVector,  eFormatVectorOfUInt8, { LLDB_INVALID_REGNUM, dwarf_q15,   LLDB_INVALID_REGNUM,   106,    106 },  g_q15_regs,              NULL}
     };
 
-    static const uint32_t num_registers = arraysize(g_register_infos);
+    static const uint32_t num_registers = llvm::array_lengthof(g_register_infos);
     static ConstString gpr_reg_set ("General Purpose Registers");
     static ConstString sfp_reg_set ("Software Floating Point Registers");
     static ConstString vfp_reg_set ("Floating Point Registers");
@@ -900,7 +900,7 @@
     else
     {
         // Add composite registers to our primordial registers, then.
-        const uint32_t num_composites = arraysize(g_composites);
+        const uint32_t num_composites = llvm::array_lengthof(g_composites);
         const uint32_t num_primordials = GetNumRegisters();
         RegisterInfo *g_comp_register_infos = g_register_infos + (num_registers - num_composites);
         for (i=0; i<num_composites; ++i)

Modified: lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Wed May 16 18:32:55 2012
@@ -2497,6 +2497,12 @@
                                     StringExtractorGDBRemote response;
                                     StateType stop_state = process->GetGDBRemote().SendContinuePacketAndWaitForResponse (process, continue_cstr, continue_cstr_len, response);
 
+                                    // We need to immediately clear the thread ID list so we are sure to get a valid list of threads.
+                                    // The thread ID list might be contained within the "response", or the stop reply packet that
+                                    // caused the stop. So clear it now before we give the stop reply packet to the process
+                                    // using the process->SetLastStopPacket()...
+                                    process->ClearThreadIDList ();
+
                                     switch (stop_state)
                                     {
                                     case eStateStopped:

Modified: lldb/branches/apple/python-GIL/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Wed May 16 18:32:55 2012
@@ -2290,86 +2290,94 @@
         DWARFDebugInfo* debug_info = DebugInfo();
         if (debug_info)
         {
-            dw_offset_t cu_offset = debug_info->GetCompileUnitAranges().FindAddress(file_vm_addr);
+            const dw_offset_t cu_offset = debug_info->GetCompileUnitAranges().FindAddress(file_vm_addr);
             if (cu_offset != DW_INVALID_OFFSET)
             {
-                uint32_t cu_idx;
+                uint32_t cu_idx = DW_INVALID_INDEX;
                 DWARFCompileUnit* dwarf_cu = debug_info->GetCompileUnit(cu_offset, &cu_idx).get();
                 if (dwarf_cu)
                 {
                     sc.comp_unit = GetCompUnitForDWARFCompUnit(dwarf_cu, cu_idx);
-                    assert(sc.comp_unit != NULL);
-                    resolved |= eSymbolContextCompUnit;
-
-                    if (resolve_scope & eSymbolContextLineEntry)
+                    if (sc.comp_unit)
                     {
-                        LineTable *line_table = sc.comp_unit->GetLineTable();
-                        if (line_table != NULL)
+                        resolved |= eSymbolContextCompUnit;
+
+                        if (resolve_scope & eSymbolContextLineEntry)
                         {
-                            if (so_addr.IsLinkedAddress())
+                            LineTable *line_table = sc.comp_unit->GetLineTable();
+                            if (line_table != NULL)
                             {
-                                Address linked_addr (so_addr);
-                                linked_addr.ResolveLinkedAddress();
-                                if (line_table->FindLineEntryByAddress (linked_addr, sc.line_entry))
+                                if (so_addr.IsLinkedAddress())
+                                {
+                                    Address linked_addr (so_addr);
+                                    linked_addr.ResolveLinkedAddress();
+                                    if (line_table->FindLineEntryByAddress (linked_addr, sc.line_entry))
+                                    {
+                                        resolved |= eSymbolContextLineEntry;
+                                    }
+                                }
+                                else if (line_table->FindLineEntryByAddress (so_addr, sc.line_entry))
                                 {
                                     resolved |= eSymbolContextLineEntry;
                                 }
                             }
-                            else if (line_table->FindLineEntryByAddress (so_addr, sc.line_entry))
-                            {
-                                resolved |= eSymbolContextLineEntry;
-                            }
-                        }
-                    }
-
-                    if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock))
-                    {
-                        DWARFDebugInfoEntry *function_die = NULL;
-                        DWARFDebugInfoEntry *block_die = NULL;
-                        if (resolve_scope & eSymbolContextBlock)
-                        {
-                            dwarf_cu->LookupAddress(file_vm_addr, &function_die, &block_die);
-                        }
-                        else
-                        {
-                            dwarf_cu->LookupAddress(file_vm_addr, &function_die, NULL);
                         }
 
-                        if (function_die != NULL)
+                        if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock))
                         {
-                            sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(function_die->GetOffset())).get();
-                            if (sc.function == NULL)
-                                sc.function = ParseCompileUnitFunction(sc, dwarf_cu, function_die);
-                        }
-                        else
-                        {
-                            // We might have had a compile unit that had discontiguous
-                            // address ranges where the gaps are symbols that don't have
-                            // any debug info. Discontiguous compile unit address ranges
-                            // should only happen when there aren't other functions from
-                            // other compile units in these gaps. This helps keep the size
-                            // of the aranges down.
-                            sc.comp_unit = NULL;
-                            resolved &= ~eSymbolContextCompUnit;
-                        }
+                            DWARFDebugInfoEntry *function_die = NULL;
+                            DWARFDebugInfoEntry *block_die = NULL;
+                            if (resolve_scope & eSymbolContextBlock)
+                            {
+                                dwarf_cu->LookupAddress(file_vm_addr, &function_die, &block_die);
+                            }
+                            else
+                            {
+                                dwarf_cu->LookupAddress(file_vm_addr, &function_die, NULL);
+                            }
 
-                        if (sc.function != NULL)
-                        {
-                            resolved |= eSymbolContextFunction;
+                            if (function_die != NULL)
+                            {
+                                sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(function_die->GetOffset())).get();
+                                if (sc.function == NULL)
+                                    sc.function = ParseCompileUnitFunction(sc, dwarf_cu, function_die);
+                            }
+                            else
+                            {
+                                // We might have had a compile unit that had discontiguous
+                                // address ranges where the gaps are symbols that don't have
+                                // any debug info. Discontiguous compile unit address ranges
+                                // should only happen when there aren't other functions from
+                                // other compile units in these gaps. This helps keep the size
+                                // of the aranges down.
+                                sc.comp_unit = NULL;
+                                resolved &= ~eSymbolContextCompUnit;
+                            }
 
-                            if (resolve_scope & eSymbolContextBlock)
+                            if (sc.function != NULL)
                             {
-                                Block& block = sc.function->GetBlock (true);
+                                resolved |= eSymbolContextFunction;
 
-                                if (block_die != NULL)
-                                    sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset()));
-                                else
-                                    sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset()));
-                                if (sc.block)
-                                    resolved |= eSymbolContextBlock;
+                                if (resolve_scope & eSymbolContextBlock)
+                                {
+                                    Block& block = sc.function->GetBlock (true);
+
+                                    if (block_die != NULL)
+                                        sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset()));
+                                    else
+                                        sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset()));
+                                    if (sc.block)
+                                        resolved |= eSymbolContextBlock;
+                                }
                             }
                         }
                     }
+                    else
+                    {
+                        GetObjectFile()->GetModule()->ReportWarning ("0x%8.8x: compile unit %u failed to create a valid lldb_private::CompileUnit class.",
+                                                                     cu_offset,
+                                                                     cu_idx);
+                    }
                 }
             }
         }
@@ -2399,72 +2407,79 @@
                 {
                     SymbolContext sc (m_obj_file->GetModule());
                     sc.comp_unit = GetCompUnitForDWARFCompUnit(dwarf_cu, cu_idx);
-                    assert(sc.comp_unit != NULL);
-
-                    uint32_t file_idx = UINT32_MAX;
-
-                    // If we are looking for inline functions only and we don't
-                    // find it in the support files, we are done.
-                    if (check_inlines)
+                    if (sc.comp_unit)
                     {
-                        file_idx = sc.comp_unit->GetSupportFiles().FindFileIndex (1, file_spec, true);
-                        if (file_idx == UINT32_MAX)
-                            continue;
-                    }
+                        uint32_t file_idx = UINT32_MAX;
 
-                    if (line != 0)
-                    {
-                        LineTable *line_table = sc.comp_unit->GetLineTable();
+                        // If we are looking for inline functions only and we don't
+                        // find it in the support files, we are done.
+                        if (check_inlines)
+                        {
+                            file_idx = sc.comp_unit->GetSupportFiles().FindFileIndex (1, file_spec, true);
+                            if (file_idx == UINT32_MAX)
+                                continue;
+                        }
 
-                        if (line_table != NULL && line != 0)
+                        if (line != 0)
                         {
-                            // We will have already looked up the file index if
-                            // we are searching for inline entries.
-                            if (!check_inlines)
-                                file_idx = sc.comp_unit->GetSupportFiles().FindFileIndex (1, file_spec, true);
+                            LineTable *line_table = sc.comp_unit->GetLineTable();
 
-                            if (file_idx != UINT32_MAX)
+                            if (line_table != NULL && line != 0)
                             {
-                                uint32_t found_line;
-                                uint32_t line_idx = line_table->FindLineEntryIndexByFileIndex (0, file_idx, line, false, &sc.line_entry);
-                                found_line = sc.line_entry.line;
+                                // We will have already looked up the file index if
+                                // we are searching for inline entries.
+                                if (!check_inlines)
+                                    file_idx = sc.comp_unit->GetSupportFiles().FindFileIndex (1, file_spec, true);
 
-                                while (line_idx != UINT32_MAX)
+                                if (file_idx != UINT32_MAX)
                                 {
-                                    sc.function = NULL;
-                                    sc.block = NULL;
-                                    if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock))
+                                    uint32_t found_line;
+                                    uint32_t line_idx = line_table->FindLineEntryIndexByFileIndex (0, file_idx, line, false, &sc.line_entry);
+                                    found_line = sc.line_entry.line;
+
+                                    while (line_idx != UINT32_MAX)
                                     {
-                                        const lldb::addr_t file_vm_addr = sc.line_entry.range.GetBaseAddress().GetFileAddress();
-                                        if (file_vm_addr != LLDB_INVALID_ADDRESS)
+                                        sc.function = NULL;
+                                        sc.block = NULL;
+                                        if (resolve_scope & (eSymbolContextFunction | eSymbolContextBlock))
                                         {
-                                            DWARFDebugInfoEntry *function_die = NULL;
-                                            DWARFDebugInfoEntry *block_die = NULL;
-                                            dwarf_cu->LookupAddress(file_vm_addr, &function_die, resolve_scope & eSymbolContextBlock ? &block_die : NULL);
-
-                                            if (function_die != NULL)
+                                            const lldb::addr_t file_vm_addr = sc.line_entry.range.GetBaseAddress().GetFileAddress();
+                                            if (file_vm_addr != LLDB_INVALID_ADDRESS)
                                             {
-                                                sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(function_die->GetOffset())).get();
-                                                if (sc.function == NULL)
-                                                    sc.function = ParseCompileUnitFunction(sc, dwarf_cu, function_die);
-                                            }
+                                                DWARFDebugInfoEntry *function_die = NULL;
+                                                DWARFDebugInfoEntry *block_die = NULL;
+                                                dwarf_cu->LookupAddress(file_vm_addr, &function_die, resolve_scope & eSymbolContextBlock ? &block_die : NULL);
 
-                                            if (sc.function != NULL)
-                                            {
-                                                Block& block = sc.function->GetBlock (true);
+                                                if (function_die != NULL)
+                                                {
+                                                    sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(function_die->GetOffset())).get();
+                                                    if (sc.function == NULL)
+                                                        sc.function = ParseCompileUnitFunction(sc, dwarf_cu, function_die);
+                                                }
 
-                                                if (block_die != NULL)
-                                                    sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset()));
-                                                else
-                                                    sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset()));
+                                                if (sc.function != NULL)
+                                                {
+                                                    Block& block = sc.function->GetBlock (true);
+
+                                                    if (block_die != NULL)
+                                                        sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset()));
+                                                    else
+                                                        sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset()));
+                                                }
                                             }
                                         }
-                                    }
 
-                                    sc_list.Append(sc);
-                                    line_idx = line_table->FindLineEntryIndexByFileIndex (line_idx + 1, file_idx, found_line, true, &sc.line_entry);
+                                        sc_list.Append(sc);
+                                        line_idx = line_table->FindLineEntryIndexByFileIndex (line_idx + 1, file_idx, found_line, true, &sc.line_entry);
+                                    }
                                 }
                             }
+                            else if (file_spec_matches_cu_file_spec && !check_inlines)
+                            {
+                                // only append the context if we aren't looking for inline call sites
+                                // by file and line and if the file spec matches that of the compile unit
+                                sc_list.Append(sc);
+                            }
                         }
                         else if (file_spec_matches_cu_file_spec && !check_inlines)
                         {
@@ -2472,16 +2487,10 @@
                             // by file and line and if the file spec matches that of the compile unit
                             sc_list.Append(sc);
                         }
-                    }
-                    else if (file_spec_matches_cu_file_spec && !check_inlines)
-                    {
-                        // only append the context if we aren't looking for inline call sites
-                        // by file and line and if the file spec matches that of the compile unit
-                        sc_list.Append(sc);
-                    }
 
-                    if (!check_inlines)
-                        break;
+                        if (!check_inlines)
+                            break;
+                    }
                 }
             }
         }
@@ -2713,7 +2722,6 @@
                     case DW_TAG_variable:
                         {
                             sc.comp_unit = GetCompUnitForDWARFCompUnit(dwarf_cu, UINT32_MAX);
-                            assert(sc.comp_unit != NULL);
                     
                             if (namespace_decl && !DIEIsInNamespace (namespace_decl, dwarf_cu, die))
                                 continue;

Modified: lldb/branches/apple/python-GIL/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Symbol/ClangASTType.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Symbol/ClangASTType.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Symbol/ClangASTType.cpp Wed May 16 18:32:55 2012
@@ -577,6 +577,8 @@
     case clang::Type::Typedef:
             return ClangASTType::GetFormat(llvm::cast<clang::TypedefType>(qual_type)->getDecl()->getUnderlyingType().getAsOpaquePtr());
 
+    case clang::Type::Auto:
+            return ClangASTType::GetFormat(llvm::cast<clang::AutoType>(qual_type)->desugar().getAsOpaquePtr());
     case clang::Type::DependentSizedArray:
     case clang::Type::DependentSizedExtVector:
     case clang::Type::UnresolvedUsing:
@@ -586,7 +588,6 @@
     case clang::Type::TemplateTypeParm:
     case clang::Type::SubstTemplateTypeParm:
     case clang::Type::SubstTemplateTypeParmPack:
-    case clang::Type::Auto:
     case clang::Type::InjectedClassName:
     case clang::Type::DependentName:
     case clang::Type::DependentTemplateSpecialization:

Modified: lldb/branches/apple/python-GIL/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/source/Target/Process.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/source/Target/Process.cpp (original)
+++ lldb/branches/apple/python-GIL/source/Target/Process.cpp Wed May 16 18:32:55 2012
@@ -3099,6 +3099,8 @@
             // If we are going to stop, then we always broadcast the event.
             // If we aren't going to stop, let the thread plans decide if we're going to report this event.
             // If no thread has an opinion, we don't report it.
+            
+            RefreshStateAfterStop ();
             if (ProcessEventData::GetInterruptedFromEvent (event_ptr))
             {
                 if (log)
@@ -3107,7 +3109,6 @@
             }
             else
             {
-                RefreshStateAfterStop ();
 
                 if (m_thread_list.ShouldStop (event_ptr) == false)
                 {

Modified: lldb/branches/apple/python-GIL/test/functionalities/abbreviation/TestAbbreviations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/test/functionalities/abbreviation/TestAbbreviations.py?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/test/functionalities/abbreviation/TestAbbreviations.py (original)
+++ lldb/branches/apple/python-GIL/test/functionalities/abbreviation/TestAbbreviations.py Wed May 16 18:32:55 2012
@@ -30,9 +30,15 @@
                     COMMAND_FAILED_AS_EXPECTED, error = True,
                     substrs = ["error: 'gurp' is not a valid command."])
 
+        # Only one matching command: execute it.
         self.expect("h",
                     startstr = "The following is a list of built-in, permanent debugger commands:")
 
+        # Several matching commands: list them and error out.
+        self.expect("t",
+                    COMMAND_FAILED_AS_EXPECTED, error = True,
+                    substrs = ["Ambiguous command 't'. Possible matches:",
+                               "target", "thread", "type"])
 
         self.expect("com sou ./change_prompt.lldb",
                     patterns = ["Executing commands in '.*change_prompt.lldb'"])

Modified: lldb/branches/apple/python-GIL/test/functionalities/alias/TestAliases.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/test/functionalities/alias/TestAliases.py?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/test/functionalities/alias/TestAliases.py (original)
+++ lldb/branches/apple/python-GIL/test/functionalities/alias/TestAliases.py Wed May 16 18:32:55 2012
@@ -28,6 +28,23 @@
                     patterns = [ "Current executable set to .*a.out" ])
 
 
+        def cleanup():
+            self.runCmd('command unalias hello', check=False)
+            self.runCmd('command unalias python', check=False)
+            self.runCmd('command unalias pp', check=False)
+            self.runCmd('command unalias alias', check=False)
+            self.runCmd('command unalias unalias', check=False)
+            self.runCmd('command unalias myrun', check=False)
+            self.runCmd('command unalias bp', check=False)
+            self.runCmd('command unalias bpa', check=False)
+            self.runCmd('command unalias bpi', check=False)
+            self.runCmd('command unalias bfl', check=False)
+            self.runCmd('command unalias exprf', check=False)
+            self.runCmd('command unalias exprf2', check=False)
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
         self.runCmd (r'''command alias hello expr (int) printf ("\n\nHello, anybody!\n\n")''')
 
         self.runCmd ("command alias python script")

Modified: lldb/branches/apple/python-GIL/test/functionalities/load_unload/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/test/functionalities/load_unload/Makefile?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/test/functionalities/load_unload/Makefile (original)
+++ lldb/branches/apple/python-GIL/test/functionalities/load_unload/Makefile Wed May 16 18:32:55 2012
@@ -1,7 +1,10 @@
 all: a.out liba.dylib libb.dylib libc.dylib libd.dylib
 
 CC ?= clang
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
+ifeq "$(ARCH)" ""
+	ARCH = x86_64
+endif
+CFLAGS ?=-arch $(ARCH) -gdwarf-2 -O0
 CWD := $(shell pwd)
 
 all: a.out hidden/libd.dylib

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=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/test/lldbtest.py (original)
+++ lldb/branches/apple/python-GIL/test/lldbtest.py Wed May 16 18:32:55 2012
@@ -9,88 +9,23 @@
 or when running each test case as a separate python invocation.
 
 ./dotest.py provides a test driver which sets up the environment to run the
-entire test suite.  Users who want to run a test case on its own can specify the
-LLDB_TEST and PYTHONPATH environment variables, for example:
-
-$ export LLDB_TEST=$PWD
-$ export PYTHONPATH=/Volumes/data/lldb/svn/trunk/build/Debug/LLDB.framework/Resources/Python:$LLDB_TEST:$LLDB_TEST/plugins:$LLDB_TEST/pexpect-2.4
-$ echo $LLDB_TEST
-/Volumes/data/lldb/svn/trunk/test
-$ echo $PYTHONPATH
-/Volumes/data/lldb/svn/trunk/build/Debug/LLDB.framework/Resources/Python:/Volumes/data/lldb/svn/trunk/test:/Volumes/data/lldb/svn/trunk/test/plugins
-$ python function_types/TestFunctionTypes.py
-.
-----------------------------------------------------------------------
-Ran 1 test in 0.363s
-
-OK
-$ LLDB_COMMAND_TRACE=YES python array_types/TestArrayTypes.py
+entire of part of the test suite .  Example:
 
+# Exercises the test suite in the types directory....
+/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -A x86_64 types
 ...
 
-runCmd: breakpoint set -f main.c -l 42
-output: Breakpoint created: 1: file ='main.c', line = 42, locations = 1
+Session logs for test failures/errors/unexpected successes will go into directory '2012-05-16-13_35_42'
+Command invoked: python ./dotest.py -A x86_64 types
+compilers=['clang']
 
-runCmd: run
-output: Launching '/Volumes/data/lldb/svn/trunk/test/array_types/a.out'  (x86_64)
-
-...
-
-runCmd: frame variable strings
-output: (char *[4]) strings = {
-  (char *) strings[0] = 0x0000000100000f0c "Hello",
-  (char *) strings[1] = 0x0000000100000f12 "Hola",
-  (char *) strings[2] = 0x0000000100000f17 "Bonjour",
-  (char *) strings[3] = 0x0000000100000f1f "Guten Tag"
-}
-
-runCmd: frame variable char_16
-output: (char [16]) char_16 = {
-  (char) char_16[0] = 'H',
-  (char) char_16[1] = 'e',
-  (char) char_16[2] = 'l',
-  (char) char_16[3] = 'l',
-  (char) char_16[4] = 'o',
-  (char) char_16[5] = ' ',
-  (char) char_16[6] = 'W',
-  (char) char_16[7] = 'o',
-  (char) char_16[8] = 'r',
-  (char) char_16[9] = 'l',
-  (char) char_16[10] = 'd',
-  (char) char_16[11] = '\n',
-  (char) char_16[12] = '\0',
-  (char) char_16[13] = '\0',
-  (char) char_16[14] = '\0',
-  (char) char_16[15] = '\0'
-}
-
-runCmd: frame variable ushort_matrix
-output: (unsigned short [2][3]) ushort_matrix = {
-  (unsigned short [3]) ushort_matrix[0] = {
-    (unsigned short) ushort_matrix[0][0] = 0x0001,
-    (unsigned short) ushort_matrix[0][1] = 0x0002,
-    (unsigned short) ushort_matrix[0][2] = 0x0003
-  },
-  (unsigned short [3]) ushort_matrix[1] = {
-    (unsigned short) ushort_matrix[1][0] = 0x000b,
-    (unsigned short) ushort_matrix[1][1] = 0x0016,
-    (unsigned short) ushort_matrix[1][2] = 0x0021
-  }
-}
-
-runCmd: frame variable long_6
-output: (long [6]) long_6 = {
-  (long) long_6[0] = 1,
-  (long) long_6[1] = 2,
-  (long) long_6[2] = 3,
-  (long) long_6[3] = 4,
-  (long) long_6[4] = 5,
-  (long) long_6[5] = 6
-}
+Configuration: arch=x86_64 compiler=clang
+----------------------------------------------------------------------
+Collected 72 tests
 
-.
+........................................................................
 ----------------------------------------------------------------------
-Ran 1 test in 0.349s
+Ran 72 tests in 135.468s
 
 OK
 $ 

Modified: lldb/branches/apple/python-GIL/test/redo.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/test/redo.py?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/test/redo.py (original)
+++ lldb/branches/apple/python-GIL/test/redo.py Wed May 16 18:32:55 2012
@@ -113,13 +113,12 @@
     global filename_components
 
     test_dir = sys.path[0]
+    if not test_dir:
+        test_dir = os.getcwd()
     if not test_dir.endswith('test'):
         print "This script expects to reside in lldb's test directory."
         sys.exit(-1)
 
-    if not len(sys.argv) > 1:
-        usage()
-
     index = 1
     while index < len(sys.argv):
         if sys.argv[index].startswith('-h'):
@@ -166,7 +165,7 @@
     os.path.walk(session_dir_path, redo, ".log")
 
     if not redo_specs:
-        print "No failures/errors recorded within the session directory, please specify a different session directory."
+        print "No failures/errors recorded within the session directory, please specify a different session directory.\n"
         usage()
 
     filters = " -f ".join(redo_specs)

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=156962&r1=156961&r2=156962&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 May 16 18:32:55 2012
@@ -495,7 +495,7 @@
 					i386,
 				);
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 186;
+				CURRENT_PROJECT_VERSION = 187;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -515,7 +515,7 @@
 					armv7s,
 				);
 				"ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD_64_BIT)";
-				CURRENT_PROJECT_VERSION = 186;
+				CURRENT_PROJECT_VERSION = 187;
 				DEAD_CODE_STRIPPING = YES;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -540,7 +540,7 @@
 					x86_64,
 					i386,
 				);
-				CURRENT_PROJECT_VERSION = 186;
+				CURRENT_PROJECT_VERSION = 187;
 				DEAD_CODE_STRIPPING = YES;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -560,7 +560,7 @@
 				"ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD_32_BIT)";
 				"CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist";
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 186;
+				CURRENT_PROJECT_VERSION = 187;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks;
 				"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = (
@@ -612,7 +612,7 @@
 				"ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD_32_BIT)";
 				"CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist";
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 186;
+				CURRENT_PROJECT_VERSION = 187;
 				FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks;
 				"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = (
 					"$(SDKROOT)/System/Library/PrivateFrameworks",
@@ -661,7 +661,7 @@
 				"ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD_32_BIT)";
 				"CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist";
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 186;
+				CURRENT_PROJECT_VERSION = 187;
 				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/tools/debugserver/source/RNBSocket.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/tools/debugserver/source/RNBSocket.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/tools/debugserver/source/RNBSocket.cpp (original)
+++ lldb/branches/apple/python-GIL/tools/debugserver/source/RNBSocket.cpp Wed May 16 18:32:55 2012
@@ -189,10 +189,10 @@
     // Disconnect from any previous connections
     Disconnect(false);
 
-    m_fd = ::lockdown_checkin (NULL, NULL);
-    if (m_fd == -1)
+    if (::lockdown_secure_checkin (&m_fd, NULL, NULL, NULL) != kLDESuccess)
     {
-        DNBLogThreadedIf(LOG_RNB_COMM, "::lockdown_checkin(NULL, NULL) failed");
+        DNBLogThreadedIf(LOG_RNB_COMM, "::lockdown_secure_checkin(&m_fd, NULL, NULL, NULL) failed");
+        m_fd = -1;
         return rnb_not_connected;
     }
     m_fd_from_lockdown = true;

Modified: lldb/branches/apple/python-GIL/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/python-GIL/tools/driver/Driver.cpp?rev=156962&r1=156961&r2=156962&view=diff
==============================================================================
--- lldb/branches/apple/python-GIL/tools/driver/Driver.cpp (original)
+++ lldb/branches/apple/python-GIL/tools/driver/Driver.cpp Wed May 16 18:32:55 2012
@@ -135,7 +135,7 @@
 void
 Driver::CloseIOChannelFile ()
 {
-    // Write and End of File sequence to the file descriptor to ensure any
+    // Write an End of File sequence to the file descriptor to ensure any
     // read functions can exit.
     char eof_str[] = "\x04";
     ::write (m_editline_pty.GetMasterFileDescriptor(), eof_str, strlen(eof_str));





More information about the lldb-commits mailing list