我如何通过gdbserver会话来访问STDIN / STDOUT [英] How can I reach STDIN/STDOUT through a gdbserver session
问题描述
如果我开始一个普通的'gdb'会话,那么我可以直接在 STDIN
中看到 STDOUT
终端:
$ gdb wc
GNU gdb(Gentoo 7.10.1 vanilla)7.10.1
。 ..
gdb>运行
启动程序:/ usr / bin / wc
asdf
1 1 5
[低于1(进程28131)退出正常]
gdb>退出
$
我可以使用gdbserver吗?
下面是我尝试过的(gdbserver):
$ p $ $ gdbserver / dev / ttyS0 wc
已创建流程wc; pid = 28156
在端口2345上收听
和客户端:
$ gdb
GNU gdb(Gentoo 7.10.1 vanilla)7.10.1
...
gdb> c
继续。
编程接收到的信号SIGINT,中断。
0x00007ffff7ddbc40 in _start()from target:/lib64/ld-linux-x86-64.so.2
gdb>
但是,好像 STDIN
/ STDOUT
在使用gdbserver时未连接。
如何在串行线路上运行远程调试,还可以通过同一个串行线调试应用程序的 您需要使用屏幕或 tmux 通过单一串行线路复用 If I start a normal 'gdb' session, then I can reach Can I do the same with a gdbserver??? Here is what I have tried (gdbserver): and client: But, it seems like How can I run remote debugging over the serial line, and also access How can I run remote debugging over the serial line, and also access STDIN/STDOUT of the application that I'm debugging over the same serial line?? You'll need to use screen or tmux to multiplex 这篇关于我如何通过gdbserver会话来访问STDIN / STDOUT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! STDIN
/ STDOUT
如何在串行线上运行远程调试,以及如何访问STDIN /文件系统中的STDIN /我正在通过同一个串行线调试应用程序的STDOUT?
gdb< - > gdbserver< / code>和键盘 - >应用程序通信。
STDIN
and see STDOUT
directly in the terminal:$ gdb wc
GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1
...
gdb> run
Starting program: /usr/bin/wc
asdf
1 1 5
[Inferior 1 (process 28131) exited normally]
gdb> quit
$
$ gdbserver /dev/ttyS0 wc
Process wc created; pid = 28156
Listening on port 2345
$ gdb
GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1
...
gdb> c
Continuing.
Program received signal SIGINT, Interrupt.
0x00007ffff7ddbc40 in _start () from target:/lib64/ld-linux-x86-64.so.2
gdb>
STDIN
/STDOUT
is not being connected when using the gdbserver.STDIN
/STDOUT
of the application that I'm debugging over the same serial line??
gdb<->gdbserver
and keyboard->application traffic over a single serial line.