From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2076.outbound.protection.outlook.com [40.107.220.76]) by sourceware.org (Postfix) with ESMTPS id E00C0385842C for ; Fri, 5 Nov 2021 11:39:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E00C0385842C ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OORJiT1UdSkhEsr7fxd3ONLt3yC6Rs1dwklCktJkXePhYW3u9uOWpkofWWeDxNn/jwAJbYdVsB60cj7GSiAo4k5JFhumbLAcBM0LJ0qAs9edO2cTbbjfgbHgwOXiw/yNatN/EOqDpH75yKrxBe1JdaBrbmoVnERaqMRgrn2VDaC5H3rN97IrAry9uHrTqzPNoHF9JOlJxxzBMQAHHVpthCWaZqAcyWXV8aRmnKe6yrS0G14VLZnWBN519cEgnlx4NYnRw5GI7ejWgGOCR+Nh4S7wbCRJnPViEaZjrtTuKLpxb5I/hErHpru0If8ZOVLQjyGJfawKajDxjbtI6uonow== 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=DbVF6hTro/+SLpfhHnx3V+kOd2EXqFaHEdURwefbQ70=; b=VuuPLBlBUagGzG/JlrjjJVy5S8r6n+hsU9uz8Tko66uCwfnoSRx/OjfVPdXCo1hz0WaeReLNkFwAJdICobkoq5XXH0wWlnUPHw7ad4B6k7+LI3L7W4ZGUdBzuLiKUXYTXqJ7k5tSx17Fp2c1SaEE9x4SmU7KPr6lb1XMwTu5FmJG+90inFyLZcqJdYtYdFnIPChgSmWrBtHVkY2mUgRKtIQ5rQo81aza69Q3jT5sp62dup7H+j5ikFtFd1ZPdNHNBCwTs+rM9MzRjMHkoby+rLOgbFd6haTmy4D/8pJkd1+NwcRfdsMxQzcFfBWE01Qyyc/T8MHrx3aUrvIExSUPiQ== 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 MW2PR16CA0006.namprd16.prod.outlook.com (2603:10b6:907::19) by MWHPR1201MB0158.namprd12.prod.outlook.com (2603:10b6:301:56::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Fri, 5 Nov 2021 11:39:24 +0000 Received: from CO1NAM11FT042.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::95) by MW2PR16CA0006.outlook.office365.com (2603:10b6:907::19) 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:24 +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:23 +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:22 -0500 From: Zoran Zaric To: Subject: [PATCH v4 18/28] Comments cleanup between expr.h and expr.c Date: Fri, 5 Nov 2021 11:38:39 +0000 Message-ID: <20211105113849.118800-19-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: b7f34fe5-2ae7-464b-65f5-08d9a050ea73 X-MS-TrafficTypeDiagnostic: MWHPR1201MB0158: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RNOf7lv9bPRTZpxXUvvWGsTpLnSVxWaAPeN8NqIlGHWLxAbAPKkskgV4+JoQWJrYOG7B+zWyvbOOaEmn9auV/eXFI+hvP1OMb37dgcfMlHd97sURXP/FmKmj23tkYaSAzTkYpLvjDb0Q2AQd7jhCrYAe94sP/0Mo463SgTco7hePg+64V6P51DRNbzJ5NnifdRk+PVbA1HSnkRegXC9k8Kh/ZjmwSE2KxV2oJtaF6GhWRAeq5Ot8ZAVhha0jk84CVXbwYDD34DEFUElhUjzxMWYZgvBheFR0qivyoK6Ti69jJg75h2YKhTdXoo2UiCqzlw0aGKcls2BTa4xROPQHWQAHYZVrpwdsNSfbhZwg9ORPH8JrW9zrhCRIp2oAh15UIygdF1CExbmY1WtXvkkWKen7v4pxiHjiTGIgMZSlFIVluCG7rnn99Qp5hlXT8zIjWd8cawuPZOho9He2lJm9z9B8bP6BD98Z4g3voVZEqKLFZEgKwsaYCNWUAFtXNYrm9na2OvzD4dx7cZ76STLlN+5km6OcScfs6b0g9pi1w/wDChtKt0aZxnMGNZKCCyHXy5wIiDHZjAmIJa2jsyZZxyemUDlWzJibA20ca1X9q1zur8/2+/KnzyDYmntGodayCajZpOvDUd2wGi+8s8R9RmtOv0kaTO2KWoyUJDacCvh1U4ZTEYTwdr9Vle4YjYj6u7xHwy7HAfcENqSqCydkF9Ejz2vlpZF0ZD07o2NzOGs= 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)(70586007)(5660300002)(26005)(186003)(70206006)(2616005)(8676002)(336012)(16526019)(426003)(83380400001)(82310400003)(2906002)(508600001)(47076005)(6666004)(8936002)(356005)(44832011)(36860700001)(4326008)(81166007)(36756003)(86362001)(316002)(1076003)(6916009)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2021 11:39:23.9265 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b7f34fe5-2ae7-464b-65f5-08d9a050ea73 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: MWHPR1201MB0158 X-Spam-Status: No, score=-12.4 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:30 -0000 From: Zoran Zaric This is just a cosmetic cleanup of the expr.h and expr.c documentation. gdb/ChangeLog: * dwarf2/expr.c: Comments cleanup. * dwarf2/expr.h: Comments cleanup. --- gdb/dwarf2/expr.c | 42 +++++++++++++++--------------------- gdb/dwarf2/expr.h | 55 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 69 insertions(+), 28 deletions(-) diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index 08f56f070c6..ec7a8d13dc8 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -2420,7 +2420,7 @@ dwarf_expr_context::dwarf_expr_context (dwarf2_per_objfile *per_objfile, { } -/* Push ENTRY onto the stack. */ +/* See expr.h. */ void dwarf_expr_context::push (dwarf_entry_up entry) @@ -2428,7 +2428,7 @@ dwarf_expr_context::push (dwarf_entry_up entry) this->m_stack.emplace_back (std::move (entry)); } -/* Push ADDR onto the stack. */ +/* See expr.h. */ void dwarf_expr_context::push_address (CORE_ADDR addr, bool in_stack_memory) @@ -2438,7 +2438,7 @@ dwarf_expr_context::push_address (CORE_ADDR addr, bool in_stack_memory) } -/* Pop the top item off of the stack. */ +/* See expr.h. */ dwarf_entry_up dwarf_expr_context::pop () @@ -2451,7 +2451,7 @@ dwarf_expr_context::pop () return entry; } -/* Retrieve the N'th item on the stack. */ +/* See expr.h. */ dwarf_entry & dwarf_expr_context::fetch (int n) @@ -2679,7 +2679,7 @@ get_signed_type (struct gdbarch *gdbarch, struct type *type) } } -/* Return true if the expression stack is empty. */ +/* See expr.h. */ bool dwarf_expr_context::stack_empty_p () const @@ -2687,7 +2687,7 @@ dwarf_expr_context::stack_empty_p () const return this->m_stack.empty (); } -/* Add a new piece to the composite on top of the stack. */ +/* See expr.h. */ void dwarf_expr_context::add_piece (ULONGEST bit_size, ULONGEST bit_offset) @@ -2741,7 +2741,7 @@ dwarf_expr_context::add_piece (ULONGEST bit_size, ULONGEST bit_offset) } -/* Evaluate the expression at ADDR (LEN bytes long). */ +/* See expr.h. */ void dwarf_expr_context::eval (const gdb_byte *addr, size_t len) @@ -2755,7 +2755,7 @@ dwarf_expr_context::eval (const gdb_byte *addr, size_t len) gdb_assert (this->m_recursion_depth == old_recursion_depth); } -/* Helper to read a uleb128 value or throw an error. */ +/* See expr.h. */ const gdb_byte * safe_read_uleb128 (const gdb_byte *buf, const gdb_byte *buf_end, @@ -2767,7 +2767,7 @@ safe_read_uleb128 (const gdb_byte *buf, const gdb_byte *buf_end, return buf; } -/* Helper to read a sleb128 value or throw an error. */ +/* See expr.h. */ const gdb_byte * safe_read_sleb128 (const gdb_byte *buf, const gdb_byte *buf_end, @@ -2779,6 +2779,8 @@ safe_read_sleb128 (const gdb_byte *buf, const gdb_byte *buf_end, return buf; } +/* See expr.h. */ + const gdb_byte * safe_skip_leb128 (const gdb_byte *buf, const gdb_byte *buf_end) { @@ -2788,9 +2790,7 @@ safe_skip_leb128 (const gdb_byte *buf, const gdb_byte *buf_end) return buf; } -/* Check that the current operator is either at the end of an - expression, or that it is followed by a composition operator or by - DW_OP_GNU_uninit (which should terminate the expression). */ +/* See expr.h. */ void dwarf_expr_require_composition (const gdb_byte *op_ptr, const gdb_byte *op_end, @@ -2818,8 +2818,7 @@ base_types_equal_p (struct type *t1, struct type *t2) return TYPE_LENGTH (t1) == TYPE_LENGTH (t2); } -/* If