7/13/2015

gdb: source indicator goes out of order

Problems:
If program is compiled with option "-O2", gdb might not recognize order of source lines correctly and the current statement  would point to incorrect line.

Solution:
Change "-O2" to "-O0"

http://www.linuxquestions.org/questions/programming-9/gdb-doesn%27t-provide-the-correct-line-in-the-source-code-858155/

No comments:

Post a Comment