From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 701303858C52; Sun, 27 Mar 2022 16:16:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 701303858C52 From: "mikaela.szekely at qyriad dot me" To: gdb-prs@sourceware.org Subject: [Bug gdb/28874] arm-none-eabi: internal-error: thread_info* inferior_thread(): Assertion `current_thread_ != nullptr' failed Date: Sun, 27 Mar 2022 16:16:01 +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: 11.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mikaela.szekely at qyriad dot me 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: cc attachments.created 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2022 16:16:01 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28874 Mikaela Szekely changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mikaela.szekely at qyriad = dot me --- Comment #14 from Mikaela Szekely --- Created attachment 14040 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14040&action=3Ded= it added has_inferior_thread() and checks it in remote_add_thread() > Whilst it is a bit of the hack for > the silent_p flag, looking at the 11.1 diff, that flag was added solely f= or > non-threaded targets like the BMP. I don't fully understand the thread methods here either, but `extended_remote_target::attach()` calls `switch_to_inferior_no_thread()` before calling `remote_add_thread()` for any target where `target_is_non_stop_p() =3D=3D false`, with no `switch_to_thread()` in-betw= een, so I think this bug might affect more than just non-threaded targets? I would be interested to know if any other targets are experiencing this bu= g, but either way if you'd like a less hacky and possibly more general-case solution for this, then that might just be to check in `remote_add_thread()= ` if there is a current thread or not, and switch if not, as in this patch? This patch does create more diff-noise, though; I'm not sure which is preferable= for gdb. --=20 You are receiving this mail because: You are on the CC list for the bug.=