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:


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/ from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /lib/ from remote target...
Reading /lib/ from remote target...


Did you login the device with root?
If not, would you mind to take it a try?



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/ 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?


It looks like this can be fixed with gdb-multiarch.

Would you mind to give it a try?