public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug breakpoints/15180] Agent style dprintf does not respect conditions Date: Mon, 02 Jun 2014 22:32:00 -0000 [thread overview] Message-ID: <bug-15180-4717-OelLdAkLLO@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-15180-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=15180 --- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via 41fac0cf495b84994046901e3293d54e8eef3534 (commit) via cd1608cc4ed6e657deb405283011a6c2a795fb80 (commit) via 0a261ed82e9b5f6fbc3725258a742515df8f4b42 (commit) from 96ae5695ce2512600524915ace0bfef95a9734fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41fac0cf495b84994046901e3293d54e8eef3534 commit 41fac0cf495b84994046901e3293d54e8eef3534 Author: Pedro Alves <palves@redhat.com> Date: Mon Jun 2 22:27:33 2014 +0100 Installing a breakpoint on top of a dprintf makes GDB lose control. While the full fix for PR 15180 isn't in, it's best if we at least make sure that GDB doesn't lose control when a breakpoint is set at the same address as a dprintf. gdb/ 2014-06-02 Pedro Alves <palves@redhat.com> * breakpoint.c (build_target_command_list): Don't build a command list if we have any duplicate location that isn't a dprintf. gdb/testsuite/ 2014-06-02 Pedro Alves <palves@redhat.com> * gdb.base/dprintf-bp-same-addr.c: New file. * gdb.base/dprintf-bp-same-addr.exp: New file. https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cd1608cc4ed6e657deb405283011a6c2a795fb80 commit cd1608cc4ed6e657deb405283011a6c2a795fb80 Author: Pedro Alves <palves@redhat.com> Date: Mon Jun 2 22:27:32 2014 +0100 dprintf-style agent can't explain a trap. If some event happens to trigger at the same address as a dprintf-style agent dprintf is installed, GDB will complain, like: (gdb) continue Continuing. May only run agent-printf on the target (gdb) Such dprintfs are completely handled on the target side, so they can't explain a stop, but GDB is currently putting then on the bpstat chain anyway, because they currently unconditionally use bkpt_breakpoint_hit as breakpoint_hit method. gdb/ 2014-06-02 Pedro Alves <palves@redhat.com> * breakpoint.c (dprintf_breakpoint_hit): New function. (initialize_breakpoint_ops): Install it as dprintf's breakpoint_hit method. https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0a261ed82e9b5f6fbc3725258a742515df8f4b42 commit 0a261ed82e9b5f6fbc3725258a742515df8f4b42 Author: Pedro Alves <palves@redhat.com> Date: Mon Jun 2 22:27:32 2014 +0100 gdbserver: on GDB breakpoint reinsertion, also delete the breakpoint's commands. If GDB decides to change the breakpoint's conditions or commands, it'll reinsert the same breakpoint again, with the new options attached, without deleting the previous breakpoint. E.g., (gdb) set breakpoint always-inserted on (gdb) b main if 0 Breakpoint 1 at 0x400594: file foo.c, line 21. Sending packet: $Z0,400594,1;X3,220027#68...Packet received: OK (gdb) b main Breakpoint 15 at 0x400594: file foo.c, line 21. Sending packet: $Z0,400594,1#49...Packet received: OK GDBserver understands this and deletes the breakpoint's previous conditions. But, it forgets to delete the previous commands. gdb/gdbserver/ 2014-06-02 Pedro Alves <palves@redhat.com> * ax.c (gdb_free_agent_expr): New function. * ax.h (gdb_free_agent_expr): New declaration. * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands list. (clear_breakpoint_conditions, clear_breakpoint_commands): Make static. (clear_breakpoint_conditions_and_commands): New function. * mem-break.h (clear_breakpoint_conditions): Delete declaration. (clear_breakpoint_conditions_and_commands): New declaration. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 11 ++++ gdb/breakpoint.c | 38 ++++++++++++-- gdb/gdbserver/ChangeLog | 12 ++++ gdb/gdbserver/ax.c | 10 ++++ gdb/gdbserver/ax.h | 3 + gdb/gdbserver/mem-break.c | 43 +++++++++++++-- gdb/gdbserver/mem-break.h | 5 +- gdb/gdbserver/server.c | 2 +- gdb/testsuite/ChangeLog | 5 ++ gdb/testsuite/gdb.base/dprintf-bp-same-addr.c | 28 ++++++++++ gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp | 66 +++++++++++++++++++++++ 11 files changed, 210 insertions(+), 13 deletions(-) create mode 100644 gdb/testsuite/gdb.base/dprintf-bp-same-addr.c create mode 100644 gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp -- You are receiving this mail because: You are on the CC list for the bug.
prev parent reply other threads:[~2014-06-02 22:32 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-02-23 13:41 [Bug breakpoints/15180] New: " marc.khouzam at ericsson dot com 2013-02-27 19:09 ` [Bug breakpoints/15180] " marc.khouzam at ericsson dot com 2013-04-23 7:00 ` teawater at gmail dot com 2013-04-23 7:15 ` teawater at gmail dot com 2013-04-24 1:22 ` teawater at gmail dot com 2013-09-23 18:06 ` marc.khouzam at ericsson dot com 2014-01-10 16:49 ` marc.khouzam at ericsson dot com 2014-06-02 22:32 ` cvs-commit at gcc dot gnu.org [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-15180-4717-OelLdAkLLO@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).