This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] tweak for gdb.asm/asm-source.exp
- To: gdb-patches at sources dot redhat dot com
- Subject: [RFA] tweak for gdb.asm/asm-source.exp
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Wed, 7 Nov 2001 12:41:15 -0800
- Cc: cagney at redhat dot com, fnasser at redhat dot com
This accounts for backtraces in which 'main' was called from 'start'.
2001-11-07 Michael Snyder <msnyder@redhat.com>
* gdb.asm/asm-source.exp (bt ALL in foo2): Accept a backtrace that
includes a stack frame for "start".
Index: asm-source.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 asm-source.exp
*** asm-source.exp 2001/03/06 08:21:49 1.3
--- asm-source.exp 2001/11/07 20:39:48
*************** gdb_test "f" ".*asmsrc2\[.\]s:8.*" "f in
*** 93,100 ****
# `next' one insn (or macro) to set up our stackframe (for the following bt).
gdb_test "n" "12\[ \]*.*foo3" "n in foo2"
! # See if a simple `bt' prints the right source files and doesn't fall off the stack.
! gdb_test "bt 10" "\#0.*foo2.*asmsrc2\[.\]s:12.*\#1.*main.*asmsrc1\[.\]s:33" "bt ALL in foo2"
# See if a capped `bt' prints the right source files.
gdb_test "bt 2" "\#0.*foo2.*asmsrc2\[.\]s:12.*\#1.*main.*asmsrc1\[.\]s:33.*" "bt 2 in foo2"
--- 93,114 ----
# `next' one insn (or macro) to set up our stackframe (for the following bt).
gdb_test "n" "12\[ \]*.*foo3" "n in foo2"
! # See if a simple `bt' prints the right source files and
! # doesn't fall off the stack.
!
! send_gdb "bt 10\n"
! gdb_expect {
! -re "\#0.*foo2.*asmsrc2\[.\]s:12.*\#1.*main.*asmsrc1\[.\]s:33\[\r\n\]+$gdb_prompt $" {
! # Only two stack frames (no "start" function)
! pass "bt ALL in foo2"
! }
! -re "\#0.*foo2.*asmsrc2\[.\]s:12.*\#1.*main.*asmsrc1\[.\]s:33.*#2.*start\[^\r\n\]*\[\r\n\]+$gdb_prompt $" {
! pass "bt ALL in foo2 (with start function)"
! }
! -re ".*$gdb_prompt $" {
! fail "bt ALL in foo2"
! }
! }
# See if a capped `bt' prints the right source files.
gdb_test "bt 2" "\#0.*foo2.*asmsrc2\[.\]s:12.*\#1.*main.*asmsrc1\[.\]s:33.*" "bt 2 in foo2"