Is it possible to add comments to the source code while debugging with C++?
while debugging a C++ program with GDB, is it possible somehow to add comments to the original souce code whitout affecting to the debugging process?
I started to debug with GDB, but if I modify (just adding comments at the end of each C++ code line wiht //) the code, when I display the code in GDB I get weird display.开发者_如何学JAVA
Thanks
Adding inline comments on existing lines should not pose a problem.
Adding new comments will break the existing line order (since debug symbols are per line number), giving you a shifted line display while debugging.
精彩评论