svn commit: r352050 - head/sys/gdb

Conrad Meyer cem at FreeBSD.org
Sun Sep 8 22:52:48 UTC 2019


Author: cem
Date: Sun Sep  8 22:52:47 2019
New Revision: 352050
URL: https://svnweb.freebsd.org/changeset/base/352050

Log:
  gdb(4): Root a sysctl tree at 'debug.gdb.'
  
  Like debug.ddb and debug.kdb.  Rename 'debug.gdbcons' to 'debug.gdb.cons,'
  but leave the old name as a compatibility alias.

Modified:
  head/sys/gdb/gdb_cons.c
  head/sys/gdb/gdb_int.h
  head/sys/gdb/gdb_main.c

Modified: head/sys/gdb/gdb_cons.c
==============================================================================
--- head/sys/gdb/gdb_cons.c	Sun Sep  8 21:43:19 2019	(r352049)
+++ head/sys/gdb/gdb_cons.c	Sun Sep  8 22:52:47 2019	(r352050)
@@ -60,8 +60,11 @@ struct gdbcons {
 static struct gdbcons state = { -1 };
 
 static	int gdbcons_enable = 0;
+SYSCTL_INT(_debug_gdb, OID_AUTO, cons, CTLFLAG_RWTUN, &gdbcons_enable, 0,
+	"copy console messages to GDB");
+/* Legacy sysctl alias */
 SYSCTL_INT(_debug, OID_AUTO, gdbcons, CTLFLAG_RWTUN, &gdbcons_enable,
-	    0, "copy console messages to GDB");
+	0, "copy console messages to GDB");
 
 static void
 gdb_cnprobe(struct consdev *cp)

Modified: head/sys/gdb/gdb_int.h
==============================================================================
--- head/sys/gdb/gdb_int.h	Sun Sep  8 21:43:19 2019	(r352049)
+++ head/sys/gdb/gdb_int.h	Sun Sep  8 22:52:47 2019	(r352050)
@@ -31,9 +31,13 @@
 #ifndef _GDB_GDB_INT_H_
 #define	_GDB_GDB_INT_H_
 
+#include <sys/sysctl.h>
+
 #ifndef EOF
 #define EOF	(-1)
 #endif
+
+SYSCTL_DECL(_debug_gdb);
 
 extern struct gdb_dbgport *gdb_cur;
 

Modified: head/sys/gdb/gdb_main.c
==============================================================================
--- head/sys/gdb/gdb_main.c	Sun Sep  8 21:43:19 2019	(r352049)
+++ head/sys/gdb/gdb_main.c	Sun Sep  8 22:52:47 2019	(r352050)
@@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$");
 #include <gdb/gdb.h>
 #include <gdb/gdb_int.h>
 
+SYSCTL_NODE(_debug, OID_AUTO, gdb, CTLFLAG_RW, 0, "GDB settings");
+
 static dbbe_init_f gdb_init;
 static dbbe_trap_f gdb_trap;
 


More information about the svn-src-head mailing list