From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F1BEF3858024; Fri, 14 Oct 2022 15:11:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1BEF3858024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665760294; bh=OdC6adL5qLw4M0d6J0UKhlYl9+38JCi0GJSWI9JhY7Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Za2GRbL4ZFZpzlUTt6VSykq0szWyovj+cllO+tHE6kEES3Vr7NLgwj7oZQrrpY6oZ zC549jYkAjou85ulrcA8yuAA5H7B5+4bdwRRkmfujOjlewrufOjYSj7rZhpnikjJlq gHtvIqdxSTnge/nXh8LLqtOQDuGrHgBye0WBILmg= From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug threads/29681] VS 2022 Preview C++ Android debugger crashes on breakpoint in thread on arm64v8a device Date: Fri, 14 Oct 2022 15:11:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: threads X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simark at simark dot ca 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=3D29681 --- Comment #9 from Simon Marchi --- (In reply to Daniel Hilburn from comment #8) > As I understand it Visual Studio has a gdb "frontend" (not sure what that > means), so maybe that is it on my PC side of things. The Android NDK ships > with a prebuilt gdbserver, which Visual Studio deploys with my application > to the Android device. I thought that adb was communicating with that, but > maybe it is Visual Studio itself. In trying to track down my local gdb fi= le > to update it, I debugged my application from Visual Studio and looked in > Task Manager to see what programs were running. I saw adb but no gdb, so > that's why I was thinking that VS was using adb. I'll look into how Visual > Studio's gdb debugger works and see if I can track that down. You definitely have a gdb binary somewhere, because this kind of chatter in= the logs: -1060-stack-list-frames 0 1000 1060^error,msg=3D"Call Frame Instruction op 45 in vendor extension space is= not handled on this architecture." is GDB MI (machine interface). It is your GUI application (Visual Studio) talking to GDB. If I had to guess, adb is involved as the communication bridge between gdb = and gdbserver. To locate which gdb is used, you could try to look at the processes (ps) wh= ile your debug session is running. I tried download the Android NDK, but could= n't find a GDB executable in there. Perhaps it is downloaded separately / on-demand. > Incidentally, do you think that the error is originating from the gdbserv= er > on the device or from the gdb on my host PC? The way it emits seems like > Visual Studio is sending a command to gdbserver to retrieve the callstack > when the breakpoint hits and gdbserver is replying that the specified > command is not handled. Does that correct? If so, that would imply that t= he > host debugger in VS is more up-to-date than the gdbserver instance running > on the device. The error originates from GDB on your host PC. The stack trace is generate= d by GDB on the host, using the DWARF information present in the executable.=20 GDBserver doesn't do stack unwind. Visual Studio talk on your host talks with GDB on your host. GDB talks to GDBserver whenever it needs to interact with the debugged process, for inst= ance to read memory or registers, or to resume threads. In your case, it's GDB = that generates the error, the DWARF information in the executable contains an operation that GDB does not know about. Again, if I had to guess, I'd say that your GDB and GDBserver versions are = the same, if they come from the same place. In theory, you can upgrade only yo= ur GDB, as it's supposed to be able to talk with older GDBservers. Some newer features might not be available, but in most cases it degrades gracefully. = But in your case, the problem you encounter only concerns work done on the host= , so it should work fine to use a newer GDB with your current GDBserver. I say should, because it's not the best tested scenario. --=20 You are receiving this mail because: You are on the CC list for the bug.=