breakpoints in GDB

后端 未结 2 1761
慢半拍i
慢半拍i 2020-12-18 15:27

I think this may have been asked earlier but i can\'t find one that satisfied my requirements.

I am debugging(infact trying to understand) a large project by tryin

相关标签:
2条回答
  • 2020-12-18 15:33

    The other thing to beware of besides shared libraries is that gdb source file names are relative to the directory where the code was compiled. If you haven't compiled with absolute pathnames, use the dir command to add the compilation directory to the list of places gdb searches for source code.

    And a hint: I find I am wildly more productive when I use the Data Display Debugger (DDD) graphical front end to gdb.

    0 讨论(0)
  • 2020-12-18 15:34
    1. No.
    2. No.
    3. Yes.

    Make sure you compile with -g (debug) option. Make sure the sourcepaths are set correctly. Use directory, show directories and dir commands to see/set.

    0 讨论(0)
提交回复
热议问题