gpt4 book ai didi

linux - gdb 管道重定向错误 : (gdb) Hangup detected on fd 0

转载 作者:太空狗 更新时间:2023-10-29 12:21:07 27 4
gpt4 key购买 nike

求助,我该如何解决?我无法将命令从 stdin 重定向到 gdb。

我收到这个错误:

charmae@charmae-pc:~/workspace/AVT$ echo "list" | gdb a.out
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/charmae/workspace/AVT/a.out...done.
(gdb) Hangup detected on fd 0
error detected on stdin

最佳答案

另一种很好用的技术是使用 here-document 将输入重定向到 gdb:

gdb -quiet -nx << EndOfInput
thread apply all bt
quit
EndOfInput

这使得无需使用临时文件即可编写控制 gdb 的脚本成为可能。它似乎完全避免了“检测到挂断”消息。

关于linux - gdb 管道重定向错误 : (gdb) Hangup detected on fd 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8121823/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com