aboutsummaryrefslogtreecommitdiff
path: root/sys/conf
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-10-17 21:33:01 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-10-17 21:33:01 +0000
commitdda17b3672f2c7f661699a69ea4462710a52480d (patch)
treefbc063b744e51a6513553568dd2481e81ebcf50b /sys/conf
parent092bacb2c4277cb9aae662f82ceeb4fabfdd818a (diff)
downloadsrc-dda17b3672f2c7f661699a69ea4462710a52480d.tar.gz
src-dda17b3672f2c7f661699a69ea4462710a52480d.zip
Implement NetGDB(4)
NetGDB(4) is a component of a system using a panic-time network stack to remotely debug crashed FreeBSD kernels over the network, instead of traditional serial interfaces. There are three pieces in the complete NetGDB system. First, a dedicated proxy server must be running to accept connections from both NetGDB and gdb(1), and pass bidirectional traffic between the two protocols. Second, the NetGDB client is activated much like ordinary 'gdb' and similarly to 'netdump' in ddb(4) after a panic. Like other debugnet(4) clients (netdump(4)), the network interface on the route to the proxy server must be online and support debugnet(4). Finally, the remote (k)gdb(1) uses 'target remote <proxy>:<port>' (like any other TCP remote) to connect to the proxy server. The NetGDB v1 protocol speaks the literal GDB remote serial protocol, and uses a 1:1 relationship between GDB packets and sequences of debugnet packets (fragmented by MTU). There is no encryption utilized to keep debugging sessions private, so this is only appropriate for local segments or trusted networks. Submitted by: John Reimer <john.reimer AT emc.com> (earlier version) Discussed some with: emaste, markj Relnotes: sure Differential Revision: https://reviews.freebsd.org/D21568
Notes
Notes: svn path=/head/; revision=353700
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/NOTES10
-rw-r--r--sys/conf/files1
-rw-r--r--sys/conf/options6
3 files changed, 12 insertions, 5 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 7892a2391bc8..002d809eae5d 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -1038,13 +1038,17 @@ options TCP_SIGNATURE #include support for RFC 2385
# a smooth scheduling of the traffic.
options DUMMYNET
+# The DEBUGNET option enables a basic debug/panic-time networking API. It
+# is used by NETDUMP and NETGDB.
+options DEBUGNET
+
# The NETDUMP option enables netdump(4) client support in the kernel.
# This allows a panicking kernel to transmit a kernel dump to a remote host.
options NETDUMP
-# The DEBUGNET option enables a basic debug/panic-time networking API. It
-# is used by NETDUMP.
-options DEBUGNET
+# The NETGDB option enables netgdb(4) support in the kernel. This allows a
+# panicking kernel to be debugged as a GDB remote over the network.
+options NETGDB
#####################################################################
# FILESYSTEM OPTIONS
diff --git a/sys/conf/files b/sys/conf/files
index d910a1f0ce17..e47fe27466cf 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -3546,6 +3546,7 @@ fs/tmpfs/tmpfs_subr.c optional tmpfs
gdb/gdb_cons.c optional gdb
gdb/gdb_main.c optional gdb
gdb/gdb_packet.c optional gdb
+gdb/netgdb.c optional ddb debugnet gdb netgdb inet
geom/bde/g_bde.c optional geom_bde
geom/bde/g_bde_crypt.c optional geom_bde
geom/bde/g_bde_lock.c optional geom_bde
diff --git a/sys/conf/options b/sys/conf/options
index d9ea0a821cb3..0600bf52203b 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -319,10 +319,12 @@ NFS_ROOT opt_nfsroot.h
# SMB/CIFS requester
NETSMB opt_netsmb.h
-# Enable netdump(4) client support.
-NETDUMP opt_global.h
# Enable debugnet(4) networking support.
DEBUGNET opt_global.h
+# Enable netdump(4) client support.
+NETDUMP opt_global.h
+# Enable netgdb(4) support.
+NETGDB opt_global.h
# Options used only in subr_param.c.
HZ opt_param.h