gdb does not hit any breakpoints when I run it from inside Docker container

后端 未结 3 2136
天涯浪人
天涯浪人 2020-12-30 04:09

The problem

I am able to set and reach a breakpoint if I compile and run from the host, but if I do it from within the docker container gdb does not

3条回答
  •  情歌与酒
    2020-12-30 04:33

    thanks the answer from @rubicks.

    and if you can't use --privileged option(e.g. you are using a container from cloud), you can print stacktrace from your program:

    How to automatically generate a stacktrace when my gcc C++ program crashes

提交回复
热议问题