This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] tweak for gdb.asm/asm-source.exp
- To: Fernando Nasser <fnasser at redhat dot com>
- Subject: Re: [RFA] tweak for gdb.asm/asm-source.exp
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Wed, 07 Nov 2001 14:46:57 -0800
- CC: gdb-patches at sources dot redhat dot com, cagney at redhat dot com
- Organization: Red Hat
- References: <200111072041.fA7KfFH20266@reddwarf.cygnus.com> <3BE99F33.EC345DDF@redhat.com>
Fernando Nasser wrote:
>
> Michael Snyder wrote:
> >
> > This accounts for backtraces in which 'main' was called from 'start'.
> >
>
> Michael,
>
> If you just make the additional part of the pattern (the one you've
> added)
> optional, you can still use gdb_test, which is much preferable.
>
> Can you do that?
OK, how about the following?
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: gdb.asm/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 22:44:11
*************** 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,104 ----
# `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(.*#2.*start\[^\r\n\]*)?" \
! "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"