From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2052.outbound.protection.outlook.com [40.107.220.52]) by sourceware.org (Postfix) with ESMTPS id 47EF33858402 for ; Fri, 5 Nov 2021 11:39:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 47EF33858402 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KIsBjzdbv3k3ReCVWW6nitUrq431Vx7OUbCGYflrKHSHVI0rMqH5LRCFiY3BEXZf/a2GvOUZlOkII57ziQAl/NGj6rIcJMTLjDUbWs2jqoLrHwZQIJHYDdXcwrs+ZpI7zHAvOrE5N2yhxz2Tz2cN6gFzRM8Gd2PBrbvqJBRo99bu84YN5Ymf9Qa6fb96XKtkTaEcVJI2m5MwsWUIZYo6e7eEdwP4fdPfpnC12voD306gRVde+Xg4IxR1/mYZgOxMb1x4FXJeYbbY7Lw+UhWd2P5rIc4PDwe53Pd9oW4rvlOpNWYTuyeGX3qXqSUEmE9wZXxPR8rUbzc6BdUuVmW5Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jJ0SljykPqlBvE6r0t10ofzRtTYPMr5MWJ68hCl3/JY=; b=FBP+mJJXoG/EQvyJoKXZoVuS5sw7ruI2DCK0p55wCX677CTJgDuoYZWpLUbm5X7pNG6q1vUW2rbqVem1+mkbad25MDPGZZoU8k4+D1T31zy4jfpNXVqZ8GEX1M1T6YJOjdXsw0MubwieQJ6I7n3itsZOqr6BITlL5yFUhz9gYpJJaHmKv0Pzo+RILC10d8HCPjmdARUTPtOyksG1c9ecYgNZp23tH7DrRnBm4QrwE3inZIQNi1iz6jBqC2hhRrkHlce465kCexFoynGv6OEfHfPJKURi/WvN05SGWVr7fl9bqZvL4IOSqZjwqBULncfSDuQ7luoz4WfKKwoGfrCAGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none Received: from MW2PR16CA0013.namprd16.prod.outlook.com (2603:10b6:907::26) by DM4PR12MB5152.namprd12.prod.outlook.com (2603:10b6:5:393::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Fri, 5 Nov 2021 11:39:27 +0000 Received: from CO1NAM11FT042.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::22) by MW2PR16CA0013.outlook.office365.com (2603:10b6:907::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Fri, 5 Nov 2021 11:39:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT042.mail.protection.outlook.com (10.13.174.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4669.10 via Frontend Transport; Fri, 5 Nov 2021 11:39:27 +0000 Received: from localhost.localdomain (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 5 Nov 2021 06:39:26 -0500 From: Zoran Zaric To: Subject: [PATCH v4 22/28] Remove DWARF expression composition check Date: Fri, 5 Nov 2021 11:38:43 +0000 Message-ID: <20211105113849.118800-23-zoran.zaric@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211105113849.118800-1-zoran.zaric@amd.com> References: <20211105113849.118800-1-zoran.zaric@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 034a2f99-92cf-44b4-2004-08d9a050ec57 X-MS-TrafficTypeDiagnostic: DM4PR12MB5152: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a2roX3coguiSValhblFst77znHV+2Uq8QJKoNdkNgqhQq10IgoihwGGe3mTKwyFgGQT7bycWC64iHg+iUUk9QK8JE+VOxKg8etFgOyz1VGT2lLVg746Iy/NL7HI9EaNLvgrE0B7bfq8cm6UvnSxX9Q4aKwNNNNTfjR7o76/w4kAa5vq3ojThF3G8rOmnfAVa4EL5LgNgC9Xv8xla8mdcfwZp+rM9xCtGlolW+d3BT8DZxW8YocmWvmW6L1FnrUffjCQmlloN6WI9Xy1f9aud/cKXH/cHg5WidlOohgFNbxRlm5YKtVv3cEi4taQVJ/M5nuetK8XzAzx3N22CkcbXDuxGHLEVxCy77us9CQICwHdo2SsigR7y/njx0MBL+2lSikVgpsbyJo1vKU2OCYnr3IPE3ZqGeVKGtsAXNWb/m8lFh97dQ3aH/DNcpCfBuHwIeaEaQHezqhz6zXA+yH3NmAqO6G3kKFVuMzKnX5QWn/kd1gnJaSBl5iykUbxr/1ma83KWNkHtcf5pL1nErWu5ntBAwgfS2cfdn0cZ6CPE5syEOiYeyiLty7rxRrSkXnElQOaWXVQY/FrUtYEcBExWzKxR/j3ow5tiYWzRJnacv0U560ClIsJ3pdDI8A9moEDidds9ZCqHLwI2+0/+8CRRCg6PYM5opnMnXr2ZHqiUU0Wv9QpYi1CFW0XFD7Mx05XBNTVg60mNfdDs97O3d4DLyzD0w8f0PzzlOMRcmjbrss0= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(8676002)(26005)(16526019)(186003)(356005)(508600001)(82310400003)(426003)(336012)(1076003)(83380400001)(44832011)(6916009)(81166007)(2616005)(36756003)(6666004)(316002)(4326008)(36860700001)(5660300002)(70206006)(47076005)(2906002)(8936002)(86362001)(70586007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2021 11:39:27.0847 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 034a2f99-92cf-44b4-2004-08d9a050ec57 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT042.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5152 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Fri, 05 Nov 2021 11:39:34 -0000 From: Zoran Zaric The dwarf_expr_require_composition function reports an error if the last operation is not a leaf node of the DWARF expression. This was previously used to prevent location description operations to be used freely in the DWARF expression. With the new approach, all operations are treated the same and everything is composable, so there is no need for the previous restrictions in the expression evaluator. gdb/ChangeLog: * dwarf2/expr.c (dwarf_expr_context::execute_stack_op): Remove the use of dwarf_expr_require_composition. --- gdb/dwarf2/expr.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index 2555f9969ef..676e0bae8a7 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -3308,7 +3308,6 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr, else result = op - DW_OP_reg0; - dwarf_expr_require_composition (op_ptr, op_end, "DW_OP_reg"); push (make_unique (arch, result)); break; } @@ -3324,8 +3323,6 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr, (arch, gdb::array_view (op_ptr, len), BFD_ENDIAN_UNKNOWN)); op_ptr += len; - dwarf_expr_require_composition (op_ptr, op_end, - "DW_OP_implicit_value"); break; } @@ -3337,9 +3334,6 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr, push (make_unique (arch, value->contents (), type_byte_order (value->type ()))); - - dwarf_expr_require_composition (op_ptr, op_end, - "DW_OP_stack_value"); break; } @@ -3364,8 +3358,6 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr, this->m_per_cu, this->m_addr_size, die_offset, len)); - dwarf_expr_require_composition (op_ptr, op_end, - "DW_OP_implicit_pointer"); break; } -- 2.17.1