Finding the source file fails when the path on the target machine does not exist? #1200
Replies: 1 comment
-
Oh. There's a whole guide on remote debugging. That should do it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks for your work on this project!
I'm not quite sure where the problem is, but basically, I have a small app (which just prints hello world) which I put on a remote machine. The full path to the executable is:
/home/test/b
(remote machine!). The source code of the app is:/home/goose/trash/learn-dbg/b.asm
(local machine!).I then run
codelldb --port 13000
on the remote machine, create an ssh tunnel and successfully attached the adapter (nvim-dap
).When it breaks (either at a breakpoint or first entry), it shows me a decompiled version of that file.
It's not the source file, it's a temporary buffer with the decompiled code. However, note the second line:
It thinks this path does not exist, but it in fact does exist! But only on the local machine with the editor.
I looked into the log and found this:
So I tried the following. I went into the remote machine and just created path
/home/goose/trash/learn-dbg/b.asm
. I didn't put any source code into it, I just created the path.And guess what, it worked. I'm assuming
codelldb
tries to (for some reason?) check if a path exists, if it doesn't, it returns symbols not found. Otherwise it delegates the job of finding the source file to the client.Is there some setting or something I can do to fix it?
codelldb
:v1.11.1
nvim
:v0.10.2
nvim-dap
:a6070b4e9e9a8ff1bc513c3748eff27080b0f44a
Note:
codelldb
works locally perfectly fine too. And if the path to the source file exists on the target machine (doesn't have to contain the actual source code), but not if it only exists locallyP. S.
This seems to cause it (
./adapter/codelldb/src/debug_session.rs:1691
):But why does it assume that the files have to be local? Can it be configured somehow?
Beta Was this translation helpful? Give feedback.
All reactions