From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2043.outbound.protection.outlook.com [40.107.243.43]) by sourceware.org (Postfix) with ESMTPS id 9F6D13857C5D for ; Thu, 14 Oct 2021 09:33:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9F6D13857C5D ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ehuqtWiD4BTAeONgeyI5noZZxBnuvwZsSvkziqEUFH6OuA971Ut2xUMPk6PMlppxgnzTPOtp79r7OfPOY7N3iFNv9DK20yfDdfrKSrgtvgT1wdpMpvy/E/JJhszzr49biqarPAAolpb9gfl9MEngdXONF5/6C7/Jj5Bme7Ea1adYYy1HFtIU4+hjo+CA848BF+SrLgl9Yj19jCgt5x06NcHgWiAKzODn9+p2ZgDPiO3DvMMd1CgGfEfGAZe5tK28iNCGiGjO10y1m7djh2mhEapLViXLP3BWfw1uVb1ShJYwNRzgNzAOtgMTLV+CAGxv7bgn7VmWts2Oogcpy/g+uw== 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=n6JLek7RtCI9GtwnBI0Q0ODcbuo3Vh/z7eBMZEY37g0=; b=Wr9nZmoPzorRwYqF7T/bj7fyV/2d75pL+mDC7L7oXjHnLF4VvE1oHumKoTCFyJUhcieRoQdmkie5hrvPD5WF/DuQS5P2t3rRGYrfuTQu3LAf1XQWS0+Z4XGdBBhWIpDAmkg3JQI7LE3Ap1fZCyh2MAWVOhHAEzh60JBhgkj7DNA5likEMLJSMjFSoMYiVTR5KKerCi+rChyNIJy1lBMFCbgnW+skdrEiVYwrwqc8k6fRepOr8wK9gaXZDuZRUA5wyrhTuA75imnVYj9XlPKdCagTmhnNtzxrXmtV3UNtOVKS/TvU6hjDLr8/Gq6BKibp67uPOYa2Hn7OTrdawE1anQ== 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 DM3PR12CA0054.namprd12.prod.outlook.com (2603:10b6:0:56::22) by MN2PR12MB3645.namprd12.prod.outlook.com (2603:10b6:208:cc::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.25; Thu, 14 Oct 2021 09:33:25 +0000 Received: from DM6NAM11FT063.eop-nam11.prod.protection.outlook.com (2603:10b6:0:56:cafe::f) by DM3PR12CA0054.outlook.office365.com (2603:10b6:0:56::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14 via Frontend Transport; Thu, 14 Oct 2021 09:33:25 +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 DM6NAM11FT063.mail.protection.outlook.com (10.13.172.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4608.15 via Frontend Transport; Thu, 14 Oct 2021 09:33:25 +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.8; Thu, 14 Oct 2021 04:33:19 -0500 From: Zoran Zaric To: Subject: [PATCH v3 22/28] Remove DWARF expression composition check Date: Thu, 14 Oct 2021 10:32:29 +0100 Message-ID: <20211014093235.69756-23-zoran.zaric@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211014093235.69756-1-zoran.zaric@amd.com> References: <20211014093235.69756-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4da4e58-f451-43f7-0eb9-08d98ef5ac03 X-MS-TrafficTypeDiagnostic: MN2PR12MB3645: 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: fTbrw/ehd5VXOEsNGcLF7VRakzu7IacMm3hIgHYWOTA0Hzn8ACqb7/DN18RnqNPvlvJGJa+xWo85uQ+MuoDKZsjoTl46MtH7aoAIN/6oGBc/gajXxJYjOX2yjCMR5oCisApJcrJEi7oG8vEUgl2+6Fl/egyy6rTo+T6cSy+zbHKZF3ZIsu0JHltLUS6jfLdSwllQBIMzFXYnqu6RkdjqCtoLGFZ1TDh+5cbiRyT9tH6neoIXIdYVwWDcdViZU3MBnTInaODOvGY+9eeYd6a/CzH9TJf+G+0qH5sjim4VVbrLS5q5xNq0Ap2zlM4Kj0CmVtwCKZLKsemBHoHZFZIbIu+dkgs2YI4DB1BYp8lJyIjJtuIXz/dcrpNPJse+9vQcL7Otcoqr9k8Qqt+8o8QWrmmdBQsXHl/Ttvrbg3rzhE4nfG/kqaoFBaTqFEqk8jXbtaiKl0AF/Syg+z7tr33x9A+dSaUuzU1Q1tb16PuggBDVvQf+Gxk6Yc+NFQG+OQHGfLGaTxAPYnOyomO09IAXZQQaElcjCRN4z9D7MoPcaL5jjPri8c4MuF4jNH+/Yfi48q3QdeBlz6JWT4qICj8teeMsPmw501iYdWCFbGUN5TFkMaTub+0YPkiXNGg7GnX9+HqL8RpsQbypAzb+LcNbRfYt+nfdoea0oBsY+wSjCstAMjeAZ5y7JDmv9UP1BwljnZsb1FVGMOG9GBgn29DpuuAQQYH0ToYn4iQKZG1+PTI= 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)(46966006)(36840700001)(6666004)(8676002)(47076005)(16526019)(336012)(8936002)(70586007)(36756003)(5660300002)(2616005)(356005)(4326008)(426003)(36860700001)(44832011)(2906002)(1076003)(70206006)(86362001)(316002)(26005)(83380400001)(508600001)(186003)(6916009)(82310400003)(81166007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2021 09:33:25.2700 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4da4e58-f451-43f7-0eb9-08d98ef5ac03 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: DM6NAM11FT063.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3645 X-Spam-Status: No, score=-12.0 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: Thu, 14 Oct 2021 09:33:29 -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 602a5186cfa..20fb0e66c97 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -3282,7 +3282,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; } @@ -3298,8 +3297,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; } @@ -3311,9 +3308,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; } @@ -3338,8 +3332,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