aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-02-16 19:22:21 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-02-16 19:22:21 +0000
commit029f0b69a4c77caa0037a52dce5c370b842eff62 (patch)
treebb6d5745cede1bbea958f1d7e8b1a7f4cea5438f
parent25ef827219530b67159ace39a2c8da901d7ce494 (diff)
Notes
-rw-r--r--sys/alpha/alpha/alpha-gdbstub.c10
-rw-r--r--sys/amd64/amd64/amd64-gdbstub.c10
-rw-r--r--sys/ddb/db_command.c4
-rw-r--r--sys/ddb/ddb.h2
-rw-r--r--sys/dev/sio/sio.c8
-rw-r--r--sys/i386/i386/i386-gdbstub.c10
-rw-r--r--sys/pc98/cbus/sio.c8
-rw-r--r--sys/pc98/pc98/sio.c8
8 files changed, 30 insertions, 30 deletions
diff --git a/sys/alpha/alpha/alpha-gdbstub.c b/sys/alpha/alpha/alpha-gdbstub.c
index f011ed7d36a0..9e3dedb4e1e7 100644
--- a/sys/alpha/alpha/alpha-gdbstub.c
+++ b/sys/alpha/alpha/alpha-gdbstub.c
@@ -153,18 +153,18 @@ strcpy (char *dst, const char *src)
static int
putDebugChar (int c) /* write a single character */
{
- if (gdbdev == NODEV)
+ if (gdb_arg == NULL)
return 0;
- (*gdb_putc)(gdbdev, c);
+ (*gdb_putc)(gdb_arg, c);
return 1;
}
static int
getDebugChar (void) /* read and return a single char */
{
- if (gdbdev == NODEV)
+ if (gdb_arg == NULL)
return -1;
- return (*gdb_getc)(gdbdev);
+ return (*gdb_getc)(gdb_arg);
}
static const char hexchars[]="0123456789abcdef";
@@ -625,7 +625,7 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
while (1)
{
- if (gdbdev == NODEV) /* somebody's removed it */
+ if (gdb_arg == NULL) /* somebody's removed it */
return; /* get out of here */
remcomOutBuffer[0] = 0;
diff --git a/sys/amd64/amd64/amd64-gdbstub.c b/sys/amd64/amd64/amd64-gdbstub.c
index fd283bd96f9a..0ea0a24c6740 100644
--- a/sys/amd64/amd64/amd64-gdbstub.c
+++ b/sys/amd64/amd64/amd64-gdbstub.c
@@ -146,18 +146,18 @@ strcpy (char *dst, const char *src)
static int
putDebugChar (int c) /* write a single character */
{
- if (gdbdev == NODEV)
+ if (gdb_arg == NULL)
return 0;
- (*gdb_putc)(gdbdev, c);
+ (*gdb_putc)(gdb_arg, c);
return 1;
}
static int
getDebugChar (void) /* read and return a single char */
{
- if (gdbdev == NODEV)
+ if (gdb_arg == NULL)
return -1;
- return (*gdb_getc)(gdbdev);
+ return (*gdb_getc)(gdb_arg);
}
static const char hexchars[]="0123456789abcdef";
@@ -487,7 +487,7 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
while (1)
{
- if (gdbdev == NODEV)
+ if (gdb_arg == NULL)
return 1; /* somebody has removed the gdb device */
remcomOutBuffer[0] = 0;
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index f0aa6d2ad01c..ab58bc2feeda 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -550,7 +550,7 @@ db_fncall(dummy1, dummy2, dummy3, dummy4)
/* Enter GDB remote protocol debugger on the next trap. */
-dev_t gdbdev = NODEV;
+void *gdb_arg = NULL;
cn_getc_t *gdb_getc;
cn_putc_t *gdb_putc;
@@ -562,7 +562,7 @@ db_gdb (dummy1, dummy2, dummy3, dummy4)
char * dummy4;
{
- if (gdbdev == NODEV) {
+ if (gdb_arg == NULL) {
db_printf("No gdb port enabled. Set flag 0x80 on desired port\n");
db_printf("in your configuration file (currently sio only).\n");
return;
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
index 3124c6e8f393..7259e97b6637 100644
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -161,7 +161,7 @@ struct command {
/*
* Routines to support GDB on an sio port.
*/
-extern dev_t gdbdev;
+extern void *gdb_arg;
extern cn_getc_t *gdb_getc;
extern cn_putc_t *gdb_putc;
#endif
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 1ca84d45dae7..7efb6689ab1b 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -2982,7 +2982,7 @@ siocnprobe(cp)
siogdbiobase = iobase;
siogdbunit = unit;
#if DDB > 0
- gdbdev = makedev(CDEV_MAJOR, unit);
+ gdb_arg = makedev(CDEV_MAJOR, unit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif
@@ -2996,14 +2996,14 @@ siocnprobe(cp)
* If no gdb port has been specified, set it to be the console
* as some configuration files don't specify the gdb port.
*/
- if (gdbdev == NODEV && (boothowto & RB_GDB)) {
+ if (gdb_arg == NULL && (boothowto & RB_GDB)) {
printf("Warning: no GDB port specified. Defaulting to sio%d.\n",
siocnunit);
printf("Set flag 0x80 on desired GDB port in your\n");
printf("configuration file (currently sio only).\n");
siogdbiobase = siocniobase;
siogdbunit = siocnunit;
- gdbdev = makedev(CDEV_MAJOR, siocnunit);
+ gdb_arg = makedev(CDEV_MAJOR, siocnunit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
}
@@ -3090,7 +3090,7 @@ siogdbattach(port, speed)
printf("sio%d: gdb debugging port\n", unit);
siogdbunit = unit;
#if DDB > 0
- gdbdev = makedev(CDEV_MAJOR, unit);
+ gdb_arg = makedev(CDEV_MAJOR, unit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif
diff --git a/sys/i386/i386/i386-gdbstub.c b/sys/i386/i386/i386-gdbstub.c
index fd283bd96f9a..0ea0a24c6740 100644
--- a/sys/i386/i386/i386-gdbstub.c
+++ b/sys/i386/i386/i386-gdbstub.c
@@ -146,18 +146,18 @@ strcpy (char *dst, const char *src)
static int
putDebugChar (int c) /* write a single character */
{
- if (gdbdev == NODEV)
+ if (gdb_arg == NULL)
return 0;
- (*gdb_putc)(gdbdev, c);
+ (*gdb_putc)(gdb_arg, c);
return 1;
}
static int
getDebugChar (void) /* read and return a single char */
{
- if (gdbdev == NODEV)
+ if (gdb_arg == NULL)
return -1;
- return (*gdb_getc)(gdbdev);
+ return (*gdb_getc)(gdb_arg);
}
static const char hexchars[]="0123456789abcdef";
@@ -487,7 +487,7 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
while (1)
{
- if (gdbdev == NODEV)
+ if (gdb_arg == NULL)
return 1; /* somebody has removed the gdb device */
remcomOutBuffer[0] = 0;
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 675e22d34932..7d497dbca944 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -4212,7 +4212,7 @@ siocnprobe(cp)
siogdbiobase = iobase;
siogdbunit = unit;
#if DDB > 0
- gdbdev = makedev(CDEV_MAJOR, unit);
+ gdb_arg = makedev(CDEV_MAJOR, unit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif
@@ -4226,14 +4226,14 @@ siocnprobe(cp)
* If no gdb port has been specified, set it to be the console
* as some configuration files don't specify the gdb port.
*/
- if (gdbdev == NODEV && (boothowto & RB_GDB)) {
+ if (gdb_arg == NULL && (boothowto & RB_GDB)) {
printf("Warning: no GDB port specified. Defaulting to sio%d.\n",
siocnunit);
printf("Set flag 0x80 on desired GDB port in your\n");
printf("configuration file (currently sio only).\n");
siogdbiobase = siocniobase;
siogdbunit = siocnunit;
- gdbdev = makedev(CDEV_MAJOR, siocnunit);
+ gdb_arg = makedev(CDEV_MAJOR, siocnunit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
}
@@ -4320,7 +4320,7 @@ siogdbattach(port, speed)
printf("sio%d: gdb debugging port\n", unit);
siogdbunit = unit;
#if DDB > 0
- gdbdev = makedev(CDEV_MAJOR, unit);
+ gdb_arg = makedev(CDEV_MAJOR, unit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif
diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c
index 675e22d34932..7d497dbca944 100644
--- a/sys/pc98/pc98/sio.c
+++ b/sys/pc98/pc98/sio.c
@@ -4212,7 +4212,7 @@ siocnprobe(cp)
siogdbiobase = iobase;
siogdbunit = unit;
#if DDB > 0
- gdbdev = makedev(CDEV_MAJOR, unit);
+ gdb_arg = makedev(CDEV_MAJOR, unit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif
@@ -4226,14 +4226,14 @@ siocnprobe(cp)
* If no gdb port has been specified, set it to be the console
* as some configuration files don't specify the gdb port.
*/
- if (gdbdev == NODEV && (boothowto & RB_GDB)) {
+ if (gdb_arg == NULL && (boothowto & RB_GDB)) {
printf("Warning: no GDB port specified. Defaulting to sio%d.\n",
siocnunit);
printf("Set flag 0x80 on desired GDB port in your\n");
printf("configuration file (currently sio only).\n");
siogdbiobase = siocniobase;
siogdbunit = siocnunit;
- gdbdev = makedev(CDEV_MAJOR, siocnunit);
+ gdb_arg = makedev(CDEV_MAJOR, siocnunit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
}
@@ -4320,7 +4320,7 @@ siogdbattach(port, speed)
printf("sio%d: gdb debugging port\n", unit);
siogdbunit = unit;
#if DDB > 0
- gdbdev = makedev(CDEV_MAJOR, unit);
+ gdb_arg = makedev(CDEV_MAJOR, unit);
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif