Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 1/1] gdb, breakpoint: use breakpoint_debug_printf
@ 2025-07-08 13:21 Klaus Gerlicher
  2025-07-08 15:46 ` Kevin Buettner
  2025-07-09 19:21 ` Tom Tromey
  0 siblings, 2 replies; 7+ messages in thread
From: Klaus Gerlicher @ 2025-07-08 13:21 UTC (permalink / raw)
  To: gdb-patches

Some debug prints in breakpoint.c are using
infrun_debug_printf ().  This does not seem to be the
right debug print macro.

Use breakpoint_debug_printf () exclusively in this file.
---
 gdb/breakpoint.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index d704ad1e3e2..a4eb337746c 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -2531,8 +2531,8 @@ should_be_inserted (struct bp_location *bl)
       && !(bl->owner->type == bp_single_step
 	   && thread_is_stepping_over_breakpoint (bl->owner->thread)))
     {
-      infrun_debug_printf ("skipping breakpoint: stepping past insn at: %s",
-			   paddress (bl->gdbarch, bl->address));
+      breakpoint_debug_printf ("skipping breakpoint: stepping past insn at: %s",
+			       paddress (bl->gdbarch, bl->address));
       return false;
     }
 
@@ -2541,9 +2541,9 @@ should_be_inserted (struct bp_location *bl)
   if ((bl->loc_type == bp_loc_hardware_watchpoint)
       && stepping_past_nonsteppable_watchpoint ())
     {
-      infrun_debug_printf ("stepping past non-steppable watchpoint. "
-			   "skipping watchpoint at %s:%d",
-			   paddress (bl->gdbarch, bl->address), bl->length);
+      breakpoint_debug_printf ("stepping past non-steppable watchpoint. "
+			       "skipping watchpoint at %s:%d",
+			       paddress (bl->gdbarch, bl->address), bl->length);
       return false;
     }
 
@@ -5679,9 +5679,9 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
   b = bs->breakpoint_at;
   gdb_assert (b != NULL);
 
-  infrun_debug_printf ("thread = %s, breakpoint %d.%d",
-		       thread->ptid.to_string ().c_str (),
-		       b->number, find_loc_num_by_location (bl));
+  breakpoint_debug_printf ("thread = %s, breakpoint %d.%d",
+			   thread->ptid.to_string ().c_str (),
+			   b->number, find_loc_num_by_location (bl));
 
   /* Even if the target evaluated the condition on its end and notified GDB, we
      need to do so again since GDB does not know if we stopped due to a
@@ -5690,9 +5690,9 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
   if (frame_id_p (b->frame_id)
       && b->frame_id != get_stack_frame_id (get_current_frame ()))
     {
-      infrun_debug_printf ("incorrect frame %s not %s, not stopping",
-			   get_stack_frame_id (get_current_frame ()).to_string ().c_str (),
-			   b->frame_id.to_string ().c_str ());
+      breakpoint_debug_printf ("incorrect frame %s not %s, not stopping",
+	get_stack_frame_id (get_current_frame ()).to_string ().c_str (),
+	b->frame_id.to_string ().c_str ());
       bs->stop = false;
       return;
     }
@@ -5704,7 +5704,7 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
       || (b->inferior != -1 && b->inferior != thread->inf->num)
       || (b->task != -1 && b->task != ada_get_task_number (thread)))
     {
-      infrun_debug_printf ("incorrect thread or task, not stopping");
+      breakpoint_debug_printf ("incorrect thread or task, not stopping");
       bs->stop = false;
       return;
     }
@@ -5803,14 +5803,14 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
 
   if (cond != nullptr && !condition_result)
     {
-      infrun_debug_printf ("condition_result = false, not stopping");
+      breakpoint_debug_printf ("condition_result = false, not stopping");
       bs->stop = false;
       return;
     }
   else if (b->ignore_count > 0)
     {
-      infrun_debug_printf ("ignore count %d, not stopping",
-			   b->ignore_count);
+      breakpoint_debug_printf ("ignore count %d, not stopping",
+			       b->ignore_count);
       b->ignore_count--;
       bs->stop = false;
       /* Increase the hit count even though we don't stop.  */
@@ -5820,9 +5820,9 @@ bpstat_check_breakpoint_conditions (bpstat *bs, thread_info *thread)
     }
 
   if (bs->stop)
-    infrun_debug_printf ("stopping at this breakpoint");
+    breakpoint_debug_printf ("stopping at this breakpoint");
   else
-    infrun_debug_printf ("not stopping at this breakpoint");
+    breakpoint_debug_printf ("not stopping at this breakpoint");
 }
 
 /* Returns true if we need to track moribund locations of LOC's type
@@ -6044,7 +6044,7 @@ handle_jit_event (CORE_ADDR address)
 {
   struct gdbarch *gdbarch;
 
-  infrun_debug_printf ("handling bp_jit_event");
+  breakpoint_debug_printf ("handling bp_jit_event");
 
   /* Switch terminal for any messages produced by
      breakpoint_re_set.  */
-- 
2.34.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


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

end of thread, other threads:[~2025-07-17 17:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-08 13:21 [PATCH 1/1] gdb, breakpoint: use breakpoint_debug_printf Klaus Gerlicher
2025-07-08 15:46 ` Kevin Buettner
2025-07-09 19:21 ` Tom Tromey
2025-07-10  2:58   ` Kevin Buettner
2025-07-10  8:43     ` Gerlicher, Klaus
2025-07-11 15:22       ` Simon Marchi
2025-07-17 17:02       ` Andrew Burgess

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