You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was expecting no issue because of "set substitute-path".
What actually happened?
I'm trying to use gdb on code in a docker but it is not working well.
I can debug with gud-gdb(console on left and code on right) but not with gdb "gdb -i=mi" (with all information in 6 windows).
I tried it on manjaro (and also ubuntu) with different projet.
To be sure, I tested with this simple projet to reproduce with "hello world" and a docker and I have the same result : https://github.com/leimao/CPP-Debug-Docker.
The issue is that I can only follow the code progress in gdb console but not directly on the code file with the arrow.
No issue if not in docker.
Describe your attempts to resolve the issue
I guess something is missing in my gdb command for the docker but I don't see what.
If someone already debug with gdb in a docker maybe he can help.
I don't see on internet if this is a known limitation of gdb used in docker with emacs
Steps to reproduce
I tried it on manjaro (and also ubuntu) with diferent projet.
To be sure, I tested with this simple projet to reproduce with "hello world" and a docker and I have the same result : https://github.com/leimao/CPP-Debug-Docker.
to launch the docker daemon sudo dockerd
to be able to pass following command in another terminal sudo chmod 666 /var/run/docker.sock
to build and run the docker cd CPP-Debug-Docker docker build -f cpp.Dockerfile -t cpp-debug:0.0.1 .\n docker run -it --rm --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $(pwd):/mnt cpp-debug:0.0.1
to know your container name to pass in gdb command in another terminal docker container ls
Strange issue :
<Alt+x> gud-gdb is launched with the same command that gdb but with "--fullname" option rather than "-i=mi" at the start. gdb --fullname /docker:name_of_docker_container:/mnt/build/logicalError -ex "set substitute-path /home/name_on_manjaro/CPP-Debug-Docker/ /mnt/"
If I launch <Alt+x> gdb, there is no code following with the arrow. But We can see the breakpoint.
If I launch <Alt+x> gud-gdb, there is code following with the arrow. But We can not see the breakpoint.
What did you expect to happen?
I'm launching gdb in emacs with this command after <Alt+x>, gdb :
gdb -i=mi /docker:reverent_black:/mnt/build/logicalError -ex "set substitute-path /home/name_on_manjaro/CPP-Debug-Docker/ /mnt/"
I was expecting no issue because of "set substitute-path".
What actually happened?
I'm trying to use gdb on code in a docker but it is not working well.
I can debug with gud-gdb(console on left and code on right) but not with gdb "gdb -i=mi" (with all information in 6 windows).
I tried it on manjaro (and also ubuntu) with different projet.
To be sure, I tested with this simple projet to reproduce with "hello world" and a docker and I have the same result :
https://github.com/leimao/CPP-Debug-Docker.
The issue is that I can only follow the code progress in gdb console but not directly on the code file with the arrow.
No issue if not in docker.
Describe your attempts to resolve the issue
I guess something is missing in my gdb command for the docker but I don't see what.
If someone already debug with gdb in a docker maybe he can help.
I don't see on internet if this is a known limitation of gdb used in docker with emacs
Steps to reproduce
I tried it on manjaro (and also ubuntu) with diferent projet.
To be sure, I tested with this simple projet to reproduce with "hello world" and a docker and I have the same result :
https://github.com/leimao/CPP-Debug-Docker.
System Information
https://pastebin.com/V21kWuLS
The text was updated successfully, but these errors were encountered: