From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aCUeIsnD62KWlSAAWB0awg (envelope-from ) for ; Thu, 04 Aug 2022 09:04:09 -0400 Received: by simark.ca (Postfix, from userid 112) id 881211EA05; Thu, 4 Aug 2022 09:04:09 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=mn0kRjmp; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 244C11E9EB for ; Thu, 4 Aug 2022 09:04:09 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C8992385737B for ; Thu, 4 Aug 2022 13:04:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8992385737B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1659618248; bh=ZvpK4dR/1hn1o2tVhoGJM8fLZrDhS/Ad0mmWkFSqoig=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=mn0kRjmp1c90QINOSPVMfjPLjXDfSY+eGqf+GbtL8GhiWYGcsAZbZbNI/iYQ5iN9J og1pM3kNrE/uGrdhYpYSl5GHDY5CKOBLf660zM6q+xhO4f5iIQrisLufxS+LyXkxnF OAL4PQ4Wi+TeTPT4bVqmWisstdtsAAr0+cWug16Q= Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by sourceware.org (Postfix) with ESMTPS id 012D0385C32E for ; Thu, 4 Aug 2022 13:03:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 012D0385C32E X-IronPort-AV: E=McAfee;i="6400,9594,10429"; a="351638279" X-IronPort-AV: E=Sophos;i="5.93,215,1654585200"; d="scan'208";a="351638279" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2022 06:03:46 -0700 X-IronPort-AV: E=Sophos;i="5.93,215,1654585200"; d="scan'208";a="631576356" 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; 04 Aug 2022 06:03:45 -0700 To: gdb-patches@sourceware.org Subject: [PATCH v2 0/2] Handle undnamed template tags in GDB Date: Thu, 4 Aug 2022 15:03:39 +0200 Message-Id: <20220804130341.3898921-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 Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, please find attached version 2 of this series, originally posted here: https://sourceware.org/pipermail/gdb-patches/2022-July/190574.html Changes since version 1 are mostly incorporating Bruno's comments: Patch 1: * This is new and fixes a problem with the testsuite that I stumbled upon while reworking patch 2. Patch 2: * Patch 2 now adds a .cc file with the testcase that should make the test and the DWARF written in the test clearer. The .cc and its DWARF are very close to what clang (10) emits for this example. * I fixed Patch 2's commit message. * I reordered some of the variables in Patch 2 (to be closer to what clang emits for the .cc file. * I changed the type of the second template value parameter from float to int (as float is an illegal type for a template value parameter). What I could not reproduce was the failure Bruno described in his first review: I ran make check TESTS="gdb.dwarf2/missing-type-name-for-templates.exp" (also with boards unix/-m32, native-gdbserver, native-extended-gdbserver) on Ubuntu 20 with gcc 13 and on RHL 10.3.1-1 with gcc 10.3.1 and could not see any failures with my original version of the patch. @Bruno Could you try this again? I'm quite unsure how to reproduce these but I noted that the second template value parameter was declared to be of type float - which is illegal and might have caused this. I changed its type to int and both template value parameters are now declared the same way. It would be surprising to me if this still failed. I tested v2 against regressions on the Ubuntu 20 system and all boards described but could not find any. Cheers, Nils Nils-Christian Kempke (2): gdb, testsuite: adapt function_range expected name gdb, dwarf: create symbols for template tags without names gdb/dwarf2/read.c | 46 ++++- .../missing-type-name-for-templates.cc | 58 ++++++ .../missing-type-name-for-templates.exp | 170 ++++++++++++++++++ gdb/testsuite/lib/dwarf.exp | 12 +- 4 files changed, 281 insertions(+), 5 deletions(-) create mode 100644 gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.cc create mode 100644 gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp -- 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