From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id fpt8NG/Fv2DvaAAAWB0awg (envelope-from ) for ; Tue, 08 Jun 2021 15:30:55 -0400 Received: by simark.ca (Postfix, from userid 112) id C1BC11F163; Tue, 8 Jun 2021 15:30:55 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CCAC31E939 for ; Tue, 8 Jun 2021 15:30:54 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4D8033983C32 for ; Tue, 8 Jun 2021 19:30:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D8033983C32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623180654; bh=bGqeXWrlgKJWsdUKYLoCVqFvezI0YN2er3G0XTfcvmM=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=HrZsNwJPwIz5Tb4b5It0vgj+89yaa9GDnrn8od7+jEGNRmZerFsiouvUgE3m4lxEz 7UiUGVByBYGwQj9bGIE6zGoxd9okTJfUp/T0K6lcSZupx3biq34qKOXH8AVpIZbRbv suKFvgU646zXI2xI6XGbQLxI0PvXtfXe250wIOdY= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 1A7C83980807 for ; Tue, 8 Jun 2021 18:48:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1A7C83980807 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-328-Yx9WEwUWP7OwA102lmwgoQ-1; Tue, 08 Jun 2021 14:48:38 -0400 X-MC-Unique: Yx9WEwUWP7OwA102lmwgoQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A9908800D55 for ; Tue, 8 Jun 2021 18:48:37 +0000 (UTC) Received: from [10.3.114.164] (ovpn-114-164.phx2.redhat.com [10.3.114.164]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8AD8E5D9C6 for ; Tue, 8 Jun 2021 18:48:37 +0000 (UTC) Subject: Re: [PATCH] Fix macro info lookup for binaries containing DWARFv5 line table To: "gdb-patches@sourceware.org" References: <20210512171655.9463-1-SourabhSingh.Tomar@amd.com> <22ab603a-35e1-4048-3ccc-6738a13889df@redhat.com> Message-ID: Date: Tue, 8 Jun 2021 11:48:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Keith Seitz via Gdb-patches Reply-To: Keith Seitz Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" RFC ping Anyone at all have an opinion on this direction? Keith On 5/24/21 11:47 AM, Keith Seitz via Gdb-patches wrote: > On 5/24/21 4:36 AM, Tomar, Sourabh Singh wrote: >> [AMD Public Use] >> >> Hello Keith, >> >> Could you please share your plan WRT to this patch. >> Do you want to take it forward ? or you want me to take this forward. >> > > I can pursue this... > > In that vein, does anyone (maintainers?) have an input on my "counterpatch" > (reposted below) that removes this IS_ABSOLUTE_PREFIX stuff and copies the > symtab's filename? > > I haven't officially submitted this as a patch because I'm curious whether > my reading of this is correct/complete. Maybe the documentation/comments > are incorrect or no longer valid? > > FWIW, I've tested that patch on native x86_64 Fedora 34 with no regressions. > > Keith > > Patch under discussion: > > gdb/ChangeLog > > * dwarf2/line-header.c (line_header::file_file_name): Copy > the symtab's filename. > > diff --git a/gdb/dwarf2/line-header.c b/gdb/dwarf2/line-header.c > index 7575297f966..117c5a42cc5 100644 > --- a/gdb/dwarf2/line-header.c > +++ b/gdb/dwarf2/line-header.c > @@ -69,15 +69,10 @@ line_header::file_file_name (int file) const > { > const file_entry *fe = file_name_at (file); > > - if (!IS_ABSOLUTE_PATH (fe->name)) > - { > - const char *dir = fe->include_dir (this); > - if (dir != NULL) > - return gdb::unique_xmalloc_ptr (concat (dir, SLASH_STRING, > - fe->name, > - (char *) NULL)); > - } > - return make_unique_xstrdup (fe->name); > + /* macro_source_file requires: "This filename is relative to the > + compilation directory, it exactly matches the symtab->filename > + content." */ > + return make_unique_xstrdup (fe->symtab->filename); > } > else > { >