From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aQ7wB4obbWgUuy4AWB0awg (envelope-from ) for ; Tue, 08 Jul 2025 09:22:18 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=DVS/VTqp; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 047FB1E11C; Tue, 8 Jul 2025 09:22:18 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-10.1 required=5.0 tests=ARC_SIGNED,ARC_VALID, BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5AFD31E089 for ; Tue, 8 Jul 2025 09:22:16 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D696E38505DC for ; Tue, 8 Jul 2025 13:22:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D696E38505DC Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=DVS/VTqp Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by sourceware.org (Postfix) with ESMTPS id 4975438505E0 for ; Tue, 8 Jul 2025 13:21:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4975438505E0 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4975438505E0 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.12 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751980902; cv=none; b=elRT95vFJmt12yCjjZhEQ3ZtNXTybkvlcdHEs2KYRyYqV3pX0JMT1lL1Y9vdQHmxbMoA1IY92UV5sBGmKiKbvSKWDuhaLEsSsGh5oq6CmMJd9bi4nZuHwaW02fsEHo4ElzkPbx+RO8xfN7pDT8rQu0FIlHWZWvSWbeB5N72tmOQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1751980902; c=relaxed/simple; bh=tvV+oJ0TmD8uEl4jkwg++p0dtRf5tWYq0jLWadebnk8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=JrgvBFszQj6On6qUMm3qf0VT+TYeXjWtBZEL9F0zDbBpE2JEhyRgwg03LApvcSOOVfbr9PXmpOpFtj9LWLp+vn41KHtnVOa8bgP8GrFUlrFH2W2gMwAbBAwnO4WIv2YgkjZTIvtxiJGhR6QdldoGl1FX8DzouFWWDcUqUB9hvW0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4975438505E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1751980902; x=1783516902; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=tvV+oJ0TmD8uEl4jkwg++p0dtRf5tWYq0jLWadebnk8=; b=DVS/VTqpA2Yi+QNzSGX3hFFmX0a6fnZ208ElmRqQ/oRa0TlaY7dz7V4G DukpHtJbHlcbN+nOk09W4gRLRAOEHVqxJcHu5ucn9noOxsLp1xXrCpJ10 Vc+XKqGK6bCsTkaO1eIV2mHct5DHowRpdHhbLF4g3L3A2xVGcqvfBsnJL ij7wo+jN2/NTvy8h4uQ+YbSklgSb807He+RtsWXXfqKPKLL89WZkzCAWW YScCpNstvR6DxRLQrhPPJbtq7vm0EQ9Fo3bjMbO0S42xCGcDVsD7k/V5S irfStr/e97s3+NIkvKKqFahNnBEJeKxv6yuRr1576g1ljeQLMQ757zVuk g==; X-CSE-ConnectionGUID: UUlWXmU9S26oiNV1v5vVUQ== X-CSE-MsgGUID: 0x0EUceNTWqQeWNrU1i/Hg== X-IronPort-AV: E=McAfee;i="6800,10657,11487"; a="65675594" X-IronPort-AV: E=Sophos;i="6.16,297,1744095600"; d="scan'208";a="65675594" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2025 06:21:41 -0700 X-CSE-ConnectionGUID: 5Xfzyvc/SnWNdlweyvfJYA== X-CSE-MsgGUID: GjzFuVYlRR+/yzU8hdjnfA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,297,1744095600"; d="scan'208";a="155623736" Received: from dut1865dg2frd.igk.intel.com (HELO localhost) ([10.211.179.243]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2025 06:21:41 -0700 From: Klaus Gerlicher To: gdb-patches@sourceware.org Subject: [PATCH 1/1] gdb, breakpoint: use breakpoint_debug_printf Date: Tue, 8 Jul 2025 13:21:23 +0000 Message-Id: <20250708132123.561491-1-klaus.gerlicher@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org 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