Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Klaus Gerlicher <klaus.gerlicher@intel.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/1] gdb, breakpoint: use breakpoint_debug_printf
Date: Tue,  8 Jul 2025 13:21:23 +0000	[thread overview]
Message-ID: <20250708132123.561491-1-klaus.gerlicher@intel.com> (raw)

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


             reply	other threads:[~2025-07-08 13:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08 13:21 Klaus Gerlicher [this message]
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

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=20250708132123.561491-1-klaus.gerlicher@intel.com \
    --to=klaus.gerlicher@intel.com \
    --cc=gdb-patches@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: 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