From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id XMfJOlBf9GrZ8QEAWB0awg (envelope-from ) for ; Wed, 11 Nov 2026 07:28:00 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=L1UwrOgm; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D6E23378002; Wed, 11 Nov 2026 07:28:00 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 05B961E04F for ; Wed, 11 Nov 2026 07:27:56 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1573A4BA9009 for ; Wed, 11 Nov 2026 12:27:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1573A4BA9009 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=L1UwrOgm Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by sourceware.org (Postfix) with ESMTPS id D3AA94BA798D for ; Wed, 11 Nov 2026 12:27:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D3AA94BA798D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D3AA94BA798D Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794400045; cv=none; b=xX2DxHCSwWr00JxKnFSAo2Oc/ddk5IbunKm81fSWdxnLa/FG90uP80sE2J5wTmsyNuX1k7wiyWClGoNGsXIhWsqibgydaWKoHTBNQ3YH1kQ9gTtpw0El+0QO3/tU2iXNe/iAOkqKf3xhlk6fM7BK8RnDa15gnobg1CDgmOi1DeY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794400045; c=relaxed/simple; bh=K2Vfgb7/KffcyLEUFu9CYpMKAuZYBF26LadaioWv1EA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IYjGj/hIdCTojMVxj6cFXepyxYG0vZra7r7tDRMZJ+2MTXRLzISxxl/UsPzi4ueK/ejNAixpZOkeJuqSuQXSRb04gr1KA9I5lgvTm5VXxC1etV8dY/8bMegP7hY+5RdqC+mHK+ess9/e1VhzELBnVffHX3sJunIMFejFWATFvt4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=L1UwrOgm DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3AA94BA798D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1794400045; x=1825936045; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=K2Vfgb7/KffcyLEUFu9CYpMKAuZYBF26LadaioWv1EA=; b=L1UwrOgmrC/awcDGV/bg8li4tAOvoKe9BdeeNwODzo9klekkb+8nM5c1 1VxPFEp8/v9yglMS6ONlG/2TNRYj/v92QkjBer4+BZ1xDtlwwipUagXty e/mJo12fnfXez8z2lwChtB6LPhE6X4QbvLKwVy8AFMo5vCyjZ1LliveRM HC9b2saFn4Z0TuO4NWJXis/55YJFsACVT9Ac56lqy20Ia/yZDrwjV6xTF sHpA67eFFBfCHFwO6ky1p5bk6RpIkJjnmInlYmAj/ZnyVwREeEh6/gePA 8ZulJnJxvYnLevfV6MOkiO/iW9AdNxZkoBYZAd+JA2j0Edk76ecV3NMDR A==; X-CSE-ConnectionGUID: u1qXKWeESZq2q+qIzkWjeQ== X-CSE-MsgGUID: 95ww+imPRi2ezj4fdqmcjA== X-IronPort-AV: E=McAfee;i="6800,10657,11962"; a="3079906" X-IronPort-AV: E=Sophos;i="6.27,207,1787036400"; d="scan'208";a="3079906" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2026 04:27:23 -0800 X-CSE-ConnectionGUID: ZiaMERA1QRKYwgK5tIA6yg== X-CSE-MsgGUID: 9AM9olaPTHG15zzSO/rceg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,207,1787036400"; d="scan'208";a="8504797" Received: from dut1048pvc.igk.intel.com (HELO localhost) ([10.211.177.228]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2026 04:27:22 -0800 From: Stephan Rohr To: gdb-patches@sourceware.org Cc: tom@tromey.com Subject: [PATCH v4 0/1] gdb: resolve dynamic types of DWARF stack and implicit values Date: Wed, 11 Nov 2026 12:27:14 +0000 Message-ID: <20261111122715.612430-1-stephan.rohr@intel.com> X-Mailer: git-send-email 2.43.0 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.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 From: "Rohr, Stephan" Hi Tom, all, thanks for the feedback on v3. Sorry for the delay, this somewhat got lost. v3 was posted here: https://sourceware.org/pipermail/gdb-patches/2024-March/207603.html Tom provided feedback: https://sourceware.org/pipermail/gdb-patches/2024-April/208168.html This version addresses the concerns raised by Tom: the bug is not in "value::primitive_field". GDB doesn't resolve the dynamic type for a DW_OP_stack_value or DW_OP_implicit_value. It is properly resolved for values in memory. This patch addresses this by resolving the dynamic type in these two cases instead of turning the assertion into an error. Changes since v3: * Keep the assert in "value::primitive_field". * Resolve the dynamic type in "dwarf_expr_context::fetch_result" for DW_OP_stack_value and DW_OP_implicit_value. * Mark DW_OP_stack_value and DW_OP_implicit_value arrays whose bounds resolve to optimized out as optimized out, as for values in memory. * Adjust the testcase to cover both cases. Tested with the unix, native-gdbserver and native-extended-gdbserver board files; there are no regressions. I appreciate your feedback. Thanks Stephan Rohr, Stephan (1): gdb: resolve dynamic types of DWARF stack and implicit values gdb/dwarf2/expr.c | 14 +- .../locexpr-data-member-dynamic-location.exp | 147 ++++++++++++++++++ gdb/value.c | 30 ++++ gdb/value.h | 16 ++ 4 files changed, 200 insertions(+), 7 deletions(-) create mode 100644 gdb/testsuite/gdb.dwarf2/locexpr-data-member-dynamic-location.exp -- 2.43.0 ________________________________________ Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 (89) 99143-0 www.intel.de Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman Chairperson of the Supervisory Board: Sonja Pierer Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.