Kal*_*son 5 c++ debugging qt gdb
我正在调试其他人的Qt程序并遇到以下错误消息,我不明白:
DWARF-2 expression error: DW_OP_reg operations must be used either alone or in
conjuction with DW_OP_piece or DW_OP_bit_piece.
Run Code Online (Sandbox Code Playgroud)
我不确定这意味着什么,谷歌没有多大帮助.
这是上下文 - sLocation是QString之前声明的几行.但是,它是从内联的函数创建的,所以我不确定它的值,并且我在尝试检查之前被追加到:
(gdb) printqstring suffix
(QString)0xffffbd80: "sorted"
(gdb) next
1241 sLocation += suffix;
(gdb) printqstring sLocation
Can't take address of "sLocation" which isn't an lvalue.
(gdb) info local
sLocation = <error reading variable sLocation (DWARF-2 expression error:
DW_OP_reg operations must be used either alone or in conjuction with
DW_OP_piece or DW_OP_bit_piece.)>
Run Code Online (Sandbox Code Playgroud)
有人可以解释一下该错误信息的含义或可能导致的错误信息吗?
该错误消息意味着正在从可执行文件GDB读取DWARF2调试信息,并拒绝该信息为无效(不遵循DWARF2标准)。
无效信息可能是由于 GCC 中的错误造成的,已在 SVN 修订版 147187 中修复:
2009-05-06 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (new_reg_loc_descr): Don't ever create DW_OP_regX.
(one_reg_loc_descriptor): Create DW_OP_regX here instead of calling
new_reg_loc_descr.
(loc_by_reference): If loc is DW_OP_regX, change it into DW_OP_bregX 0
instead of appending DW_OP_deref*.
Run Code Online (Sandbox Code Playgroud)