How do I debug C++0x programs in MacPorts gcc 4.5?

后端 未结 3 1739
庸人自扰
庸人自扰 2020-12-18 00:00

I have a simple c++ program I am trying to debug, but gdb cannot find the object file for the libraries (or no debug info is available), and it does not seem able to find th

3条回答
  •  醉话见心
    2020-12-18 00:50

    Well, another "trick" to keep going with a single compile-and-link step would be to add
    -save-temps=obj
    to your g++ command line so that

    4 Remove /tmp/[random-string].o and .s

    is actually sort of not performed (actually you end up having the canonical SOURCE.o and SOURCE.s files in the directory where you're building instead of RANDOM-STRING.[os] in some temp folders, but from the point of view of locating debugging symbols that's fine

提交回复
热议问题