From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] Report watchpoints hits for 'debug infrun'.
Date: Sat, 01 Dec 2007 11:09:00 -0000 [thread overview]
Message-ID: <200712011409.02441.vladimir@codesourcery.com> (raw)
This patch make 'set debug infrun 1' produce more detailed
information about watchpoint hits. OK?
* gdb/infrun.c (handle_inferior_event): More
detailed debugging about watchpoint hit.
---
gdb/infrun.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index d79ed3f..6c62b60 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1597,7 +1597,17 @@ handle_inferior_event (struct execution_control_state *ecs)
stop_pc = read_pc_pid (ecs->ptid);
if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog, "infrun: stop_pc = 0x%s\n", paddr_nz (stop_pc));
+ {
+ CORE_ADDR addr;
+ fprintf_unfiltered (gdb_stdlog, "infrun: stop_pc = 0x%s\n", paddr_nz (stop_pc));
+ if (STOPPED_BY_WATCHPOINT (*ws))
+ {
+ fprintf_unfiltered (gdb_stdlog, "infrun: stopped by watchpoint\n");
+ fprintf_unfiltered (gdb_stdlog,
+ "infrun: stopped data address = 0x%s\n",
+ paddr_nz (addr));
+ }
+ }
if (stepping_past_singlestep_breakpoint)
{
@@ -1823,9 +1833,6 @@ handle_inferior_event (struct execution_control_state *ecs)
&& (HAVE_STEPPABLE_WATCHPOINT
|| gdbarch_have_nonsteppable_watchpoint (current_gdbarch)))
{
- if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog, "infrun: STOPPED_BY_WATCHPOINT\n");
-
/* At this point, we are stopped at an instruction which has
attempted to write to a piece of memory under control of
a watchpoint. The instruction hasn't actually executed
--
1.5.3.5
next reply other threads:[~2007-12-01 11:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-01 11:09 Vladimir Prus [this message]
2007-12-01 15:28 ` Daniel Jacobowitz
2007-12-01 15:40 ` Eli Zaretskii
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=200712011409.02441.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
/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: link
Be 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