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 deter-
          mine the architecture of the running target, and served at
          /proc/pid/text.  If text is not provided, the target archi-
          tecture 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 hyper-
          visor 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

     Page 1                       Plan 9            (printed 10/25/26)

     GDBFS(4)                                                 GDBFS(4)

     SEE ALSO
          acid(1), db(1), rdbfs(4)

     Page 2                       Plan 9            (printed 10/25/26)