2003-02-01 Michael Chastain <mec@shout.net>
authorMichael Chastain <mec@google.com>
Mon, 3 Feb 2003 16:07:31 +0000 (16:07 +0000)
committerMichael Chastain <mec@google.com>
Mon, 3 Feb 2003 16:07:31 +0000 (16:07 +0000)
* 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/ChangeLog
gdb/testsuite/gdb.base/advance.c
gdb/testsuite/gdb.base/advance.exp
gdb/testsuite/gdb.base/until.exp

index 82f3843f3ed22a75fbaddda0d76dbed7f1ff9732..5c5ee5b651b33c0993a0e36af9cb68fe9fda02e9 100644 (file)
@@ -1,3 +1,11 @@
+2003-02-01  Michael Chastain  <mec@shout.net>
+
+       * 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.
+
 2003-02-02  Andrew Cagney  <ac131313@redhat.com>
 
        2002-11-10 Jason Molenda (jason-cl@molenda.com):
index 2ae3cc50c4ae2bf1106fa991cb684ebfa76a07e8..8066deec421d0a1253eba604b1c7d7c1d9d1575b 100644 (file)
@@ -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 */
index aea5a6d57fcbca3a5f9635d8bfce21deaa2ac6a3..e5061d8fbf61903d0cc73f1db1e155c1d4cc5b6a 100644 (file)
@@ -63,8 +63,12 @@ gdb_test "advance func" \
 # Verify that "advance <funcname>" 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
index 815933279c9d0f07719ffb757346299c41a6c4eb..f646c6d36ae58f221498a8fbdaa9750723965926 100644 (file)
@@ -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"
 
This page took 0.032643 seconds and 4 git commands to generate.