[Lldb-commits] [lldb] r138036 - in /lldb/trunk: lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme llvm.zip scripts/build-llvm.pl scripts/llvm.isreg.diff source/Symbol/ClangASTContext.cpp test/lang/c/function_types/TestFunctionTypes.py

Sean Callanan scallanan at apple.com
Thu Aug 18 23:19:26 PDT 2011


Author: spyffe
Date: Fri Aug 19 01:19:25 2011
New Revision: 138036

URL: http://llvm.org/viewvc/llvm-project?rev=138036&view=rev
Log:
Refined the rollback to LLVM, picking up a newer
revision and adding a patch that fixes an AsmParser
crash on ARM.

One feature that we unfortunately lost (for the
moment!) is the ability to cast unknown code symbols
to arbitrary function types and put the resulting
function pointer in a result variable.  This feature
will be back, though.

Added:
    lldb/trunk/scripts/llvm.isreg.diff
Modified:
    lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
    lldb/trunk/llvm.zip
    lldb/trunk/scripts/build-llvm.pl
    lldb/trunk/source/Symbol/ClangASTContext.cpp
    lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py

Modified: lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme?rev=138036&r1=138035&r2=138036&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme (original)
+++ lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme Fri Aug 19 01:19:25 2011
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   version = "1.8">
+   version = "1.3">
    <BuildAction
       parallelizeBuildables = "NO"
       buildImplicitDependencies = "YES">
@@ -28,6 +28,15 @@
       buildConfiguration = "Debug">
       <Testables>
       </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
+            BuildableName = "lldb"
+            BlueprintName = "lldb-tool"
+            ReferencedContainer = "container:lldb.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
       <CommandLineArguments>
          <CommandLineArgument
             argument = "/Volumes/work/gclayton/Documents/src/attach/a.out"
@@ -79,7 +88,8 @@
       customWorkingDirectory = "/Volumes/work/gclayton/Documents/devb/attach"
       buildConfiguration = "Debug"
       ignoresPersistentStateOnLaunch = "YES"
-      enablesOpenGLESFrameCapture = "YES">
+      debugDocumentVersioning = "YES"
+      allowLocationSimulation = "YES">
       <BuildableProductRunnable>
          <BuildableReference
             BuildableIdentifier = "primary"
@@ -129,7 +139,8 @@
       savedToolIdentifier = ""
       useCustomWorkingDirectory = "NO"
       buildConfiguration = "Release"
-      ignoresPersistentStateOnLaunch = "YES">
+      ignoresPersistentStateOnLaunch = "YES"
+      debugDocumentVersioning = "YES">
       <BuildableProductRunnable>
          <BuildableReference
             BuildableIdentifier = "primary"

Modified: lldb/trunk/llvm.zip
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/llvm.zip?rev=138036&r1=138035&r2=138036&view=diff
==============================================================================
Binary files - no diff available.

Modified: lldb/trunk/scripts/build-llvm.pl
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/build-llvm.pl?rev=138036&r1=138035&r2=138036&view=diff
==============================================================================
--- lldb/trunk/scripts/build-llvm.pl (original)
+++ lldb/trunk/scripts/build-llvm.pl Fri Aug 19 01:19:25 2011
@@ -23,7 +23,7 @@
 our $llvm_configuration = $ENV{LLVM_CONFIGURATION};
 
 our $llvm_revision = "137143";
-our $clang_revision = "137311";
+our $clang_revision = "137143";
 
 our $llvm_source_dir = "$ENV{SRCROOT}";
 our @archs = split (/\s+/, $ENV{ARCHS});
@@ -156,7 +156,16 @@
 		do_command ("cd '$llvm_source_dir' && svn co $svn_options --revision $llvm_revision http://llvm.org/svn/llvm-project/llvm/trunk llvm", "checking out llvm from repository", 1); 
 		print "Checking out clang sources from revision $clang_revision...\n";
 		do_command ("cd '$llvm_source_dir/llvm/tools' && svn co $svn_options --revision $clang_revision http://llvm.org/svn/llvm-project/cfe/trunk clang", "checking out clang from repository", 1);
-		print "Removing the llvm/test directory...\n";
+        print "Applying any local patches to LLVM...";
+        
+        my @llvm_patches = bsd_glob("$ENV{SRCROOT}/scripts/llvm.*.diff");
+        
+        foreach my $patch (@llvm_patches)
+        {
+            do_command ("cd '$llvm_source_dir/llvm' && patch -p0 < $patch");
+        }
+		
+        print "Removing the llvm/test directory...\n";
 		do_command ("cd '$llvm_source_dir' && rm -rf llvm/test", "removing test directory", 1); 
 	}
 

Added: lldb/trunk/scripts/llvm.isreg.diff
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/llvm.isreg.diff?rev=138036&view=auto
==============================================================================
--- lldb/trunk/scripts/llvm.isreg.diff (added)
+++ lldb/trunk/scripts/llvm.isreg.diff Fri Aug 19 01:19:25 2011
@@ -0,0 +1,12 @@
+Index: lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+===================================================================
+--- lib/Target/ARM/AsmParser/ARMAsmParser.cpp	(revision 137143)
++++ lib/Target/ARM/AsmParser/ARMAsmParser.cpp	(working copy)
+@@ -2619,6 +2619,7 @@
+   if (Mnemonic == "mov" && Operands.size() > 4 &&
+       !static_cast<ARMOperand*>(Operands[4])->isARMSOImm() &&
+       static_cast<ARMOperand*>(Operands[4])->isImm0_65535Expr() &&
++      static_cast<ARMOperand*>(Operands[1])->isReg() &&
+       static_cast<ARMOperand*>(Operands[1])->getReg() == 0) {
+     ARMOperand *Op = static_cast<ARMOperand*>(Operands[1]);
+     Operands.erase(Operands.begin() + 1);

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=138036&r1=138035&r2=138036&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Aug 19 01:19:25 2011
@@ -4960,12 +4960,12 @@
 clang::DeclContext *
 ClangASTContext::GetAsDeclContext (clang::CXXMethodDecl *cxx_method_decl)
 {
-    return clang::dyn_cast<clang::DeclContext>(cxx_method_decl);
+    return llvm::dyn_cast<clang::DeclContext>(cxx_method_decl);
 }
 
 clang::DeclContext *
 ClangASTContext::GetAsDeclContext (clang::ObjCMethodDecl *objc_method_decl)
 {
-    return clang::dyn_cast<clang::DeclContext>(objc_method_decl);
+    return llvm::dyn_cast<clang::DeclContext>(objc_method_decl);
 }
 

Modified: lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py?rev=138036&r1=138035&r2=138036&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py (original)
+++ lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py Fri Aug 19 01:19:25 2011
@@ -24,12 +24,12 @@
     def test_pointers_with_dsym(self):
         """Test that a function pointer to 'printf' works and can be called."""
         self.buildDsym()
-        self.function_pointers()
+        #self.function_pointers() # ROLLED BACK
     
     def test_pointers_with_dwarf(self):
         """Test that a function pointer to 'printf' works and can be called."""
         self.buildDwarf()
-        self.function_pointers()
+        #self.function_pointers() # ROLLED BACK
 
     def setUp(self):
         # Call super's setUp().





More information about the lldb-commits mailing list