breakpoints not resolved with VS 2013

Hi everyone,

I must be doing something wrong, but for some reason, when I set a breakpoint it’s not resolved correctly.

I’ve even tried with the hello world demo, setting the breakpoint like this:

JNIEXPORT jstring JNICALL
Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
                                                  jobject thiz )
{
    return (*env)->NewStringUTF(env, "Hello World"); // I set the breakpoint here
}

I’ve tested it with nsight versions 1.6 and 2.0 with the same result. I checked the strip option wasn’t set, but I’m running out of ideas…

Is there something else I should check again?

I’ve just discovered the logs in AppData throwing this error:

2015-02-03 22:38:11.8924|INFO|Nvidia.PentaK.Core.RedirProcess|43-exited: code 0, finished in 31 ms
2015-02-03 22:38:11.8924|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] cmd: "13-interpreter-exec console "source C:/NVPACK/android-ndk-r10c/prebuilt/common/gdb/common.setup""
2015-02-03 22:38:11.8924|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: 13^done
2015-02-03 22:38:11.8924|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] cmd: "14-interpreter-exec console "art-on""
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: =cmd-param-changed,param="breakpoint pending",value="on"
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: &"No symbol table is loaded.  Use the \"file\" command.\n"
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: ~"Breakpoint 1 (art_sigsegv_fault) pending.\n"
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: =breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="art_sigsegv_fault",times="0",original-location="art_sigsegv_fault"}
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="art_sigsegv_fault",times="0",script={"silent","printf \"Caught SIGSEGV in user program\n\""},original-location="art_sigsegv_fault"}
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: =cmd-param-changed,param="breakpoint pending",value="auto"
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: ~"ART debugging mode is enabled.\n"
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: ~"If you are debugging a native only process, you need to\n"
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: ~"  handle SIGSEGV print stop\n"
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: 14^done
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: ~"re-enable normal SIGSEGV handling using this command:\n"
<b>2015-02-03 22:38:11.9085|ERROR|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] exception: Object reference not set to an instance of an object.</b>
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] cmd: "15-exec-continue"
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: 15^running
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Debug.Interop.Gdb.Debugger|[GDB] stdout: *running,thread-id="all"
2015-02-03 22:38:11.9085|INFO|Nvidia.PentaK.Core.RedirProcess|44-launch: C:\NVPACK\android-sdk-windows\platform-tools\adb.exe "-s XXXXXX forward tcp:4040 jdwp:29379"
2015-02-03 22:38:11.9285|INFO|Nvidia.PentaK.Core.RedirProcess|44-stdout:

Hi,

This error may or may not be connected to your issue. What device and Android version are you using?

Hi Dimitry,

I tried with the NVIDIA Shield tablet and Nexus 5. Both with the same result. The breakpoints are never resolved.

Dmitry found what were wrong with my devices.

The problem is that I have my devices rooted. When I rooted my devices the files /system/bin/app_process and /system/bin/app_process32 where exchanged with the daemonsu binary, leaving just a symlink to the real location.

In the process of loading symbols, the app_process is needed, but when the nsight tries to pull the file, it couldn’t because it was just a symlink.

Thank you Dmitry!

The issue with debugging rooted devices will be fixed in the next version of Nsight Tegra.