Index: gdb/testsuite/gdb.dwarf2/nostaticblock.exp |
diff --git a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp |
similarity index 57% |
copy from gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp |
copy to gdb/testsuite/gdb.dwarf2/nostaticblock.exp |
index 2baae8b62d12e3822531755326b1513108f252d1..9db1f263e901aff7757def80a1ea02e0605ea108 100644 |
--- a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp |
+++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp |
@@ -1,4 +1,4 @@ |
-# Copyright 2011-2012 Free Software Foundation, Inc. |
+# Copyright 2013 Free Software Foundation, Inc. |
# This program is free software; you can redistribute it and/or modify |
# it under the terms of the GNU General Public License as published by |
@@ -19,16 +19,41 @@ if {![dwarf2_support]} { |
return 0 |
} |
-standard_testfile .S |
-set executable ${testfile} |
+if { [skip_cplus_tests] } { continue } |
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } { |
+standard_testfile main.c .S |
+ |
+# Make some DWARF for the test. |
+set asm_file [standard_output_file $srcfile2] |
+Dwarf::assemble $asm_file { |
+ cu {} { |
+ compile_unit { |
+ {low_pc 0x104320 DW_FORM_addr} |
+ {high_pc 0x1045ed DW_FORM_addr} |
+ } { |
+ } |
+ } |
+} |
+ |
+if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \ |
+ object {nodebug}] != ""} { |
+ return -1 |
+} |
+ |
+if {[gdb_compile $asm_file ${binfile}2.o object {nodebug}] != ""} { |
return -1 |
} |
+if {[gdb_compile [list ${binfile}1.o ${binfile}2.o] \ |
+ "${binfile}" executable {c++}] != ""} { |
+ return -1 |
+} |
+ |
+clean_restart ${testfile} |
+ |
set saved_gdbflags $GDBFLAGS |
set GDBFLAGS "$GDBFLAGS --readnow" |
-clean_restart $executable |
+clean_restart $testfile |
set GDBFLAGS $saved_gdbflags |
gdb_test "p 1" " = 1" "alive" |