![]() It is not a bad idea to also use the newest version of GDB as well, since there are many new features and bug fixes to make your work more pleasant. Debug support for optimized code is still work in progress on both GCC and CLANG, so for the best debugging experience use the newest version of these tools as possible.These tips may work or may not work and it might happen that you will need to lower your optimization level in order to be able fully to debug the program. Here are a few tips on how to make your debugging experience with optimized code better. ![]() This happens because compilers “rewrite” your code to make it faster, but this makes debugging harder.įor some of these issues there are no easy solutions, but that doesn’t mean you can’t do anything. If you ever debugged optimized code, you know that during debugging values often get mixed up or are missing or the program doesn’t follow a regular path but instead jumps around etc. Debugging memory corruption with record and watchpoints.Repeat program through GDB until failure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |