]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2013-04-25 Hui Zhu <hui@codesourcery.com>
authorHui Zhu <teawater@gmail.com>
Thu, 25 Apr 2013 01:26:36 +0000 (01:26 +0000)
committerHui Zhu <teawater@gmail.com>
Thu, 25 Apr 2013 01:26:36 +0000 (01:26 +0000)
PR gdb/15293

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

2013-04-25  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 c35799b124d5242c13b47a6058268ba867694163..1c9c92671b6f7b81a1a60679853b3a2538409d15 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-25  Hui Zhu  <hui@codesourcery.com>
+
+       PR gdb/15293
+
+       * breakpoint.c (bpstat_what): Add BPSTAT_WHAT_SINGLE to bp_dprintf.
+
 2013-04-24  Hui Zhu  <hui@codesourcery.com>
 
        PR gdb/15165
index 4bcfea794ddefa526e77820f40811238c88f9739..a589e3fc0a062889d830682d24ec2d0983d6ccfa 100644 (file)
@@ -5534,7 +5534,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 1af13e803b9cd8b6e6c5fd8a917cc4d206154d85..e3abb18cd3d5708d01b801b65ffa274a32fe51b2 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-25  Hui Zhu  <hui@codesourcery.com>
+
+       PR gdb/15293
+
+       * gdb.base/dprintf.exp: Add ignore command.
+
 2013-04-24  Hui Zhu  <hui@codesourcery.com>
 
        PR gdb/15165
index 2b00c241b62b98fefcda086b2e4b5f85e0d6c685..430168bab0e962f0319510ef1e9d119b72773731 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"