How to make the “Locals and Expressions” debugging window operational with gcc 4.8?

前端 未结 3 617
轮回少年
轮回少年 2020-12-10 02:53

I am using gcc 4.7 and gcc 4.8 together with QtCreator 2.7.1.

The problem is that when I use gcc 4.8, I am unable to see the values of my variables

3条回答
  •  情歌与酒
    2020-12-10 03:39

    The reason probably is that gcc 4.8 is using by default newer format for storing debugging information (http://gcc.gnu.org/gcc-4.8/changes.html). If you are using gdb version less than 7.5 (see gdb --version) you need to provide -gdwarf-3 argument for compiling with debug info using gcc 4.8.

提交回复
热议问题