From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oC9+E9Uh2WodjAgAWB0awg (envelope-from ) for ; Wed, 21 Oct 2026 16:34:29 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=ngH3wkJx; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 299D01E051; Wed, 21 Oct 2026 16:34:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,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 vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 C8A9E1E04D for ; Wed, 21 Oct 2026 16:34:26 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D6BE04BA23E7 for ; Wed, 21 Oct 2026 20:34:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6BE04BA23E7 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=ngH3wkJx Received: from omta40.uswest2.a.cloudfilter.net (omta40.uswest2.a.cloudfilter.net [35.89.44.39]) by sourceware.org (Postfix) with ESMTPS id D64694BA2E3C for ; Wed, 21 Oct 2026 20:33:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D64694BA2E3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D64694BA2E3C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792614840; cv=none; b=dLwSIqaqWPAiGpnsRo5lfGziq5V7U9ERZBzU5BgtkrQmbD5Jf/uCMYAl0Ui48jQby/VO/AnHwMvcoODeXGJB5BOKgx6GxWSmKYIgY8tCVYcjjkUWAENDiY+7e7npZSIXOAP8v16u0rt+Oduofd/46UeyKeQ72g4wNLHyf+jEzCo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792614840; c=relaxed/simple; bh=MO4acv93myRC2sDZbcNqjyroL5nWtiUXCdD8UBBXTe4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bA3/54lmmIVBbtGcv0MAmZ4qr3qgqaKUXwI3f3Nt69G8JzKFoA+R7Pf2QrW35u2iE5Qao3lZyvSBzdcyd9uXIVUe9wl3bgQ/xdIgOmwfTir07unBEXDKrh/FdduAo9+/h4XMaTdHrfEoDAS76BCfueBcDGZtd3upvbdZ0eK71r4= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=ngH3wkJx reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D64694BA2E3C Received: from eig-obgw-6001b.ext.cloudfilter.net ([10.0.30.143]) by cmsmtp with ESMTPS id Jcj8xrC6Hc3XsJd0YxwYk9; Wed, 21 Oct 2026 20:33:58 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id Jd0WxW2qgAJ7UJd0Wx5qY9; Wed, 21 Oct 2026 20:33:56 +0000 X-Authority-Analysis: v=2.4 cv=UphjN/wB c=1 sm=1 tr=0 ts=6ad921b4 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=660iZSQnnn4A:10 a=ItBw4LHWJt0A:10 a=QyXUC8HyAAAA:8 a=LlRnK9FGpYJjiBChORcA:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+AVpMi82nW3RbAWRz46eD0MyLCqNVzcXsBDJ08B0LeU=; b=ngH3wkJxxjxB5kXZasr29c66D/ XZxL0dx8mVRG+ylDPGxCyNJmgsIoxnDRZREJlklKTfn+pj4VE8AprupjoOsH/rvTjR293Znq2SQ+N +7V875EbQmBluYu/ujrD/Jktu; Received: from 97-122-110-129.hlrn.qwest.net ([97.122.110.129]:42526 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xJd0V-00000002xmU-46mJ; Wed, 21 Oct 2026 14:33:56 -0600 From: Tom Tromey To: Abdul Basit Ijaz Cc: gdb-patches@sourceware.org, JiniSusan.George@amd.com, tom@tromey.com, eliz@gnu.org, Nils-Christian Kempke Subject: Re: [PATCH v11 01/10] gdb, dwarf: add support for DW_AT_trampoline in DWARF reader In-Reply-To: <20260803193449.33375-2-abdul.b.ijaz@intel.com> (Abdul Basit Ijaz's message of "Mon, 3 Aug 2026 21:34:40 +0200") References: <20260803193449.33375-1-abdul.b.ijaz@intel.com> <20260803193449.33375-2-abdul.b.ijaz@intel.com> X-Attribution: Tom Date: Wed, 21 Oct 2026 14:33:54 -0600 Message-ID: <87wlrau72l.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.129 X-Source-L: No X-Exim-ID: 1xJd0V-00000002xmU-46mJ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-129.hlrn.qwest.net (bapiya) [97.122.110.129]:42526 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfPARrDx1GRcMyOj25OYeYwVIxUikDKPmfDuTWVn2YMvT52SEJu78oWckIFcVgSsR3EGtwha2SKXxLhe8uCB6ZuGlzLOp0CWwj/vmAbeEqkL92G2+102N DLFQsX6nnnNyn9E/+0IwXqQCyU4LOcBfe7moEu5XvpHXkxmeoPFdq+kvgEhAy11wX90cKmi29O7JIBLtsXtCAR+HhQ6BKgQrzOQ= 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 >>>>> Abdul Basit Ijaz writes: > DW_AT_trampoline can be used to describe compiler generated functions > that serve some intermediary purpose on making a call to another > function. A compiler can emit this tag in order to help a debugger hide > the trampolines from a user. > This patch adds support to GDB for reading the DW_AT_trampoline > attribute. It stores the attribute and its value in the type_specific > part of a GDB type. This patch is implemented in preparation of the > following patches, which will add a mechanism to hide DW_AT_trampoline > subroutines from the user. One thing I don't understand is why this data is attached to the type, and not to the function's symbol (or perhaps the block structure). > + TYPE_TRAMPOLINE_TARGET (ftype) > + = (trampoline_target *) TYPE_ZALLOC (ftype, > + sizeof (trampoline_target)); This zero-initializes so... > + if (dwarf2_get_pc_bounds (target_die, &lowpc, NULL, target_cu, > + nullptr, nullptr) <= PC_BOUNDS_INVALID) > + complaint (_("DW_AT_trampoline target DIE has invalid " > + "low pc, for referencing DIE %s[in module %s]"), > + sect_offset_str (die->sect_off), > + objfile_name (objfile)); > + else > + TYPE_TRAMPOLINE_TARGET (ftype)->set_target_addr (lowpc); ... if the complaint triggers, this will end up with a kind of TRAMPOLINE_TARGET_ADDR and an unrelocated address of 0. Perhaps in such a case it's better to avoid marking the function as a trampoline. That way, if there is a problem in the DWARF, gdb will fall back to the function simply being ordinary. > + else if (attr->form_is_unsigned ()) > + TYPE_TRAMPOLINE_TARGET (ftype)->set_target_flag (attr->as_boolean ()); > + else > + TYPE_TRAMPOLINE_TARGET (ftype)->set_target_addr (attr->as_address ()); This else clause also seems perhaps weird. I had some other nits for this patch but I figured I'd rather find out about the type issue before writing them up. Tom