From 6748f044b259b846d19f02ff922a674b7c7f3bd7 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Mon, 2 Feb 2009 21:09:36 +0000 Subject: [PATCH] Run dsymutil on darwin, when it is expected, before running gdb test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63548 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/FrontendC++/2006-11-30-Pubnames.cpp | 1 + test/Makefile | 8 ++++++++ test/lib/llvm.exp | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/test/FrontendC++/2006-11-30-Pubnames.cpp b/test/FrontendC++/2006-11-30-Pubnames.cpp index 5dd1439224c..8af99e37c98 100644 --- a/test/FrontendC++/2006-11-30-Pubnames.cpp +++ b/test/FrontendC++/2006-11-30-Pubnames.cpp @@ -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 diff --git a/test/Makefile b/test/Makefile index b6067c372fa..7ce4086f1af 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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 diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp index b5d5cffae1e..ab8522ab6a2 100644 --- a/test/lib/llvm.exp +++ b/test/lib/llvm.exp @@ -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, -- 2.11.0