Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Report watchpoints hits for 'debug infrun'.
@ 2007-12-01 11:09 Vladimir Prus
  2007-12-01 15:28 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2007-12-01 11:09 UTC (permalink / raw)
  To: gdb-patches


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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-01 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-01 11:09 [RFA] Report watchpoints hits for 'debug infrun' Vladimir Prus
2007-12-01 15:28 ` Daniel Jacobowitz
2007-12-01 15:40   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox