-
Notifications
You must be signed in to change notification settings - Fork 243
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
Debugging in general #85
Comments
You can use
But normally you get a much more sophisticated call stack, I am surprised it's so spartan. Also, typically people who use this just use printf/tombstones to debug, I don't know if anyone's gotten gdb working, but a guide would be cool. |
Cheers. I'll try that out. Will do some more digging as well. If I can get |
Please do! |
After some playing around trying to get debug symbols - had some partial luck - it looks like the crash is referencing test.c:161. But that doesn't seem to make much sense. Also, I say partial luck because initially But while it gives some more info, it seems wrong. I'm likely messing something up. |
Since then I've been playing with the ndk's Have just now managed to get a simplified shell script version (just for It definitely still needs some work. I'll upload it soon in the hope anyone else will poke at it, maybe make some suggestions. I'm now back to struggling with actually debugging the problem that started this journey. |
Well (1) Please write it up, and include it to the readme. |
Ok, I've pushed a branch to here. After tweaking a few environment vars it should (I hope) be as simple as running: $ make push
$ ./ndk-gdb.sh As for my actual problem, I'm not exactly certain beyond the I've as yet been unable to actually pin down what exactly is raising the signal, so have no idea what the root cause might be. |
I'm only now learning about what you meant earlier by tombstone debugging. This is the freshest tombstone. |
I also should have mentioned that while the library name is changed, the code for |
|
|
For now I've force pushed the removal of the If I'm not mistaken though I did set it up so that if But I should not have included those changes in this branch anyway. Before submitting a PR, I should probably clean up the bash script a bit. For one, I'm not keen on the duplication of values that are already in the |
Regarding the |
Order/duplication doesn't matter - any plans to open a proper PR here? |
Yes. Wanted to clear some things up first, but I suppose that can be done before the PR gets merged. |
PR is #87 |
While I will outline a specific issue being faced, I'm really mostly interested in knowing how to debug a barebones project like this.
Should we use
ndk-gdb
somehow? (From initial testing I get the feeling this is not the approach.)It throws an error
Failed to retrieve application ABI from Android.mk
.Or perhaps running
am
from anadb shell
, presumably usingset-debug-app
and-w
to wait for a debugger; then using plain oldgdb
withgdbserver
.Other?
I just wanted to get some advice if possible before I potentially go digging down some unnecessary rabbit holes.
Currently just trying to get the example code working, so I can then poke around and develop a good understanding of how things are working.
Sideloading onto a device using Android 10 (API 29).
Can get the demo to startup on the device, I see a couple of seconds of content, then it crashes.
logcat
yields the following (with the errors singled out).The standout error being:
The text was updated successfully, but these errors were encountered: