aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.base/unwind-on-each-insn.exp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
index 46bea80..faa6a1a 100644
--- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
+++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp
@@ -149,6 +149,13 @@ for { set i_count 1 } { true } { incr i_count } {
break
}
+ if { $i_count > 100 } {
+ # We expect a handful of instructions, if we reach 100,
+ # something is going wrong. Avoid an infinite loop.
+ fail "exceeded max number of instructions"
+ break
+ }
+
gdb_test "stepi" ".*"
}
}