From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 35A023848E2E; Tue, 6 Dec 2022 15:34:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 35A023848E2E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670340863; bh=a1Gq9aVJiTlZVtDgcBjg6mPR4/tLpmNTsGo7HRfuT3Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DWE+h5Pgexa0KQY3gxcSLRFoGLpKH4zZXEHuY4yqxZn9Xzxi4PYAVNLrIHK9tHxxg odtglcRu/s75uUdqYivmIhHLks8Sa5CyCfkCMMdfojaxtBkONGNiOa5GiHJVzRC6zG a2RM1m+gxS8mC0lbaqZ6PRjxOpvStYAdg1gcKx20= From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/29854] ^C should interrupt synchronous wait on cooked index completion Date: Tue, 06 Dec 2022 15:34:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simark at simark dot ca X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29854 --- Comment #5 from Simon Marchi --- (In reply to Tom Tromey from comment #4) > Created attachment 14484 [details] > patch >=20 > I couldn't really test this, but maybe you can? It works. For fun, I added a "maintenance wait-finalize" command, that does: static void maintenance_wait_finalize (const char *args, int from_tty) { inferior *inf =3D current_inferior (); for (objfile *o : inf->pspace->objfiles ()) { dwarf_scanner_base *s =3D get_dwarf2_per_objfile (o)->per_bfd->index_table.get (); cooked_index_vector *v =3D dynamic_cast (s); if (!v) continue; printf("Waiting for %s\n", objfile_name (o)); v->wait (); } } This way, I can measure how much time GDB takes to make the index with: $ /usr/bin/time ./gdb -nx -q --data-directory=3Ddata-directory testsuite/outputs/gdb.gdb/selftest/xgdb -ex "maint wait-finalize" -batch With my unoptimized build, it takes about 30 seconds. With my optimized bu= ild (on the same binary), it takes 2 seconds. I noticed this, because I would start gdb.gdb/selftest.exp, then try to interrupt with ^C during the "break captured_main" command, and runtest would hang for a while, waiting for the= GDB process to exit. So, it's not really important to fix this, but it fixes an annoyance. --=20 You are receiving this mail because: You are on the CC list for the bug.=