2013-04-23 Hui Zhu <hui@codesourcery.com>
authorHui Zhu <teawater@gmail.com>
Tue, 23 Apr 2013 03:20:21 +0000 (03:20 +0000)
committerHui Zhu <teawater@gmail.com>
Tue, 23 Apr 2013 03:20:21 +0000 (03:20 +0000)
PR gdb/15293

* breakpoint.c (bpstat_what): Add BPSTAT_WHAT_SINGLE to bp_dprintf.

2013-04-23  Hui Zhu  <hui@codesourcery.com>

PR gdb/15293

* gdb.base/dprintf.exp: Add ignore command.

gdb/ChangeLog
gdb/breakpoint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/dprintf.exp

index 636f776591858010433ef79409b2515d0e78d270..911353dfd0f7a99e3f2379ff04b3458529ef832d 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-23  Hui Zhu  <hui@codesourcery.com>
+
+       PR gdb/15293
+
+       * breakpoint.c (bpstat_what): Add BPSTAT_WHAT_SINGLE to bp_dprintf.
+
 2013-04-23  Hui Zhu  <hui@codesourcery.com>
 
        PR gdb/15165
index 84c5b46273c42b65a66b5c2a36e2ea2b61d0ae84..f155b9eb59ed874fb0e5f5ccd0419d950ed42651 100644 (file)
@@ -5529,7 +5529,10 @@ bpstat_what (bpstat bs_head)
          break;
 
        case bp_dprintf:
-         this_action = BPSTAT_WHAT_STOP_SILENT;
+         if (bs->stop)
+           this_action = BPSTAT_WHAT_STOP_SILENT;
+         else
+           this_action = BPSTAT_WHAT_SINGLE;
          break;
 
        default:
index c0188c0840cc55a004134f629cd27096fdf1c904..df720531a2d40537d80dadf05d7be80b4d20fe71 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-23  Hui Zhu  <hui@codesourcery.com>
+
+       PR gdb/15293
+
+       * gdb.base/dprintf.exp: Add ignore command.
+
 2013-04-23  Hui Zhu  <hui@codesourcery.com>
 
        PR gdb/15165
index 253e016b01872987a2b0796071ee14d0b528d64b..71f35545d706143c09fbe22c94f38cd84b364303 100644 (file)
@@ -40,6 +40,8 @@ gdb_breakpoint "main"
 gdb_test "dprintf foo,\"At foo entry\\n\"" \
   "Dprintf .*"
 
+gdb_test "ignore \$bpnum 1" ".*Will ignore next crossing of breakpoint.*"
+
 gdb_test "dprintf $dp_location1,\"arg=%d, g=%d\\n\", arg, g" \
   "Dprintf .*"
 
@@ -61,7 +63,7 @@ gdb_run_cmd
 
 gdb_test "" "Breakpoint"
 
-gdb_test "continue" "At foo entry.*arg=1234, g=1234.*" "1st dprintf, gdb"
+gdb_test "continue" "arg=1234, g=1234.*" "1st dprintf, gdb"
 
 gdb_test "continue" "At foo entry.*arg=1235, g=2222.*" "2nd dprintf, gdb"