From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by sourceware.org (Postfix) with ESMTPS id B8CF63857419 for ; Wed, 5 Oct 2022 20:40:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B8CF63857419 X-IronPort-AV: E=McAfee;i="6500,9779,10491"; a="286492610" X-IronPort-AV: E=Sophos;i="5.95,161,1661842800"; d="scan'208";a="286492610" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2022 13:40:49 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10491"; a="799636715" X-IronPort-AV: E=Sophos;i="5.95,161,1661842800"; d="scan'208";a="799636715" Received: from labpcdell3650-003.iul.intel.com (HELO localhost) ([172.28.49.87]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2022 13:40:48 -0700 From: Nils-Christian Kempke To: gdb-patches@sourceware.org Cc: simark@simark.ca, Zoran.Zaric@amd.com, Nils-Christian Kempke Subject: [PATCH v2 0/4] Dynamic properties of pointers Date: Wed, 5 Oct 2022 22:40:35 +0200 Message-Id: <20221005204039.575255-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-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 05 Oct 2022 20:40:53 -0000 Hi! Please find attached v2 of this series. The main change is patch 3 which became a 'some compiler DWARF that is wrong but we still want to support it' patch after a discussion in https://sourceware.org/pipermail/gdb-patches/2022-September/192159.html and thanks to Simon and Zoran. They convinced me that my v1 was wrong. V1 can be found here: https://sourceware.org/pipermail/gdb-patches/2022-September/191934.html Changes since v1: * Patch 1 is unchanged and was already approved by Simon in v1. * Patch 2: Patch 2 changed quite a bit ang mainly got simpler. Initially I thought here that DW_TAG_pointer_type could actually have the DW_AT_associated attribute, but it turned out that this again was an icc/icpc/ifort DWARF peculiarity. The part handling this attribute for dynamic pointer types got moved to patch 3. As a result, I could use the same handling for resolving dynamic pointers and references in resolve_dynamic_type_internal which made the patch simpler. I fixed the Simons' leftover comments in https://sourceware.org/pipermail/gdb-patches/2022-September/192142.html * Patch 3: From patch 2 the DW_AT_associated handling moved to this patch. Additionally, I wrapped all changed in this patch in compiler guards checking for icc/icpc/ifort and added a dwarf2 tests more concretely describing the poor Intel classic compiler DWARF we want to support here. Last, I rewrote the commit message and added some comments. * Patch 4: Added a comment to the loop in the testcase. I am not sure whether I did patch 3 the 'normal/usual' way compiler quirks are implemented in GDB. Have a look! I'm looking forward to comments. Cheers! Nils Bernhard Heckel (1): gdb/types: Resolve pointer types dynamically Nils-Christian Kempke (3): gdb, testsuite: handle icc and icpc deprecated remarks gdb, typeprint: workaround icc/icpc/ifort pointer/reference DWARF gdb/fortran: Fix sizeof intrinsic for Fortran gdb/eval.c | 3 + gdb/gdbtypes.c | 86 ++++++++- gdb/gdbtypes.h | 5 + gdb/testsuite/gdb.cp/vla-cxx.cc | 4 + gdb/testsuite/gdb.cp/vla-cxx.exp | 31 ++++ gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp | 16 +- .../icc-ifort-pointers-and-references.c | 37 ++++ .../icc-ifort-pointers-and-references.exp | 150 +++++++++++++++ .../gdb.fortran/pointer-to-pointer.exp | 2 +- gdb/testsuite/gdb.fortran/pointers.exp | 172 ++++++++++++++++++ gdb/testsuite/gdb.fortran/pointers.f90 | 29 +++ gdb/testsuite/gdb.fortran/sizeof.exp | 115 ++++++++++++ gdb/testsuite/gdb.fortran/sizeof.f90 | 108 +++++++++++ gdb/testsuite/lib/gdb.exp | 18 ++ gdb/valprint.c | 40 +++- 15 files changed, 796 insertions(+), 20 deletions(-) create mode 100644 gdb/testsuite/gdb.dwarf2/icc-ifort-pointers-and-references.c create mode 100644 gdb/testsuite/gdb.dwarf2/icc-ifort-pointers-and-references.exp create mode 100644 gdb/testsuite/gdb.fortran/pointers.exp create mode 100644 gdb/testsuite/gdb.fortran/sizeof.exp create mode 100644 gdb/testsuite/gdb.fortran/sizeof.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