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.
This commit is contained in:
Conrad Meyer 2019-09-08 22:52:47 +00:00
parent d1bc2d79f2
commit 10f6c05ce7
3 changed files with 10 additions and 1 deletions

View File

@ -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)

View File

@ -31,10 +31,14 @@
#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;
extern int gdb_listening;

View File

@ -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;