Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
gdb mi未定义命令:-显示插入_Gdb - Fatal编程技术网

gdb mi未定义命令:-显示插入

gdb mi未定义命令:-显示插入,gdb,Gdb,当我使用-display insert 显示插入命令 概要 -显示插入表达式 每次程序停止时显示表达式 GDB命令 相应的GDB命令是“display” 我的行动: gdb test -i mi b main r -display-insert $rsp 输出: [yuan@Blanche test]$ gdb test -i mi =thread-group-added,id="i1" ~"GNU gdb (GDB) 8.3\n" ~"Copyright (C) 2019 Free Sof

当我使用
-display insert

显示插入命令

概要

-显示插入表达式

每次程序停止时显示表达式

GDB命令

相应的GDB命令是“display”

我的行动:

gdb test -i mi
b main
r
-display-insert $rsp
输出:

[yuan@Blanche test]$ gdb test -i mi
=thread-group-added,id="i1"
~"GNU gdb (GDB) 8.3\n"
~"Copyright (C) 2019 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
~"\nType \"show copying\" and \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-pc-linux-gnu\".\n"
~"Type \"show configuration\" for configuration details.\n"
~"For bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n    <http://www.gnu.org/software/gdb/documentation/>."
~"\n\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\"...\n"
~"Reading symbols from test...\n"
(gdb) 
b main
&"b main\n"
~"Breakpoint 1 at 0x1165: file test.c, line 10.\n"
=breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000001165",func="main",file="test.c",fullname="/home/yuan/test/test.c",line="10",thread-groups=["i1"],times="0",original-location="main"}
^done
(gdb) 
r
&"r\n"
~"Starting program: /home/yuan/test/test \n"
=thread-group-started,id="i1",pid="14434"
=thread-created,id="1",group-id="i1"
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000555555555165",func="main",file="test.c",fullname="/home/yuan/test/test.c",line="10",thread-groups=["i1"],times="0",original-location="main"}
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff7fd4100",to="0x00007ffff7ff2c64"}]
^running
*running,thread-id="all"
(gdb) 
=library-loaded,id="/usr/lib/libc.so.6",target-name="/usr/lib/libc.so.6",host-name="/usr/lib/libc.so.6",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff7dde630",to="0x00007ffff7f2689f"}]
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000555555555165",func="main",file="test.c",fullname="/home/yuan/test/test.c",line="10",thread-groups=["i1"],times="1",original-location="main"}
~"\n"
~"Breakpoint 1, main () at test.c:10\n"
~"10\t  int x = 1;\n"
*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x0000555555555165",func="main",args=[],file="test.c",fullname="/home/yuan/test/test.c",line="10",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="2"
(gdb) 
-display-insert $rsp
^error,msg="Undefined MI command: display-insert",code="undefined-command"
(gdb) 

我希望
-display insert
可以像gdb中的
display
一样工作,这就是手册所声称的。

这是旧的gdb手册,当前的手册可以在这里找到:

-display insert命令是在2006年从手册中删除的-我不相信这个命令曾经真正实现过。。。。或者,它在2006年之前就已经从GDB中删除了

使用MI时,您需要研究使用GDB/MI变量对象而不是显示命令,请参阅手册的这一部分:

^error,msg="Undefined MI command: display-insert",code="undefined-command"