This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]