From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id k77NBIAJHWO79jYAWB0awg (envelope-from ) for ; Sat, 10 Sep 2022 18:02:40 -0400 Received: by simark.ca (Postfix, from userid 112) id 060D81E22A; Sat, 10 Sep 2022 18:02:40 -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=SGnOBZeL; 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 AE9921E21F for ; Sat, 10 Sep 2022 18:02:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DB43C3857004 for ; Sat, 10 Sep 2022 22:02:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB43C3857004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662847358; bh=ZPuIt1KmBkJi41EdDUu+5If2Ghy3HkTntgSSDQXJ6qE=; 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=SGnOBZeLfr6LP0lEMF16ZG59EGC9eRcP6GNqFhGYLsrdXd/5AzyacQNxhq8AcNUtq hjuF7fQJsAaLGko3Q1zgt6Zrtlw5TYL/pmw5/t4gEFDcW4EFYzs5f+RK3AH+DNLEiL uznza4aL1z1Ree+YR8VTxFQtESA3psWvOyZFJ4IQ= 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 998393858D32 for ; Sat, 10 Sep 2022 22:02:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 998393858D32 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-228-4PNO5xbVNRG_BfuGprOsjQ-1; Sat, 10 Sep 2022 18:02:17 -0400 X-MC-Unique: 4PNO5xbVNRG_BfuGprOsjQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7B7A9800124; Sat, 10 Sep 2022 22:02:17 +0000 (UTC) Received: from f35-zws-1 (unknown [10.2.16.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3714AC15BB3; Sat, 10 Sep 2022 22:02:17 +0000 (UTC) Date: Sat, 10 Sep 2022 15:02:15 -0700 To: gdb-patches@sourceware.org Subject: Re: [PATCH][gdb/symtab] Fix handling of DW_TAG_unspecified_type Message-ID: <20220910150215.6f326aa7@f35-zws-1> In-Reply-To: <20220908130531.GA19459@delia> References: <20220908130531.GA19459@delia> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 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: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Thu, 8 Sep 2022 15:05:32 +0200 Tom de Vries wrote: > Currently, the test-case contained in this patch fails: > ... > (gdb) p (int) foo ()^M > Invalid cast.^M > (gdb) FAIL: gdb.dwarf2/dw2-unspecified-type.exp: p (int) foo () > ... > because DW_TAG_unspecified_type is translated as void. > > There's some code in read_unspecified_type that marks the type as stub, but > that's only active for ada: > ... > if (cu->lang () == language_ada) > type->set_is_stub (true); > ... > > Fix this by: > - marking the type as a stub for all languages, and > - handling the stub return type case in call_function_by_hand_dummy. > > Tested on x86_64-linux. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29558 > > Any comments? Hi Tom, Thanks for adding a test and fixing this bug. LGTM. Kevin