c++ - Debugging using gdb - Best practices -
I am making a start in GDB and I had to work it correctly. However, I am wondering how it is used in big projects. I have a project that is built using MessieFile and G ++. To work with GDB, we need to compile with debug symbols. Is right (G ++ -G files)?
Question
- Do I need to create a new target in some mess files like "debug" so that I can create a debug < Em> debug Is this the best practice?
- Suppose, I only have to debug foo.cpp and is it possible to generate debug symbols only for the entire program including the main program?
Any thoughts?
-
Not necessarily, though you may want to consider always- Constructing with (sometimes, you can also try to customize, and do not leave the debug (-O1, -O2, etc.) code; why not? For the release, you can always run a bar on the binary.
-
Yes, just create that file -
Comments
Post a Comment