GCC debugger stack trace displays wrong file name and line number

后端 未结 11 1929
说谎
说谎 2021-01-21 00:22

I am trying to port a fairly large C++ project to using g++ 4.0 on Mac OS X. My project compiles without errors, but I can\'t get GDB to work properly. When I look at the stack

11条回答
  •  鱼传尺愫
    2021-01-21 00:56

    For a test, you could check if addr2line gives you expected values. If so, this would indicate that there's nothing wrong with the ELF generated by your compile/link parameters and casts all suspicion on GDB. If not, then suspicion is still on both the tools and the ELF file.

提交回复
热议问题