-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Cannot launch ndk-lldb in NDK in v26.1.10909125 #1994
Comments
I swear this isn't the first time I've fixed this problem... Because we had the same problem in ndk-stack but didn't also fix ndk-lldb: #1938. The report is unfortunately about 20 minutes too late to be fixed in r26c (it's on its way to QA as we speak). This probably justifies an r26d, but that'll be another month or more. I am curious, what workflow are you using where ndk-lldb is at all useful? IME it's very annoying to get working compared to using Android Studio's debugger (and that isn't really something we can solve because the introspection for gradle just isn't there). We've kept this around because it doesn't cost us much and someone's probably using it, but we've got very little idea why anyone would so we're not really sure how much attention we should be giving it, or for that matter even how to test it appropriately. |
Or rather, seeing the time stamp, I went straight to finishing the release this morning and only just got to this part of my inbox 😞 Well, if I'd been on time in the first place it'd have been a few days too late anyway :) |
Yes it's spectacularly annoying and I hate using it. Unfortunately though I have no choice as the project I'm contributing to uses CMake to manually 'handroll' its server APKs - so Android Studio can't gather the data it needs to run the debugger itself. This isn't the first project I've come across that does this either... |
Does https://developer.android.com/studio/debug/apk-debugger not even work? If it doesn't, you should file a bug against Android Studio. The whole point of that feature is to make it possible to debug things that weren't build by Studio. I'm somewhat amazed that ndk-lldb works for your use case at all. It was only ever built to handle non-gradle ndk-build projects. I don't think we've ever so much as tried using it on a CMake project. |
You know I hadn't heard of it... I'm not really an Android developer! It looks great, but unfortunately it can't seem to find the launched package, even though it is running. This was on 2022.3.1.19, but on 2023.1.1.28 it doesn't even launch on the target. I'll open bug after a bit more digging. |
how/where did you find out about ndk-lldb? we've tried to have little notes saying "hey, have you tried the Studio debugger?" everywhere, but we may well have missed some... (i wonder whether we should make ndk-lldb itself say "have you tried Studio?"!) |
enh beat me to it :) At the very least it sounds like I should add "Hey, are you sure you don't want APK debugging?" to the startup of ndk-lldb... |
A colleague at Arm working on a similar-ish application showed me. Clearly we could both do better! Although I have to say if I did see "hey, have you tried the Studio debugger?" I would just assume that it meant having an Android Studio project. Because the software I work on didn't use AS to create it I don't use AS enough to know what it's capable of. |
I'll write the warning a bit more carefully than I did above :) |
for Windows users
now it works |
https://r.android.com/c/2974633 fixes the bug and https://r.android.com/2974635 adds a hint to the startup:
|
That's great Dan, thanks! Feel free to close this issue when you're ready. |
^ Sorry, fat fingers... |
Changes: https://github.com/android/ndk/wiki/Changelog-r26#r26d Context: android/ndk#1994 The release appears to contain a single bugfix for ndk-gdb/ndk-lldb which doesn't affect us. Toolchain version is unchanged.
Description
I installed the NDKs via the sdkmanager. On
26.1.10909125
launchingndk-lldb
:Whilst on
25.2.9519653
(same parent directory, same machine, same sdkmanager install, same terminal):Looking in the
ndkgdb.pyz
for26.1.10909125
the error is from:Looks pretty inoccuous, and running the equivalent Python command yields the expected result:
Comparing it to the previous NDK version, there's no obvious related code change, but the Python file has become a zipapp (hence the change in extension). I suspect the
__file__
relates to the embedded script so callingos.path.dirname(..)
on it returns the top-level zipapp file rather than its owning directory.Affected versions
r26
Canary version
No response
Host OS
Linux
Host OS version
Ubuntu 22.04.3 LTS
Affected ABIs
armeabi-v7a, arm64-v8a, x86, x86_64
Build system
ndk-build
Other build system
No response
minSdkVersion
34
Device API level
No response
The text was updated successfully, but these errors were encountered: