From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +cghBMDgtGqL3zsAWB0awg (envelope-from ) for ; Thu, 24 Sep 2026 04:35:12 -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=lbLPqFSw; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0C6871E06B; Thu, 24 Sep 2026 04:35:12 -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 689881E033 for ; Thu, 24 Sep 2026 04:35:11 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A872C4BB3BE2 for ; Thu, 24 Sep 2026 08:35:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A872C4BB3BE2 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=lbLPqFSw Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by sourceware.org (Postfix) with ESMTPS id 9B45F4BB3BCC for ; Thu, 24 Sep 2026 08:34:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B45F4BB3BCC 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 9B45F4BB3BCC Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.18 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790238870; cv=none; b=Nwa7r4rTv5OaE2tNmGO8KFqSSBrNGkKbxSd3NPbiOxtCj0ZRHD5z7QE2/dPMlgcNC5Dm+dqXWEggSeRURC9fheEUu5DCw+3Vm9PwjKubEhLeTndrLnVoi+Wolycfk5dQpw2pkQo7plIc8XkZ1uhB4lseZ1M4Dx/nPc53PDRCo0A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790238870; c=relaxed/simple; bh=Lnx6IzlQkSCNnGTGXbNeN+Ti6R3a0gFYM91h/mjVu58=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uvvHcplIWI373n3D2yC2IEi2OgcNTWqwmP5cBdxU/r4+TVOJW12CnsShf+RqRy6dUugz6lN9oSYzyP5aSJKeP1sQUmgXnT1VlZN5Uj1k/k4k63efVIiRu/KNzx9lpwwrXDhL4OFO40PD8OkDCY+EQ2byNJyNpHTbERpj6R6xBcQ= 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=lbLPqFSw DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B45F4BB3BCC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1790238870; x=1821774870; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Lnx6IzlQkSCNnGTGXbNeN+Ti6R3a0gFYM91h/mjVu58=; b=lbLPqFSwgrzINa/dlcyTadWHazXgnHh/UgOEd1UKLiu/dgQ6R9fw6FuC TcxKaEc4iXyv2Qm+a250qG6dqvznnXboLgFDduz6KG7T0BdoLMsX7Dqj8 walcLrsBj1kyFPSVVjbtjcmE8F9ImIDGQdb8w24907PT7K/QDr5wxflEj ZD6KcW1d/08a95lwcMiHLKCjZl3T+ZzOjHZ73lX33WzkNGnC1SAxfpOO0 yMyBZ4JKflqnz2dkcuJxEdb/TsgzIgUyuvfZmJuQV3Sh3Yo5Qj/yIjaH1 3dE5DqTWZjGmJx5IpKb6XtvH5kCsvn1naEKSaIOr+2UkUoQ1uEYBLAyeu Q==; X-CSE-ConnectionGUID: tMfgu7sTQp6Wyi7QI1NUDg== X-CSE-MsgGUID: gzTeGr6pSVqMjZwoUNhvcQ== X-IronPort-AV: E=McAfee;i="6800,10657,11914"; a="90123862" X-IronPort-AV: E=Sophos;i="6.27,120,1787036400"; d="scan'208";a="90123862" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2026 01:34:28 -0700 X-CSE-ConnectionGUID: Owq4/nJPTK6h4Ncx/1eD2w== X-CSE-MsgGUID: C4E3z6deQn6dfq3yxoKrNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,120,1787036400"; d="scan'208";a="277709381" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2026 01:34:27 -0700 From: Christina Joos To: gdb-patches@sourceware.org Cc: thiago.bauermann@linaro.org, tom@tromey.com, luis.machado.foss@gmail.com Subject: [PATCH v5 05/13] gdb: Introduce 'stack.c:print_pc' function without frame argument. Date: Thu, 24 Sep 2026 10:33:02 +0200 Message-ID: <20260924083311.1961530-6-christina.joos@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260924083311.1961530-1-christina.joos@intel.com> References: <20260924083311.1961530-1-christina.joos@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.". Approved-By: Tom Tromey --- gdb/stack.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/stack.c b/gdb/stack.c index cfbb22ee193..49dfa246631 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -960,15 +960,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 (" ["); @@ -977,6 +976,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.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.