From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2058.outbound.protection.outlook.com [40.107.93.58]) by sourceware.org (Postfix) with ESMTPS id 60D9C3858025 for ; Thu, 14 Oct 2021 09:33:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 60D9C3858025 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AhMCToeNIKpPTbxcPiYwsgkD4sUshEh5GoH+ZBoxY8j+Np7/OtslkwBd3w6+fJAMmid1Dojr3gwQ6heqAHi86kqxmmXFUQmtjijiBe0ytNKVKLOCzc2RCW2oDnlSPP57IRFZuly/ZuMgkaKhZT+hgruiI37iXWqXDZ4bBUk/Z0RfU/66XyAfadWvcUGkVjEDgJc+KpcTuc3ZxjI7eR8FhVcd/c2zaXhXLOwPcFdHqlzvx5LT6+fseofetlfbFn4FPDvxDOxBhvYwsq1oP/yB3E6BqKo7NUcJ0gwmwsQb+X1ffEljGvha1Lmpj8UJ3lgI8c+3COxMiNsarNgr8lUDrQ== 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=F8oiy5YEmyZmrbg1q++BSvpC+oxng9TVlGkwXx6+7yU=; b=JeXrKYuw710dPUIgszPnQI29ku/fvTw0bwJJFwXl9Jah3d0XxUZhdteN45hbqo1Y+gilH6NNTVHxbRBPr58mz4eI5o+u8jexXIQPeeR4MZpniIOEaWfMTAz987rBUEB57hX9N84quazoohFn1rRItgqRSgZjlFqORLRXsr0fIOqDwAqMW+OMygaWhpvh/70wHO2CkbQqYg74Rc6zfLFkXU4uwnvVOKQ0/O7VN8aGf2NNv33ZX0y8qeRxci8jGub6CotVHezxk6tXIe+9QyCn2/umjeVQd1+t03E7dz1qBTV9SkOXGB5rLMz/tCUMFgDljcamt5XWhd7psOWFSzgQuw== 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 DM5PR17CA0071.namprd17.prod.outlook.com (2603:10b6:3:13f::33) by MN2PR12MB3517.namprd12.prod.outlook.com (2603:10b6:208:ab::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Thu, 14 Oct 2021 09:33:23 +0000 Received: from DM6NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:3:13f:cafe::8e) by DM5PR17CA0071.outlook.office365.com (2603:10b6:3:13f::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Thu, 14 Oct 2021 09:33:22 +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 DM6NAM11FT038.mail.protection.outlook.com (10.13.173.137) 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:22 +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:15 -0500 From: Zoran Zaric To: Subject: [PATCH v3 18/28] Comments cleanup between expr.h and expr.c Date: Thu, 14 Oct 2021 10:32:25 +0100 Message-ID: <20211014093235.69756-19-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: 7b9bfd2d-355d-49ab-ff7d-08d98ef5aa3e X-MS-TrafficTypeDiagnostic: MN2PR12MB3517: 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: 2fJL2buKuyX7UNAagpaK4ALaYqagKc9A6UI++gwFvFL7rfvax651bs5bUOrObFHYCDpsVwKT9Q1zT7JrlwEK32MwyXpOQ2trmKS39ZQ9g4TS4R7U4v/HohknW7tV7r4NW5AR5xTO9KL/Y3tmoN3PUzdtM/JOkObpfjWBHIZPjaCmwyigaPhmBDqUjbyOXw8q8NgjBOLSJkRXj9Xi85ySDOO1pjz78BynJdQY/AGShTxVyzdRdLYR7aGuDYzMyIR9mSxR1iYY10ETbKTpjOMKQV3zWzcMkBcJlqz7C6UkDG3hGdd/PdkBjB65MPvNbjsWwvo9ey152w5mn3S3EqhR8Ul02VTHlNptD8u7VUwD4ponv2OYw8gU4XlFgGSba4uRfxD9B7EdSnMPgyRLJrTU6RtHCfjXp1L5hujStvjiSqZ6I3OAxGg4sF0pKv77rKbSX2prhOziB2PMXDkOnAFjaOPH1riWZQbhsGbfNzxT2e2+lR8hnshTnQ7PuPZQMU5IVQNP5GgHj/Flv8KfBjvRhSne6qTiSEGUqiFQOX4WUnWhYo9vN2/WkC2DRYqeDWEIC1l+EPkvtb/RP0H8Do8XPASI+dJjG/yfqLo/BUp4uRy93VxZ10rqcRvHUT/f7qtMBFYJAJw8rmTHfsiugil/KZBlg8u2N14uW2fSOpu0Ldtg3tdmHLrmxRZ9kPlVAS65q/OM7Sw/Maq8+wUSzE4HG4ojEa/t9qhCRA1o6PSAeWo= 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)(4326008)(26005)(2906002)(1076003)(8936002)(83380400001)(6916009)(2616005)(5660300002)(316002)(70206006)(86362001)(82310400003)(6666004)(186003)(508600001)(70586007)(336012)(36860700001)(81166007)(356005)(47076005)(426003)(36756003)(8676002)(44832011)(16526019)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2021 09:33:22.3223 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b9bfd2d-355d-49ab-ff7d-08d98ef5aa3e 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: DM6NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3517 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:28 -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 871c558e1a8..d5ecc5b4a87 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -2394,7 +2394,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) @@ -2402,7 +2402,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) @@ -2412,7 +2412,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 () @@ -2425,7 +2425,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) @@ -2653,7 +2653,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 @@ -2661,7 +2661,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) @@ -2715,7 +2715,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) @@ -2729,7 +2729,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, @@ -2741,7 +2741,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, @@ -2753,6 +2753,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) { @@ -2762,9 +2764,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, @@ -2792,8 +2792,7 @@ base_types_equal_p (struct type *t1, struct type *t2) return TYPE_LENGTH (t1) == TYPE_LENGTH (t2); } -/* If