From 936db25482e2c655fdb8bd42d9409073ae436ad3 Mon Sep 17 00:00:00 2001 From: chastain Date: Mon, 3 Feb 2003 16:04:18 +0000 Subject: [PATCH] 2003-02-01 Michael Chastain * gdb.base/advance.c (marker1): New marker function. * gdb.base/advance.exp: When the 'advance' command lands on the return breakpoint, it can legitimately stop on either the current line or the next line. Accommodate both outcomes. * gdb.base/until.exp: Likewise. --- gdb/testsuite/gdb.base/advance.c | 5 +++++ gdb/testsuite/gdb.base/advance.exp | 6 +++++- gdb/testsuite/gdb.base/until.exp | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/advance.c b/gdb/testsuite/gdb.base/advance.c index 2ae3cc50c4..8066deec42 100644 --- a/gdb/testsuite/gdb.base/advance.c +++ b/gdb/testsuite/gdb.base/advance.c @@ -29,6 +29,10 @@ int func3 () x = 4; } +void marker1 () +{ +} + int main () { @@ -38,6 +42,7 @@ main () b = 3; /* advance this location */ func (c); /* stop here after leaving current frame */ + marker1 (); /* stop here after leaving current frame */ func3 (); /* break here */ result = bar (b + foo (c)); return 0; /* advance malformed */ diff --git a/gdb/testsuite/gdb.base/advance.exp b/gdb/testsuite/gdb.base/advance.exp index aea5a6d57f..e5061d8fbf 100644 --- a/gdb/testsuite/gdb.base/advance.exp +++ b/gdb/testsuite/gdb.base/advance.exp @@ -63,8 +63,12 @@ gdb_test "advance func" \ # Verify that "advance " when funcname is NOT called by the current # frame, stops at the end of the current frame. # +# gdb can legitimately stop on either the current line or the next line, +# depending on whether the machine instruction for 'call' on the current +# line has more instructions after it or not. +# gdb_test "advance func3" \ - "in main.*func \\(c\\).*stop here after leaving current frame..."\ + "(in main|).*(func \\(c\\)|marker1 \\(\\)).*stop here after leaving current frame..."\ "advance function not called by current frame" # break at main again diff --git a/gdb/testsuite/gdb.base/until.exp b/gdb/testsuite/gdb.base/until.exp index 815933279c..f646c6d36a 100644 --- a/gdb/testsuite/gdb.base/until.exp +++ b/gdb/testsuite/gdb.base/until.exp @@ -76,6 +76,6 @@ delete_breakpoints # stop at main, the caller, where we put the 'guard' breakpoint. # gdb_test "until marker3" \ - "$hex in main.*argc.*argv.*envp.*at.*${srcfile}:82.*marker2 \\(43\\)." \ + "($hex in |)main.*argc.*argv.*envp.*at.*${srcfile}:(82.*marker2 \\(43\\)|83.*marker3 \\(.stack., .trace.\\))." \ "until func, not called by current frame" -- 2.11.0