From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id z81kORW7HmYPazEAWB0awg (envelope-from ) for ; Tue, 16 Apr 2024 13:53:25 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=IO25UiGE; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D56581E0C0; Tue, 16 Apr 2024 13:53:25 -0400 (EDT) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BF4E81E030 for ; Tue, 16 Apr 2024 13:53:23 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6669F3858CDB for ; Tue, 16 Apr 2024 17:53:23 +0000 (GMT) Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id 99B313858D35 for ; Tue, 16 Apr 2024 17:53:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99B313858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 99B313858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713289984; cv=none; b=Ob5U/bkFO1LmHvajWHesfOvShx0FHgZuyIywOWuUTUW2vUWKRn/SVjAuJfkJmTtCWM0sOr9e25r2UU4C6EVn2xRODCwyOchAx+M7cgauBEUkHwy000I5NW8ZQaU83teD59uw61B987We8dFFxJCGbjdWDnDy/LMFYXJsGq0gfBk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713289984; c=relaxed/simple; bh=kaEKJufglHTWH8nuFXtqBIY8KXqPmoaqja9pjscDi/M=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=OUwZw4/Ipw50OuFATzvsyXiRzO9jnfQoZcd0Z8YZVkN0YLNaF3uAdWsI8AdMyZFLXUOtm2JX+zMY+tspwJMba6n3lxu7PsD4XtOrh8QEI1ynOaopH1WQmEpMZAhVTEEixV7Pb6aFgozFSnRzaeVQz9IexDKRzFo2Cr33gkPm4pw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6001a.ext.cloudfilter.net ([10.0.30.140]) by cmsmtp with ESMTPS id wEHGrm5WQuh6swmzOrCFQ2; Tue, 16 Apr 2024 17:53:02 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id wmzNrUcBn9zHMwmzNrUM1z; Tue, 16 Apr 2024 17:53:01 +0000 X-Authority-Analysis: v=2.4 cv=fo4XZ04f c=1 sm=1 tr=0 ts=661ebafd a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=raytVjVEu-sA:10 a=Qbun_eYptAEA:10 a=QyXUC8HyAAAA:8 a=i49gbMKACsD1R_LnQ9kA:9 a=JlEvGDnUVHgA:10 a=2kRb0BLe60JKLfIpyInd:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=LK5x7RavV9IQEAW8h/HCvCiS2bxqLE4k9sk3B5/1tLM=; b=IO25UiGE4Z4JXQtMj1sfBnLIy/ xy0yM8iDJrIhsTOE87v4GHsCO80mNoslJR9iAoUOxEnaNKskOeI241+R0P0zdM2uQ59/PCOokTRZB HsF0M2vuMa4Aiaxyd/PPh9Edj; Received: from 97-122-82-115.hlrn.qwest.net ([97.122.82.115]:59922 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rwmzM-003AhZ-2x; Tue, 16 Apr 2024 11:53:00 -0600 From: Tom Tromey To: Stephan Rohr Cc: gdb-patches@sourceware.org, aburgess@redhat.com, tom@tromey.com Subject: Re: [PATCH v3 1/1] gdb: Fix assertion in 'value_primitive_field' References: <20240327152208.8321-1-stephan.rohr@intel.com> <20240327152208.8321-2-stephan.rohr@intel.com> X-Attribution: Tom Date: Tue, 16 Apr 2024 11:52:59 -0600 In-Reply-To: <20240327152208.8321-2-stephan.rohr@intel.com> (Stephan Rohr's message of "Wed, 27 Mar 2024 08:22:08 -0700") Message-ID: <87a5lt19fo.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.82.115 X-Source-L: No X-Exim-ID: 1rwmzM-003AhZ-2x X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-82-115.hlrn.qwest.net (murgatroyd) [97.122.82.115]:59922 X-Source-Auth: tom+tromey.com X-Email-Count: 21 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfDt6VfsI+GineGpaguJOmNpmnEvslyho1rddabC/SxFjTHyJwv3Ew2Z/E12eU4E29QMXhwTWLzmdIupGatjjDj7h/EgL2iR5HcJyMWb8c45NpLXUlYu8 K3Y6PPa+Ithz/NNutrhE88anNYKUI6iAZ2rDNZDvffaK8qQmqoCD8uk8ZzGX17lVCX7oZP7ss1VZA70DakSVNaR2kZgWijUrXkI= X-Spam-Status: No, score=-3015.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org >>>>> Stephan Rohr writes: > From: "Rohr, Stephan" > GDB asserts that the data location of a value's field with a dynamic > data location is resolved when fetching the field's value in > 'value_primitive_field'. This assertion was hit because of bogus DWARF > generated by the Intel Fortran compiler. While that compiler should fix > the DWARF, we prefer GDB to error out here instead, e.g. to allow the > user to continue debugging other parts of the program. I have been trying to understand this patch for a while but I really don't. Could you explain it in more detail, preferably in the commit message? > + DW_TAG_variable { > + {DW_AT_name var_a_invalid_location} > + {DW_AT_type :$struct_label} > + {DW_AT_location { > + DW_OP_addr [gdb_target_symbol var_a] > + DW_OP_deref > + DW_OP_stack_value > + } SPECIAL_expr} > + } For example, I don't understand what is invalid about this. It's weird for sure, but why is gdb's failure to evaluate it anything other than a bug somewhere else in gdb? In the "valid" case I see the field type being resolved. Why doesn't this happen in the invalid case? > + error (_("cannot read %s, expected an already resolved data " > + "location."), arg_type->field (fieldno).name ()); This error shouldn't have a trailing ".", it makes the output look weird: $1 = {data = Tom