This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
sigbpt.exp: Preset segv_addr
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: gdb-patches at sourceware dot org
- Cc: "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Thu, 17 May 2007 13:09:42 +0100 (BST)
- Subject: sigbpt.exp: Preset segv_addr
Hello,
The gdb.base/sigbpt.exp test script only sets the segv_addr variable if a
particular case succeeds. However later on it refers to the variable
unconditionally. As a result if the test case fails TCL bails out on a
reference to an undefined variable:
FAIL: gdb.base/sigbpt.exp: stepping to SIGSEGV
ERROR: tcl error sourcing <...>/gdb/testsuite/gdb.base/sigbpt.exp.
ERROR: can't read "segv_addr": no such variable
while executing
"string compare $segv_addr [at_segv]"
(file "<...>/gdb/testsuite/gdb.base/sigbpt.exp" line 1)
("uplevel" body line 1)
invoked from within
"catch "uplevel #0 source $test_file_name""
Here is a fix.
2007-05-17 Maciej W. Rozycki <macro@mips.com>
* gdb.base/sigbpt.exp: Preset segv_addr.
Applied as obvious.
Maciej
segv_addr.diff
Index: binutils-quilt/src/gdb/testsuite/gdb.base/sigbpt.exp
===================================================================
--- binutils-quilt.orig/src/gdb/testsuite/gdb.base/sigbpt.exp 2007-03-23 14:02:33.000000000 +0000
+++ binutils-quilt/src/gdb/testsuite/gdb.base/sigbpt.exp 2007-05-17 11:55:31.000000000 +0100
@@ -86,6 +86,7 @@
# of the actual SIGSEGV in segv_addr.
set bowler_addrs bowler
+set segv_addr none
gdb_test {display/i $pc}
gdb_test "advance *bowler" "bowler.*" "advance to the bowler"
set test "stepping to SIGSEGV"