From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Mp2mNl/sV2JZMQAAWB0awg (envelope-from ) for ; Thu, 14 Apr 2022 05:41:51 -0400 Received: by simark.ca (Postfix, from userid 112) id C24F71F327; Thu, 14 Apr 2022 05:41:51 -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 9BD4D1ED17 for ; Thu, 14 Apr 2022 05:41:50 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B53983858025 for ; Thu, 14 Apr 2022 09:41:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B53983858025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1649929309; bh=26uzz47nY+MJ3+8pnzKTmGNe2fLHi87TDC9/YUimv2U=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=Vs8rk+2cisu6SQ7b1ZSUuUtLdaD9EUUkJsyLv5XehNQyFtfzrD143PnNhx8lqEAam 1rEXE/xAg3Bh/QyU+MKFGNg20xZ7BFcdm75hZEqFeFWXG739Tr9IR4ghMgpQGnXJyS Fg8p5F0cLBAQB/Gfogj9+gFHWJHo9dVytaUO0yD0= Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by sourceware.org (Postfix) with ESMTPS id F228D3858C83 for ; Thu, 14 Apr 2022 09:41:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F228D3858C83 X-IronPort-AV: E=McAfee;i="6400,9594,10316"; a="243479631" X-IronPort-AV: E=Sophos;i="5.90,259,1643702400"; d="scan'208";a="243479631" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2022 02:41:25 -0700 X-IronPort-AV: E=Sophos;i="5.90,259,1643702400"; d="scan'208";a="573698686" Received: from labpcdell3650-003.iul.intel.com (HELO localhost) ([172.28.49.87]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2022 02:41:23 -0700 To: gdb-patches@sourceware.org Subject: [PATCH v2 0/1] Fortran entry and DW_TAG_entry_point Date: Thu, 14 Apr 2022 11:41:07 +0200 Message-Id: <20220414094108.2758482-1-nils-christian.kempke@intel.com> X-Mailer: git-send-email 2.25.1 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Nils-Christian Kempke via Gdb-patches Reply-To: Nils-Christian Kempke Cc: jinisusan.george@amd.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, please find attached v2 of this series. It introduced the handling of DW_TAG_entry_point to GDB. I want to emphasize again - between gfortran, ifort, and ifx only ifort seems to currently emit this tag. So the attached test only really works when using ifort. After a comment from Kevin I now added a gdb.dwarf2 test for GDB's handling of this tag such that it can be tested without the availablity of a compiler emitting it. V1 can be found here, it was originally submitted as [RFC]: https://sourceware.org/pipermail/gdb-patches/2022-March/186900.html Changes since v1: * I rebased to master and removed the partial symbol stuff from this patch since this part has been reworked recently. I hope I adapted to the changes correctly. * I added the handling of a DW_TAG_entry_points prefix in 'determine_prefix' (after Jini pointing out a bug here). * I removed an if that checked for fortran as the cu's language in new_symbol and made the handling of DW_TAG_entry_point language agnostic. * I changed the return type of 'dwarf2_get_pc_bounds_entry_point' to also return PC_BOUNDS_RANGES if the parent die returns these. * I added a gdb.dwarf2 test to be able to check this test even when one does not have ifort at hand. The new test compiles some .c helper with some labels and uses that to put some entry point dwarf on top. It then checks whether we can break at the entry points. Cheers! Nils Nils-Christian Kempke (1): dwarf, fortran: add support for DW_TAG_entry_point gdb/dwarf2/abbrev.c | 1 + gdb/dwarf2/read.c | 72 ++++++++- gdb/testsuite/gdb.dwarf2/dw2-entry-points.c | 39 +++++ gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp | 149 ++++++++++++++++++ gdb/testsuite/gdb.fortran/entry-point.exp | 84 ++++++++++ gdb/testsuite/gdb.fortran/entry-point.f90 | 67 ++++++++ 6 files changed, 411 insertions(+), 1 deletion(-) create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-entry-points.c create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp create mode 100644 gdb/testsuite/gdb.fortran/entry-point.exp create mode 100644 gdb/testsuite/gdb.fortran/entry-point.f90 -- 2.25.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928