From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0UYPGyI2vmrkLCMAWB0awg (envelope-from ) for ; Thu, 01 Oct 2026 06:29:54 -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=IdDzXRP8; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4421F1E090; Thu, 01 Oct 2026 06:29:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 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 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (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 BEFF41E051 for ; Thu, 01 Oct 2026 06:29:42 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B2CC4BB5900 for ; Thu, 1 Oct 2026 10:29:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B2CC4BB5900 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=IdDzXRP8 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by sourceware.org (Postfix) with ESMTPS id 2E6A24BB5905 for ; Thu, 1 Oct 2026 10:28:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E6A24BB5905 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 2E6A24BB5905 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790850540; cv=none; b=We4N41a9A5l0zAJ8A/1WyvLm8grWYP+xfUhcZL1npNLjkc91wznv92cuNxk0BoIEaHJRJluEj5+SRvU7u8IaVOU28xPoiBw4dYi/ngn1htpjc547FFY+GdlMneIGlF22DMlnt0oAtRFoCbCxTEaV4Fix8dvkLNWwV3ZWYLeRRp8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790850540; c=relaxed/simple; bh=7e/Rg434i+bWMGT8F6GU/ta5RO2P3xZQsmm17dmaBZ4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=phgclvYFDtHqYZB91fonHQcBoL7wKJp+z96Q6c9Xy7WffpEjhVv2NEkipo3SSK3IvAAdM+UCEktUtT5lNNgLPXvfnRbXkdjhC6QXnMVTbh8qGTnsZHvJztCXyWAcXbVrmPp31xj+urvk7MFeGi3/uCs9ntrNj58uaug8AW7d7PU= ARC-Authentication-Results: i=1; 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=IdDzXRP8 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E6A24BB5905 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1790850540; x=1822386540; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=7e/Rg434i+bWMGT8F6GU/ta5RO2P3xZQsmm17dmaBZ4=; b=IdDzXRP8PPy+9lR5qUQGeyUgYxOrLMIlkOTHeh7K1DtTdMjz7+AzLxAE SH4II90Et8TCyl7Qi6JFhnW+Gf055/+96+ATUQOBiDdfBAEC0YqZvCyFF sklc7DEYkFXuNfFIMrTBls3EHvF7Nbs+ZoPlSSlQV3dBkEFEZDhtDkKtv FU4O02sm1njnBo8N9UdCni4CUZKMAS/z/tbJT0WOgJfPogg1GGhk6gYWQ uPwhyBUIlAutUqB819f7GhbLbbz9wWwsF04fkEOEGvHMC5OPaP3M6qjbk vckKTq63AuUUz5p85boQeINjT3jlz2KQ4GL/y3hGmL3I8TS8UxhS0bECC g==; X-CSE-ConnectionGUID: iAppy6hZSfWaZweK3IcyqA== X-CSE-MsgGUID: YfAyYVauSC++JwzHpo00Hw== X-IronPort-AV: E=McAfee;i="6800,10657,11921"; a="91619615" X-IronPort-AV: E=Sophos;i="6.27,134,1787036400"; d="scan'208";a="91619615" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2026 03:29:00 -0700 X-CSE-ConnectionGUID: rvFOy5JzTAG1vVw9lVwOaQ== X-CSE-MsgGUID: DPLNL0v5RByaqESbwElO6Q== X-ExtLoop1: 1 Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2026 03:28:58 -0700 From: Markus Metzger To: gdb-patches@sourceware.org Subject: [RFC PATCH 3/8] gdb, infrun: simplify print_stop_location() Date: Thu, 1 Oct 2026 12:28:42 +0200 Message-ID: <20261001102847.576880-4-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261001102847.576880-1-markus.t.metzger@intel.com> References: <20261001102847.576880-1-markus.t.metzger@intel.com> 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 print_stop_location() expects its argument waitstatus to match inferior_thread()'s control.stop_bpstat. Instead, use inferior_thread()'s last waitstatus that the parent patch stored in control.stop_ws. This removes the need for a waitstatus parameter. Change it to take the thread to print the stop location for. --- gdb/infrun.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index b347459f335..8ba5937fa73 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -9441,14 +9441,14 @@ print_no_history_reason (struct ui_out *uiout) based on the event(s) that just occurred. */ static void -print_stop_location (const target_waitstatus &ws) +print_stop_location (thread_info *tp) { int bpstat_ret; enum print_what source_flag; int do_frame_printing = 1; - struct thread_info *tp = inferior_thread (); - bpstat_ret = bpstat_print (tp->control.stop_bpstat, ws.kind ()); + bpstat_ret = bpstat_print (tp->control.stop_bpstat, + tp->control.stop_ws.kind ()); /* Function bpstat_print selects the frame to print. Typically, that is the stop frame, in other words get_current_frame (). But bpstat_print may select a different frame, see for instance ada_catchpoint::print_it. */ @@ -9516,22 +9516,17 @@ print_stop_location (const target_waitstatus &ws) static void do_print_stop_event (struct ui_out *uiout, bool displays) { - struct target_waitstatus last; - struct thread_info *tp; - - get_last_target_status (nullptr, nullptr, &last); - + struct thread_info *tp = inferior_thread (); { scoped_restore save_uiout = make_scoped_restore (¤t_uiout, uiout); - print_stop_location (last); + print_stop_location (tp); /* Display the auto-display expressions. */ if (displays) do_displays (); } - tp = inferior_thread (); if (tp->thread_fsm () != nullptr && tp->thread_fsm ()->finished_p ()) { -- 2.53.0 ________________________________________ Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 (89) 99143-0 www.intel.de Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman Chairperson of the Supervisory Board: Sonja Pierer Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.