Index: gdb/testsuite/gdb.python/py-events.exp |
diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp |
index 0b5c1cfd3f2927133d77e32e132665f4f95e931d..6b655bbb57dfa5c44f82422b2873c95b5b8ddeca 100644 |
--- a/gdb/testsuite/gdb.python/py-events.exp |
+++ b/gdb/testsuite/gdb.python/py-events.exp |
@@ -17,24 +17,18 @@ if [target_info exists use_gdb_stub] { |
return 0 |
} |
-if $tracelevel then { |
- strace $tracelevel |
-} |
- |
load_lib gdb-python.exp |
set libfile "py-events-shlib" |
set libsrc $srcdir/$subdir/$libfile.c |
-set lib_sl $objdir/$subdir/$libfile.so |
+set lib_sl [standard_output_file $libfile.so] |
set lib_opts debug |
-set testfile "py-events" |
-set srcfile ${testfile}.c |
-set binfile ${objdir}/${subdir}/${testfile} |
+standard_testfile |
set exec_opts [list debug shlib=$lib_sl] |
set pyfile ${srcdir}/${subdir}/${testfile}.py |
-if [get_compiler_info ${binfile}] { |
+if [get_compiler_info] { |
return -1 |
} |
@@ -73,14 +67,28 @@ gdb_test "continue" ".*event type: continue.* |
.*breakpoint number: 3.* |
all threads stopped" |
+# Test that when "step N" trips on a breakpoint, we get a stop event |
+# with breakpoint stop reason. |
+gdb_breakpoint "do_nothing" |
+gdb_test "step 3" ".*event type: continue.* |
+.*event type: stop.* |
+.*stop reason: breakpoint.* |
+.*first breakpoint number: 4.* |
+.*breakpoint number: 4.* |
+all threads stopped" |
+ |
+delete_breakpoints |
+ |
#test exited event. |
gdb_test "continue" ".*event type: continue.* |
.*event type: exit.* |
.*exit code: 12.* |
-.*exit inf: 1.*" "Inferior 1 terminated." |
+.*exit inf: 1.* |
+dir ok: True.*" "Inferior 1 terminated." |
gdb_test "inferior 2" ".*Switching to inferior 2.*" |
gdb_test "continue" ".*event type: continue.* |
.*event type: exit.* |
.*exit code: 12.* |
-.*exit inf: 2.*" "Inferior 2 terminated." |
+.*exit inf: 2.* |
+dir ok: True.*" "Inferior 2 terminated." |