From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +kRDG8KaWGJVTAAAWB0awg (envelope-from ) for ; Thu, 14 Apr 2022 18:05:54 -0400 Received: by simark.ca (Postfix, from userid 112) id 5FADF1F327; Thu, 14 Apr 2022 18:05:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 AFC4C1EDF0 for ; Thu, 14 Apr 2022 18:05:53 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DB84A385735C for ; Thu, 14 Apr 2022 22:05:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB84A385735C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1649973952; bh=dSjUdNoCAw49BktKBJ3rfkUu9lepTKbNcrgHaXxmh3Q=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=XWQ6G2xn4JpOSS9e0SuCW40yQfyk373SxamSbet+J0etAp7SVDP2T7Oi8DGkhnBZc C+PLZ5DkqbXz1sK8NoWQluJbtt38wzXkXAO3lanpBw9GbQ921yiv68LaSXJYxUrrb5 U8Y/umewEYSw2EcwHTlWXNhA+ALiDFfyDaalKWHg= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 1F8A73858430 for ; Thu, 14 Apr 2022 22:05:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1F8A73858430 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-78-zEt7XxLfP62zktij-aAC8A-1; Thu, 14 Apr 2022 18:05:30 -0400 X-MC-Unique: zEt7XxLfP62zktij-aAC8A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3996B802803; Thu, 14 Apr 2022 22:05:30 +0000 (UTC) Received: from f35-zws-1 (unknown [10.2.16.249]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A81E1409B3E3; Thu, 14 Apr 2022 22:05:29 +0000 (UTC) Date: Thu, 14 Apr 2022 15:05:28 -0700 To: Nils-Christian Kempke Subject: Re: [PATCH v2 1/1] dwarf, fortran: add support for DW_TAG_entry_point Message-ID: <20220414150528.256d3c07@f35-zws-1> In-Reply-To: <20220414094108.2758482-2-nils-christian.kempke@intel.com> References: <20220414094108.2758482-1-nils-christian.kempke@intel.com> <20220414094108.2758482-2-nils-christian.kempke@intel.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII 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: Kevin Buettner via Gdb-patches Reply-To: Kevin Buettner Cc: jinisusan.george@amd.com, Tim Wiederhake , Bernhard Heckel , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Thu, 14 Apr 2022 11:41:08 +0200 Nils-Christian Kempke wrote: > Fortran provides additional entry points for subroutines and functions. > These entry points may use only a subset (or a different set) of the > parameters of the original subroutine. The entry points may be described > via the DWARF tag DW_TAG_entry_point. > > This commit adds support for parsing the DW_TAG_entry_point DWARF tag. > Currently, between ifx/ifort/gfortran, only ifort is actually emitting > this tag. Both, ifx and gfortran use the DW_TAG_subprogram tag as > workaround/alternative. Thus, this patch really only adds more ifort > support. Even so, some of the attached tests still fail for ifort, due > to some wrong line info generated for the entry points in ifort. > > After this patch it is possible to set a breakpoint in gdb with the > ifort compiled example at the entry points 'foo' and 'foobar', which was not > possible before. > > As gcc and ifx do not emit the tag I also added a test to gdb.dwarf2 > which uses some underlying c compiled code and adds some Fortran style DWARF > to it emitting the DW_TAG_entry_point. Before this patch it was not > possible to actually define breakpoint at the entry point tags. > > For gfortran there actually exists a bug on bugzilla, asking for the use > of DW_TAG_entry_point over DW_TAG_subprogram: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37134 > > This patch was originally posted here > > https://sourceware.org/legacy-ml/gdb-patches/2017-07/msg00317.html > > but its review/pinging got lost after a while. I reworked it to fit the > current GDB. > > Co-authored-by: Bernhard Heckel > Co-authored-by: Tim Wiederhake > > Signed-off-by: Nils-Christian Kempke Okay. (Thanks for adding the new test!) Kevin