-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of pipeTransport #543
Comments
Please see Remote Debugging. You can configure lldb-server to use a pipe connection as well as tcp. |
Good to know, but I can't find in extensive documentation how to do that. |
I haven't done that myself. Here's some docs on lldb site: https://lldb.llvm.org/man/lldb-server.html.
Yes. I think in the case of Cpp-Extension, gdb runs inside the container too? |
Exactly, the Cpp-Extension only needs a GDB installed on the target system, no extra gdbserver is needed for that. |
Codelldb doesn't work like that. The closest analogue would be installing lldb-server in the target container/device and running a remote debugging session. |
Is it possible to configure the lldb-path? Maybe in first attemp I could try to wrap all lldb calls through a ssh-helper script. As long as the paths from host and target are the same it might work. |
In the case of cppdbg's pipe transport, you are actually using gdb that is a part of the docker image, which cppdbg adapter communicates with over the pipe using "gbd-mi" protocol. CodeLLDB loads LLDB shared library in-process and uses its API directly, so this sort of remoting is not possible. |
I understand... I have played around with the vscode-remote extension and lldb as part of the remote extensions. As long as the target system has enough resources I could directly debug with ssh and the installed lldb on the target system. Unfortunately for small embedded devices this is not an option. |
Those, are exactly what remote debugging exists for... |
I have noticed that alot of debug symbols are downloaded from the target device to the host which leads to slowdown of the debug-session. Is there an option to optimize debug symbol handling? |
See here. LLDB is pulling remote files because it doesn't know where to find a local copy. |
I have sysroot where basically all needed files are there, but unfortunately it don't seems to specifiy to load from the sysroot and therefore the most files are pulled from the remote e.g.:
I have tried to specify sysroot as follows as part of the initCommands:
I have found something interessting in lldb documentation regarding the
How can I properly configure this option? |
Honestly, I don't have that much experience with remote debugging. When I do, I always cross-compile, so I just let LLDB upload local binary to the target and run it there. It's quite likely that some enhancements could be made in codelldb to make remote debugging more ergonomic, but I am not sure what those would be (some sort of mapping between local<->remote files?). If you figure it out, please let me know!
I am not aiming to wrap every possible debugging scenario that LLDB supports in VSCode UI/settings, just the basics. For everything else, there's the Custom Launch mode. This should allow you to set it up exactly the way you need. |
I have noticed that many of the symbols are resolved by specifying the
For some reasons there are still a small amount of shared objects which will be downloaded from the target although these files are part of the sysroot. I will try to experiment with the custom launch mode. |
In the general Cpp-Extension there is a possiblity to configure a so called pipeTransport as part of a launch configuration.
Over this way it is possible for example to pipe through ssh, that is quite helpful for debugging embeeded devices.
Furthermore it is possible to pipe directly through in a docker environment.
Therefore no server is needed just a locally installed lldb.
The text was updated successfully, but these errors were encountered: