From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ORk+Of+C0mimLA8AWB0awg (envelope-from ) for ; Tue, 23 Sep 2025 07:22:39 -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=JpHgksZR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E2DB71E047; Tue, 23 Sep 2025 07:22:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED 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 507511E047 for ; Tue, 23 Sep 2025 07:22:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C229D3858418 for ; Tue, 23 Sep 2025 11:22:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C229D3858418 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=JpHgksZR Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by sourceware.org (Postfix) with ESMTPS id B3EBA3858D29 for ; Tue, 23 Sep 2025 11:19:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3EBA3858D29 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 B3EBA3858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1758626360; cv=none; b=k9dLfL2VhOyv7YeVwD2KFOwUEChKpesnABpttreb55bO/wRs36hfERjyiL6ZLKgMLQJ+OCZPBINRpSSosvByDEH58vK1gVz/ElKgOTyE/C+MAyducwj5q1sRFw6Z1KbLQh7EsPk1DQh/HrnXfTIo453jkmYfG0mi2othmN0DlZw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1758626360; c=relaxed/simple; bh=9e5yoHBax9TdzB8btxe0Dk3vLooku0oQfqE5Cd9wlac=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=h3HdOAj561Jh+At4VDRaK4clJLrn1LKi/xdDrb1xWZ3JUmEIRwe+sBaGwHx+qc442w6lWDIdRyxm5BoX7xGMMAizAG0Phx+yJYc87piDEurIhK0/jbGipcNyoPnYEf2fc3XFxffKxuh4UOM98sUPv73QUE2HckL1HeDXq32oySc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3EBA3858D29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1758626360; x=1790162360; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=9e5yoHBax9TdzB8btxe0Dk3vLooku0oQfqE5Cd9wlac=; b=JpHgksZRzPdH/BuZnujQXL8nEam80AtoX8dVWYBrRKXk+wLrrzZdQAbG FTMIZTJzeICv7FceuNCmRhEkAqNjx+ea3ni0+Gotx+H6MNkJKYxHQTk0L rM9b/nXROpAuwzb7ice6igAOqENds+lWgiI+4Oj+kaTNl9kNlecde3fGs npjlS2Zx4xjrRHdDtmDlESceXl4RAhtbKz2SfszdpXJQjbIPVS/yNJFOI wVZcIKhxA+1ZX2jKFs40jHtUgw7TNhxg5DC6+WpZk1Cdc38fG/0+cUJN2 3FRiycVKZiYQY4A/dEZCb0CsNUSuDMkmWIn9CxMAKUlUsAzADSg51x9ls w==; X-CSE-ConnectionGUID: n/5ly/7RSLmumgvQjAndqg== X-CSE-MsgGUID: TV3cI3rjRdKBfWyYorYCNg== X-IronPort-AV: E=McAfee;i="6800,10657,11561"; a="60827526" X-IronPort-AV: E=Sophos;i="6.18,287,1751266800"; d="scan'208";a="60827526" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2025 04:19:19 -0700 X-CSE-ConnectionGUID: OV30+n45T8+aPDnh8FQz2w== X-CSE-MsgGUID: gN0wF5lnQeynpeD4kWzw4Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,287,1751266800"; d="scan'208";a="177118679" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2025 04:19:18 -0700 From: Christina Schimpe To: gdb-patches@sourceware.org Subject: [PATCH 3/9] gdb: Introduce 'stack.c:print_pc' function without frame argument. Date: Tue, 23 Sep 2025 11:18:36 +0000 Message-Id: <20250923111842.4091694-4-christina.schimpe@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250923111842.4091694-1-christina.schimpe@intel.com> References: <20250923111842.4091694-1-christina.schimpe@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 The function will be used in a later patch "gdb: Implement 'bt shadow' to print the shadow stack backtrace.". --- gdb/stack.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/stack.c b/gdb/stack.c index 3efb4ebdbc2..1c84b17bc14 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -977,15 +977,14 @@ print_frame_info_to_print_what (const char *print_frame_info) print_frame_info); } -/* Print the PC from FRAME, plus any flags, to UIOUT. */ +/* Print the PC, plus any FLAGS (if non-empty), to UIOUT. */ static void -print_pc (struct ui_out *uiout, struct gdbarch *gdbarch, const frame_info_ptr &frame, +print_pc (ui_out *uiout, gdbarch *gdbarch, const std::string &flags, CORE_ADDR pc) { uiout->field_core_addr ("addr", gdbarch, pc); - std::string flags = gdbarch_get_pc_address_flags (gdbarch, frame, pc); if (!flags.empty ()) { uiout->text (" ["); @@ -994,6 +993,16 @@ print_pc (struct ui_out *uiout, struct gdbarch *gdbarch, const frame_info_ptr &f } } +/* Print the PC from FRAME, plus any flags, to UIOUT. */ + +static void +print_pc (ui_out *uiout, gdbarch *gdbarch, const frame_info_ptr &frame, + CORE_ADDR pc) +{ + std::string flags = gdbarch_get_pc_address_flags (gdbarch, frame, pc); + print_pc (uiout, gdbarch, flags, pc); +} + /* See stack.h. */ void -- 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