From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B5B9E3858C56; Thu, 13 Oct 2022 13:54:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5B9E3858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665669290; bh=pa2HDRmP5J0ZC4GtuFzoFySrUgutATO/ozIZqInBOdA=; h=From:To:Subject:Date:From; b=qGZHA56rxwIuNUcZgw4+zqOiGg3qhAvJIyZhS4O+CzOsFJQEduUImIt3hD6fFxIeg fpevOo/4p1rpWg5v8YzNZyLfXvDtLGgTZGGpWw7nfa6x+pnHWSB8hqxEvKeGCEoU4P SE3OkzzrYGGr8RnM6TXMqZabo+ceiU1iu3a2LQm4= From: "daniel.hilburn at outlook dot com" To: gdb-prs@sourceware.org Subject: [Bug threads/29681] New: VS 2022 Preview C++ Android debugger crashes on breakpoint in thread on arm64v8a device Date: Thu, 13 Oct 2022 13:54:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: daniel.hilburn at outlook dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 29681 Summary: VS 2022 Preview C++ Android debugger crashes on breakpoint in thread on arm64v8a device Product: gdb Version: unknown Status: UNCONFIRMED Severity: normal Priority: P2 Component: threads Assignee: unassigned at sourceware dot org Reporter: daniel.hilburn at outlook dot com Target Milestone: --- I have an Android app which I am attempting to debug on my Samsung Galaxy S= 21. I=E2=80=99m using VS 2022 Preview. Ultimately, my goal is to create a fully= native project using the NativeActivity, as the old project template using ANT was removed. This project is just the provided Gradle Android App project modif= ied to use the NativeActivity implemented in a second SharedLib project. When I deploy the app to my phone and connect the debugger, it correctly starts the NativeActivity and I can hit a breakpoint in the ANativeActivity_onCreate function. So far so good. ANativeActivity_onCreate creates a second thread = on which to run my app code so that ANativeActivity_onCreate can return. That second thread executes correctly without crashing. However, if I put a breakpoint into the code running on that second thread, the debugger throws= an error and stops the app and disconnects. I=E2=80=99ve enabled debugger logging using =E2=80=9CDebug.MIDebugLog /On:M= IDebugLog.txt /OutputWindow=E2=80=9D in the Command Terminal window in VS and the error i= t provides is =E2=80=9CCall Frame Instruction op 45 in vendor extension space is not h= andled on this architecture.=E2=80=9D It seems to be unable to retrieve the call stac= k from the second thread. If I put a breakpoint in the ANativeActivity_onCreate immediately after it creates the thread, I can see the new thread in the Threads window. However, selecting it shows the same error and Visual Studio shows a window explaining that the selected thread is not supported. I contacted Visual Studio support about this issue (https://developercommunity.visualstudio.com/t/VS-2022-Preview-C-Android-de= bugger-cra/10165250?space=3D62&entry=3Dproblem) and they said that it is an issue with GDB and recommended that I contact y= ou guys. I have attached an AndroidApp.zip file containing the small example project. The test project is basically just the provided C++ Android App Gradle proj= ect with an additional C++ Android Shared Object Library project compiling the android_native_app_glue.c code. You can reproduce by putting a breakpoint in android_native_app_glue.c in android_app_create() at line 314 and another in android_app_entry() at line 240. The first breakpoint will hit on the initi= al thread without trouble and the second breakpoint from the second thread will cause the debugger to crash. Please let me know if you need any additional information from me on this issue, and thanks in advance for your assistance. --=20 You are receiving this mail because: You are on the CC list for the bug.=