From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MJfiCp7m82EjewAAWB0awg (envelope-from ) for ; Fri, 28 Jan 2022 07:50:38 -0500 Received: by simark.ca (Postfix, from userid 112) id 2A27B1F3B7; Fri, 28 Jan 2022 07:50:38 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B0D631EE18 for ; Fri, 28 Jan 2022 07:50:37 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 558EC394742B for ; Fri, 28 Jan 2022 12:50:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 558EC394742B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1643374237; bh=FjduH8zSP3kfqfJdB4ge/kmzS9YAnLRfjhebPezO3kU=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=t/usnbAKr/6GyuDYF13ttKBzNn6Qsy6jyhrMKGELwwmRz7PxgvU0lwqqa1csnQNQR 4pNPfOcPFhH8iktzIY8SbNE/I6Bjv9PVAevOTNBbpjX8E9qJerXsMmmaALvJgI7E8L 0t8u/9ONutvEhOe47W89OmNYIlSDS9iHPoWH5aJo= Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id C2DDC394742A for ; Fri, 28 Jan 2022 12:47:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2DDC394742A X-ASG-Debug-ID: 1643374052-0c856e06ab271c10001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id CCTVS7rE0pURunkl (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Jan 2022 07:47:32 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.localdomain (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) by smtp.ebox.ca (Postfix) with ESMTP id B1533441D69; Fri, 28 Jan 2022 07:47:32 -0500 (EST) X-Barracuda-RBL-IP: 192.222.157.6 X-Barracuda-Effective-Source-IP: 192-222-157-6.qc.cable.ebox.net[192.222.157.6] X-Barracuda-Apparent-Source-IP: 192.222.157.6 To: gdb-patches@sourceware.org Subject: [PATCH 14/33] gdb: remove COMPUNIT_EPILOGUE_UNWIND_VALID macro, add getter/setter Date: Fri, 28 Jan 2022 07:45:12 -0500 X-ASG-Orig-Subj: [PATCH 14/33] gdb: remove COMPUNIT_EPILOGUE_UNWIND_VALID macro, add getter/setter Message-Id: <20220128124531.2302941-15-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220128124531.2302941-1-simon.marchi@polymtl.ca> References: <20220128124531.2302941-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1643374052 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 3148 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.95629 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Cc: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" From: Simon Marchi Add a getter and a setter for a compunit_symtab's epilogue unwind valid flag. Remove the corresponding macro and adjust all callers. Change-Id: If3b68629d987767da9be7041a95d96dc34367a9a --- gdb/amd64-tdep.c | 2 +- gdb/dwarf2/read.c | 2 +- gdb/i386-tdep.c | 2 +- gdb/symtab.h | 13 +++++++++++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 539ebe9e1c36..4444187515fb 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -2901,7 +2901,7 @@ amd64_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc) struct compunit_symtab *cust; cust = find_pc_compunit_symtab (pc); - if (cust != NULL && COMPUNIT_EPILOGUE_UNWIND_VALID (cust)) + if (cust != NULL && cust->epilogue_unwind_valid ()) return 0; if (target_read_memory (pc, &insn, 1)) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index a14ac22f2882..fb138de86adc 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -9496,7 +9496,7 @@ process_full_comp_unit (dwarf2_cu *cu, enum language pretend_language) cust->set_locations_valid (true); if (gcc_4_minor >= 5) - cust->epilogue_unwind_valid = 1; + cust->set_epilogue_unwind_valid (true); cust->set_call_site_htab (cu->call_site_htab); } diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index e598a4d197b8..b98f47574998 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -2222,7 +2222,7 @@ i386_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc) struct compunit_symtab *cust; cust = find_pc_compunit_symtab (pc); - if (cust != NULL && COMPUNIT_EPILOGUE_UNWIND_VALID (cust)) + if (cust != NULL && cust->epilogue_unwind_valid ()) return 0; if (target_read_memory (pc, &insn, 1)) diff --git a/gdb/symtab.h b/gdb/symtab.h index a612e1a9b483..5419e70ced6a 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1541,6 +1541,16 @@ struct compunit_symtab m_locations_valid = locations_valid; } + bool epilogue_unwind_valid () const + { + return m_epilogue_unwind_valid; + } + + void set_epilogue_unwind_valid (bool epilogue_unwind_valid) + { + m_epilogue_unwind_valid = epilogue_unwind_valid; + } + /* Make PRIMARY_FILETAB the primary filetab of this compunit symtab. PRIMARY_FILETAB must already be a filetab of this compunit symtab. */ @@ -1607,7 +1617,7 @@ struct compunit_symtab /* DWARF unwinder for this CU is valid even for epilogues (PC at the return instruction). This is supported by GCC since 4.5.0. */ - unsigned int epilogue_unwind_valid : 1; + unsigned int m_epilogue_unwind_valid : 1; /* struct call_site entries for this compilation unit or NULL. */ htab_t m_call_site_htab; @@ -1636,7 +1646,6 @@ struct compunit_symtab using compunit_symtab_range = next_range; -#define COMPUNIT_EPILOGUE_UNWIND_VALID(cust) ((cust)->epilogue_unwind_valid) #define COMPUNIT_MACRO_TABLE(cust) ((cust)->macro_table) /* Return the language of CUST. */ -- 2.34.1