if i debug the hello world it is correctly compiled and pushed to the android device but it breaks on “illegal instruction” ; instruction: 0xffffff91 . (if i start without debugging then hello world runs fine without illegal instruction)
i use a nexus7 is it compatible with nsight tgra or did i incorrectly setup the debugger ?
Select the main project: Project->Properties->Configuration Properties->Debugging->Suspend on Launch=no.
That fixed it for me. It’s because the debugger hasn’t actually attached at that stage, I presume the illegal instruction is actually a breakpoint. I haven’t investigated if there’s a way to suspend the launch until the debugger has attached, I’ve not needed that yet.
Cheers, Jason.
We have a gdb fix for this issue. You can setup Gdb Location and Gdb Server Location of the project property page, let them point to the one downlaoded from below link.
jasedenton: that workaround comes with a cost: when you do that, it is possible that some of your JNI code will execute before GDB gets attached. This might mean that one or more of your breakpoints will be missed, if that code runs very early.
amanieux: please consider the updated gdb bits that Xuan provided to be beta software.
thanks for the gdb fix that avoid the direct “illegal instruction” (but i now have the illegal instruction if i do a “step into” after triggering a breakpoint in hello world)
is the regular workflow possible ?
regular workflow being :
1/ put a breakpoint
2/ f5 to start the app and go to your breakpoint
3/ do a “step over” or “step into” to debug your code
+1
I have the same issue trying to debug on Motorola Xoom.
Disabling ‘Suspend on Launch’ isn’t an option for me since I need to debug initialization code.
Actually I just found the updated gdb.exe and gdbserver files that Xuan.Wang posted do the trick for me.
My early initialization breakpoints work as expected and I am also able to step -into, -over and -out just fine.
Message for future visitor:
This will expire on 2/16/2013. We are preparing a new release, that will come soon. You will get a new release before that expired.