GDBFS(4)GDBFS(4)
NAME
gdbfs – GNU debugger file system
SYNOPSIS
gdbfs
[
-Dd
]
[
-s
srvname
]
[
-m
arch
]
[
-p
pid
]
[
-t
text
]
[
addr
]
DESCRIPTION
Gdbfs
presents a set of
proc(3)
files under
/proc/pid
(default 1) for debugging a remote process through the GNU debugger stub listening at
addr,
or connected to standard input/output if
addr
is not provided.
If a network or port is not specified,
tcp!addr!1234
is used.
The
-s
option tells
gdbfs
to post its channel at
/srv/srvname
(see
srv(3)),
allowing the session to be shared or reattached later.
The -D and -d options log 9P and gdbserver messages, respectively, to standard error.
Text,
if provided, should be a copy of the binary running on the target, in
a.out(6)
format.
It will be used to determine the architecture of the running target, and served at
/proc/pid/text.
If
text
is not provided, the target architecture must be specified with the
-m
flag.
EXAMPLES
On drawterm, use the host unix network stack to connect to the gdbserver listening at
localhost:1234,
which is a hypervisor running a a 9pc64 guest VM:
bind /mnt/term/net /net
gdbfs -t /amd64/9pc64 localhost
acid -l kernel 1
Connect to gdbserver over a serial interface to debug an arm system:
gdbfs -m arm <>/dev/eia0
BUGS
Gdbfs does not consistently respond to or emit retransmit requests (character ’-’).
Use a reliable transport such as TCP or a pipe for best results.
Stubs which emit more than one reply per request may cause gdbfs to become stuck.
SOURCE
/sys/src/cmd/gdbfs
SEE ALSO
acid(1),
db(1),
rdbfs(4)