* 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.
x = 4;
}
+void marker1 ()
+{
+}
+
int
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 */
# 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
# 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"