Run dsymutil on darwin, when it is expected, before running gdb test.
authorDevang Patel <dpatel@apple.com>
Mon, 2 Feb 2009 21:09:36 +0000 (21:09 +0000)
committerDevang Patel <dpatel@apple.com>
Mon, 2 Feb 2009 21:09:36 +0000 (21:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63548 91177308-0d34-0410-b5e6-96231b3b80d8

test/FrontendC++/2006-11-30-Pubnames.cpp
test/Makefile
test/lib/llvm.exp

index 5dd1439224ceba956caed326bd60deb54f07649a..8af99e37c989a1a7252ff06af5aabf8c1c4c44ee 100644 (file)
@@ -4,6 +4,7 @@
 // RUN:   llc --disable-fp-elim -o %t.s -f
 // RUN: %compile_c %t.s -o %t.o
 // RUN: %link %t.o -o %t.exe
+// RUN: %llvmdsymutil %t.exe 
 // RUN: echo {break main\nrun\np Pubnames::pubname} > %t.in
 // RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | grep {\$1 = 10}
 // XFAIL: alpha|ia64|arm
index b6067c372fae438bb0f3e0dacfa6889f3790abfc..7ce4086f1af4743841890dcf24d8100cca34b988 100644 (file)
@@ -81,6 +81,13 @@ endif
 clean::
        $(RM) -rf `find $(LLVM_OBJ_ROOT)/test -name Output -type d -print`
 
+# dsymutil is used on the Darwin to manipulate DWARF debugging information.
+ifeq ($(OS),Darwin)
+DSYMUTIL=dsymutil
+else
+DSYMUTIL=true
+endif
+
 FORCE:
 
 site.exp: FORCE
@@ -112,6 +119,7 @@ site.exp: FORCE
        @echo 'set valgrind "$(VALGRIND)"' >> site.tmp
        @echo 'set grep "$(GREP)"' >>site.tmp
        @echo 'set gas "$(GAS)"' >>site.tmp
+       @echo 'set llvmdsymutil "$(DSYMUTIL)"' >>site.tmp
        @echo '## All variables above are generated by configure. Do Not Edit ## ' >>site.tmp
        @test ! -f site.exp || \
        sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
index b5d5cffae1e0f7b579b88d181f7196fd65261d7d..ab8522ab6a282b8de445e0bdaea093d8bfac9b41 100644 (file)
@@ -48,7 +48,7 @@ proc execOneLine { test PRS outcome lineno line } {
 proc substitute { line test tmpFile } {
   global srcroot objroot srcdir objdir subdir target_triplet prcontext 
   global llvmgcc llvmgxx llvmgcc_version llvmgccmajvers ocamlc
-  global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir
+  global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir llvmdsymutil
   global valgrind grep gas
   set path [file join $srcdir $subdir]
 
@@ -73,6 +73,8 @@ proc substitute { line test tmpFile } {
   regsub -all {%shlibext} $new_line "$shlibext" new_line
   #replace %ocamlc with ocaml compiler command
   regsub -all {%ocamlc} $new_line "$ocamlc" new_line
+  #replace %llvmdsymutil with dsymutil command
+  regsub -all {%llvmdsymutil} $new_line "$llvmdsymutil" new_line
   #replace %llvmlibsdir with configure library directory
   regsub -all {%llvmlibsdir} $new_line "$llvmlibsdir" new_line
   #replace %p with path to source,