aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-03-26 08:29:48 +0000
committerYao Qi <yao.qi@linaro.org>2015-03-26 08:29:48 +0000
commit8518049884947da598e2f585bf9a4589df7096e9 (patch)
tree09339eff8f189665acbf655213f4b3af7ee92f28
parent8aa08a8dd596758904f1e994057c94bd655dda2e (diff)
downloadgdb-8518049884947da598e2f585bf9a4589df7096e9.zip
gdb-8518049884947da598e2f585bf9a4589df7096e9.tar.gz
gdb-8518049884947da598e2f585bf9a4589df7096e9.tar.bz2
Compile break-asm-file{0,1}.s without debug info
If I add some nop into break-asm-file1.s like this, --- INDEX:/gdb/testsuite/gdb.linespec/break-asm-file1.s +++ WORKDIR:/gdb/testsuite/gdb.linespec/break-asm-file1.s @@ -31,8 +31,8 @@ _func: .type func, %function func: .Lbegin_func: - .int 0 - .int 0 + nop + nop .Lend_func: .size func, .-func .Lend_text1: I get the following error: Running gdb/testsuite/gdb.linespec/break-asm-file.exp ... gdb/testsuite/gdb.linespec/break-asm-file1.s: Assembler messages:^M gdb/testsuite/gdb.linespec/break-asm-file1.s: Fatal error: duplicate .debug_line sections break-asm-file0.s and break-asm-file1.s have already had debug information (written manually), so don't need to generate debug infor for them. gdb/testsuite: 2015-03-26 Yao Qi <yao.qi@linaro.org> * gdb.linespec/break-asm-file.exp: Don't call prepare_for_testing. Call gdb_compile instead to compile each .s files without debug information.
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.linespec/break-asm-file.exp23
2 files changed, 24 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 735616e..00d05f0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2015-03-26 Yao Qi <yao.qi@linaro.org>
+ * gdb.linespec/break-asm-file.exp: Don't call prepare_for_testing.
+ Call gdb_compile instead to compile each .s files without debug
+ information.
+
+2015-03-26 Yao Qi <yao.qi@linaro.org>
+
* gdb.base/savedregs.exp (process_saved_regs): Make
"Saved registers:" optional in the pattern.
diff --git a/gdb/testsuite/gdb.linespec/break-asm-file.exp b/gdb/testsuite/gdb.linespec/break-asm-file.exp
index c3e18dc..b2f3056 100644
--- a/gdb/testsuite/gdb.linespec/break-asm-file.exp
+++ b/gdb/testsuite/gdb.linespec/break-asm-file.exp
@@ -28,11 +28,24 @@ if {![dwarf2_support]} {
return 0
}
-if {[prepare_for_testing ${testfile}.exp $execfile \
- [list $srcfile $asm_file1 $asm_file0] \
- {debug nowarnings optimize=-O0}]} {
- untested "Skipping ${testfile}."
- return
+if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
+ object {debug nowarnings optimize=-O0}] != ""} {
+ return -1
+}
+
+# Compile .s files without debug information.
+if {[gdb_compile ${srcdir}/${subdir}/$asm_file0 ${binfile}2.o \
+ object {nodebug}] != ""} {
+ return -1
+}
+if {[gdb_compile ${srcdir}/${subdir}/$asm_file1 ${binfile}3.o \
+ object {nodebug}] != ""} {
+ return -1
+}
+
+if {[gdb_compile [list ${binfile}1.o ${binfile}2.o ${binfile}3.o] \
+ "${binfile}" executable {}] != ""} {
+ return -1
}
clean_restart $execfile