From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6D8B385782F; Tue, 5 Dec 2023 17:47:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6D8B385782F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1701798452; bh=tBbeKcy7qWOcJS0RGI0tRAyYSyw6qwJ92LvVsz6H9iE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vQtZlzTFi8+3Bbvt6ThlDHvjrpV+rii6qFl/euIOupiMvV4b5WMIXCa7aKG1oFJvl sSnoV1qteqcgV0c+iN26Bz3SVlyd0MreiN+mh2zvS40nKUZG7IVWq0N5XLauY/cG8+ eCMkBjNn7jD/z5LMK8swafbo2l8UCad22IPSnbek= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/29548] Can't breakpoint __cxa_throw with Qt5Core.dll Date: Tue, 05 Dec 2023 17:47:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D29548 --- Comment #1 from Sourceware Commits --- The master branch has been updated by Hannes Domani : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D6e28dd6fa302= 7d38351d2cf672509eca05aa19fd commit 6e28dd6fa3027d38351d2cf672509eca05aa19fd Author: Hannes Domani Date: Tue Dec 5 18:41:44 2023 +0100 Fix breakpoints on symbols with multiple trampoline symbols On mingw targets it's possible that there are multiple trampoline symbols for __cxa_throw, in each module where a throw is done, but without a corresponding global symbol. Since commit 77f2120b200be6cabbf6f610942fc1173a8df6d3 they cancel each other out in search_minsyms_for_name, which makes it impossible to set a breakpoint there: (gdb) b __cxa_throw Function "__cxa_throw" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 2 (__cxa_throw) pending. (gdb) c Continuing. [Inferior 1 (process 10004) exited with code 03] With catch throw it also doesn't work, and you don't even get an error message: (gdb) catch throw Catchpoint 2 (throw) (gdb) c Continuing. [Inferior 1 (process 5532) exited with code 03] (gdb) The fix is to simply ignore other trampoline symbols when looking for corresponding global symbols, and it's working as expected: (gdb) b __cxa_throw Breakpoint 2 at 0x13f091590 (2 locations) (gdb) c Continuing. Breakpoint 2.1, 0x000000013f091590 in __cxa_throw () (gdb) And catch throw also works again: (gdb) catch throw Catchpoint 2 (throw) (gdb) c Continuing. Catchpoint 2.1 (exception thrown), 0x000000013f181590 in __cxa_throw () (gdb) Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29548 Approved-By: Tom Tromey --=20 You are receiving this mail because: You are on the CC list for the bug.=