gdb - How do I debug C++0x programs in MacPorts gcc 4.5? -
I have a simple C ++ program that I'm trying to debug, but the object file for GDB libraries Can not search (or no debug info available), and it does not seem to be able to find debug symbols for my executable.
I'm on OSX 10.5.8 with the MacPorts, and I have to code my code
blockquote>G ++ - mp-4.5 -Wall -pedantic -std = c ++ 0x G -ggdb i / opt / local / included L / opt / local / lib -lgsl static- libstdc ++ MCMC-Simplex CPP-O MCMC
(only one file, and live ++ - executable for mp-4.5 macports is GCC / G ++ 4.5)
When I try to run the object file can not be found "/ opt / local / var / macports / build / _opt_local_var_macports_sources_rsync .macports: gdb resulting execution I get a warning message (startup) form
.org_release_ports_lang_gcc45 / work / build / i386- apple of darwin9 / libgcc / trunctfdf2_s.o "- for any debug info Available "../../../gcc-4.5.0/libgcc/../GCC/Config / Soft-FP / Tactfade F. 2.c".
I point out that there is a bug during the making of MacPorts (it seems that the GDB object is looking for files in the temporary build directory).
I should add that when I try to see my programs in GDB (provided by Applet), then this is a random .s
in the file / Var / tmp
, which seems like an assembler file, this is the reason I say that it can not even find debug symbols for my program.
When I try the MacPorts GDB 7.1, I get the warning
: / / folder / Xa / XaqHO9PeEC8K-Nrd0L9xWk +++ TM / - Tmp - // cc2IvFto.o ': Can not open symbols to read: no such file or directory. (No debugging symbols found) ... done.
And any of the many error messages that Apple GDB gives (though the end result is the same).
Has anyone come into this problem, and came up with a solution?
OK, another "move" to continue with a single compile and link step G ++ command line must add -save-temps = obj
so that
remove 4/tmp/[random-string].o and .s
is not actually corrected (in fact you terminate the canonical SOURCE.o and SOURCE.s files
Comments
Post a Comment