gdb prints wrong values when modifying arguments

前端 未结 3 922
夕颜
夕颜 2020-12-11 17:02

System

Fresh install of codeblocks 12.11 + mingw pack.

  • win7 64
  • gcc 4.7.1
  • gdb 7.5

Example code

Compiled wit

3条回答
  •  既然无缘
    2020-12-11 17:33

    gcc does not generate debugging info correctly for values that are in registers -- either values that have been put in registers or values that start there due to the calling conventions. This is a long-standing problem with gcc since at least 4.0, and makes it tricky to debug things.

提交回复
热议问题