How to set sysroot for Nsight (GDB) to use

I am using Nsight to debug a project from a host computer (Ubuntu) to a Jetson machine (target). I get warnings saying to set sysroot to access files locally. I copied the file system from the Jetson to the host. I tried setting sysroot to the path of the copy using the command window, but I got the same warnings.

I can set sysroot when running cuda-gdb located here:

/usr/local/cuda-10.0/bin

However, if I close that and open Nsight Eclipse, sysroot is set back to target.

How can I set sysroot in Nsight Eclipse?

Below are the warnings:

Coalescing of the CUDA commands output is off.
warning: "remote:" is deprecated, use "target:" instead.
warning: sysroot set to "target://".
Reading /lib/ld-linux-aarch64.so.1 from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /lib/ld-linux-aarch64.so.1 from remote target...
Reading /lib/ld-2.27.so from remote target...

Hi,

Did you login the device with root?
If not, would you mind to take it a try?
https://devtalk.nvidia.com/default/topic/1052253/jetson-agx-xavier/no-timeline-for-profiler-xavier-nvvp-and-nsight-compute-is-not-working-in-jetson-xavier/post/5347671/#5347671

Thanks.

Hi,

Thank you for your response.

I logged in with root, which solved the hang up I had after this message.

Reading /usr/lib/aarch64-linux-gnu/tegra/.debug/libnvos.so.debug from remote target...

However, I still get the warnings in my original post.

It is instructing me to set sysroot. I want to do that so it looks for libraries on the host machine which has a copy of the Jetson. This will make the process faster.

I have tried editing the .cuda-gdbinit file by adding the “set sysroot” line. When I run cuda-gdb in the command line and then enter “show sysroot”, the path I set in the .cuda-gdbinit file shows up. However, when I run the debugger in Nsight Eclipse, I get the same warinings that sysroot is not set.

How do I set sysroot?

Hi,

It looks like this can be fixed with gdb-multiarch.
https://github.com/cs01/gdbgui/issues/237

Would you mind to give it a try?

Thanks.