This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA/testsuite: Make signals test more specific
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: fnasser at redhat dot com
- Date: Wed, 30 Oct 2002 17:05:10 -0500
- Subject: RFA/testsuite: Make signals test more specific
Signal frame backtraces in the presence of a stripped libc.so.6 have been
broken for a while now on i386 GNU/Linux. The test didn't catch it,
however. We would get a backtrace that looked like:
handler
sigaction
__libc_start_main
instead of:
handler
<signal handler called>
main
__libc_start_main
(purely by coincidences in the stack frame layout, as far as I can tell).
This makes the test a little more sensitive: it looks for " main " instead
of "main", and it looks for "signal handler" in the next-to-top frame. OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* gdb.base/signals.exp: Make backtrace tests more specific.
Index: testsuite/gdb.base/signals.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/signals.exp,v
retrieving revision 1.3
diff -u -p -r1.3 signals.exp
--- testsuite/gdb.base/signals.exp 16 Mar 2001 08:57:44 -0000 1.3
+++ testsuite/gdb.base/signals.exp 30 Oct 2002 22:00:12 -0000
@@ -185,7 +185,7 @@ proc signal_tests_1 {} {
# #2, #3, or higher. At some point this should be fixed (but
# it quite possibly would introduce new FAILs on some systems).
setup_xfail "i*86-*-bsdi2.0"
- gdb_test "backtrace 10" "#0.*handler.*#1.*#2.*main.*" \
+ gdb_test "backtrace 10" "#0.*handler.*#1.*signal handler.*#2.* main .*" \
"backtrace in signals_tests_1"
gdb_test "break func1" "Breakpoint \[0-9\]+ .*"
@@ -415,7 +415,7 @@ The program being debugged stopped while
# But we should be able to backtrace...
# On alpha-*-osf2.0 this test works when run manually but sometime fails when
# run under dejagnu, making it very hard to debug the problem. Weird...
- gdb_test "bt 10" "#0.*handler.*#1.*#2.*main.*" "bt in signals.exp"
+ gdb_test "bt 10" "#0.*handler.*#1.*signal handler.*#2.* main .*" "bt in signals.exp"
# ...and continue...
gdb_test "continue" "Continuing\\." "continue in signals.exp"
# ...and then count should have been incremented