2016-07-05 71 views
0

设在https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Support-Commands.html的GDB/MI文件上,我碰到这个为什么gdb-mi不支持异步目标功能?

$ gdb --quiet -i=mi $(readlink -f $(which ls)) 
=thread-group-added,id="i1" 
=cmd-param-changed,param="pagination",value="off" 
=cmd-param-changed,param="confirm",value="off" 
~"Reading symbols from /nix/store/6m648r8w4qhqv8c33n09blp389bsvvx4-coreutils-8.25/bin/ls..." 
~"(no debugging symbols found)...done.\n" 
(gdb) 
-list-target-features 
^done,features=[] 

我怎样才能找出原因async是不是在目标功能列表?鉴于emacs默认在gdb集成中尝试使用async的功能,我期望这个功能非常标准。

我在gdb版本7.11.1

+0

什么是您的操作系统和CPU?你在哪里找到你的gdb,在os包管理器中编译它呢? – osgx

回答

3

-list-target-features有点有趣。为了看到async那里,你必须做两两件事:

  1. 开始下,-gdb-set mi-async on之前。 (为了与旧版本兼容,还有一个不推荐使用的别名;请参阅手册。)

  2. 只有在低位启动后才检查-list-target-features

有了这些,我得到:

-list-target-features 
^done,features=["async"] 

这一切似乎晦涩不是有用的地步;但是我认为这是通过这种方式来实现兼容性,因为async在内部是默认的。