From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qKc7OxPQiGN2Bh8AWB0awg (envelope-from ) for ; Thu, 01 Dec 2022 11:02:27 -0500 Received: by simark.ca (Postfix, from userid 112) id E31161E11E; Thu, 1 Dec 2022 11:02:27 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=pN6v4hHQ; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.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 9740F1E0D3 for ; Thu, 1 Dec 2022 11:02:27 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 47F3C385840E for ; Thu, 1 Dec 2022 16:02:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 47F3C385840E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669910546; bh=1D2vdKlRfIzrzh56eoif8MKtZ2+APHorg491V1Qqc5E=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=pN6v4hHQ3j8tgo2WNR4EpDdS8gqRUvmbhX7hOYBZVob8DxVkNjW3OAsFOwJPSv895 6D2zG/7pFQMD/blcRyqr8l1Ur59vr51hc9X3AVQELjzi9zhBisLSFSA9jNEJ1mGsTf UmNONit4iSsS/fx32mhnaO8kW4vOmEM4o8JKD76I= Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 4509A3858D32 for ; Thu, 1 Dec 2022 16:01:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4509A3858D32 X-ASG-Debug-ID: 1669910505-0c856e6c056f9f0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id RN77IXDBine0YddV (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Thu, 01 Dec 2022 11:01:45 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from smarchi-efficios.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtp.ebox.ca (Postfix) with ESMTP id EDAA1441D64; Thu, 1 Dec 2022 11:01:44 -0500 (EST) X-Barracuda-RBL-IP: 192.222.180.24 X-Barracuda-Effective-Source-IP: 192-222-180-24.qc.cable.ebox.net[192.222.180.24] X-Barracuda-Apparent-Source-IP: 192.222.180.24 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] gdb/dwarf: add some QUIT macros Date: Thu, 1 Dec 2022 11:01:44 -0500 X-ASG-Orig-Subj: [PATCH] gdb/dwarf: add some QUIT macros Message-Id: <20221201160144.1045410-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1669910505 X-Barracuda-Encrypted: AES128-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: 1320 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=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.102531 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 Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" While testing the fix for PR 29105, I noticed I couldn't ctrl-C my way out of GDB expanding many symtabs. GDB was busy in a loop in cooked_index_functions::expand_symtabs_matching. Add a QUIT there. I also happened to see a spot in cooked_index_functions::expand_matching_symbols where a QUIT would be useful too, since we iterate over a potentially big number of index entries and expand CUs in the loop. Add one there too. Change-Id: Ie1d650381df7f944c16d841b3e592d2dce7306c3 --- gdb/dwarf2/read.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 87c0914d8395..dd7fea400275 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -18653,6 +18653,8 @@ cooked_index_functions::expand_matching_symbols (per_objfile->per_bfd->index_table.get ())); for (const cooked_index_entry *entry : table->all_entries ()) { + QUIT; + if (entry->parent_entry != nullptr) continue; @@ -18728,6 +18730,8 @@ cooked_index_functions::expand_symtabs_matching for (const cooked_index_entry *entry : table->find (name_vec.back (), completing)) { + QUIT; + /* No need to consider symbols from expanded CUs. */ if (per_objfile->symtab_set_p (entry->per_cu)) continue; -- 2.38.1