ヘルプ、どうすればこの問題を解決できますか? stdinからgdbにコマンドをリダイレクトできません。gdbパイプリダイレクトエラー:(gdb)fdでハングアップが検出された0
は、私はこのエラーを取得する:
[email protected]:~/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
私の目標は、上記のエラーを修正することです。私は、私のJavaプログラムとgdbの間にいくつかの配管をしています。私はそれに固執しています。 – Chinwei
この例の問題は、stdinを閉じることです。パイプを開いたままにしておくことができれば、gdbはうれしいでしょう。たとえば、(これはひどいハックです)、 "tail -f input-file | gdb"を実行して、javeプログラムをinput-fileに書き込ませることができます。 –
Yey!私は私のJavaプログラムとgdbの間でパイプを走らせることができました。 プロセスp = Runtime.getRuntime()。exec( "gdb a.out --interpreter = console"); – Chinwei