Remote GDB debugging

前端 未结 2 1917
借酒劲吻你
借酒劲吻你 2021-02-05 12:22

I\'ve just spent a whole day trying to find a way to enable GDB debugging from Qt Creator or Eclipse. I learned that there are basically two approaches to launch the target appl

2条回答
  •  广开言路
    2021-02-05 13:18

    Due to peculiarities in our makefile build system the file references contained in the debugging symbols look like this:

    ../src/main.cpp
    ../../src/utils/logger.cpp
    

    This is no problem for GDB, but Qt Creator was unable to map these paths to the actual files. I was able to fix this by adding 'dir' statements in the GDB init file:

    dir src
    dir src/utils
    ...
    

    Now it works.

提交回复
热议问题