PERFORCE change 49359 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sat Mar 20 01:07:50 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=49359
Change 49359 by marcel at marcel_nfs on 2004/03/20 01:07:46
o Add skeletal support for alpha and sparc64.
o Make the RX/TX buffer size MD. On ia64 we need 4K buffers.
o In gdb_init() return -1 when there are no debug ports and
return with a higher priority if RB_GDB is in effect.
o In uart_dbg_probe() return -1 on failure.
Affected files ...
.. //depot/projects/gdb/sys/alpha/alpha/alpha-gdbstub.c#2 delete
.. //depot/projects/gdb/sys/alpha/alpha/gdb_machdep.c#1 add
.. //depot/projects/gdb/sys/alpha/include/gdb_machdep.h#1 add
.. //depot/projects/gdb/sys/conf/files.alpha#3 edit
.. //depot/projects/gdb/sys/conf/files.sparc64#2 edit
.. //depot/projects/gdb/sys/dev/uart/uart_cpu_sparc64.c#5 edit
.. //depot/projects/gdb/sys/dev/uart/uart_dbg.c#3 edit
.. //depot/projects/gdb/sys/gdb/gdb_int.h#3 edit
.. //depot/projects/gdb/sys/gdb/gdb_main.c#5 edit
.. //depot/projects/gdb/sys/gdb/gdb_packet.c#3 edit
.. //depot/projects/gdb/sys/i386/include/gdb_machdep.h#2 edit
.. //depot/projects/gdb/sys/ia64/ia64/gdb_machdep.c#2 edit
.. //depot/projects/gdb/sys/ia64/include/gdb_machdep.h#2 edit
.. //depot/projects/gdb/sys/sparc64/include/gdb_machdep.h#1 add
.. //depot/projects/gdb/sys/sparc64/sparc64/gdb_machdep.c#1 add
Differences ...
==== //depot/projects/gdb/sys/conf/files.alpha#3 (text+ko) ====
@@ -35,7 +35,6 @@
no-obj no-implicit-rule before-depend \
clean "ukbdmap.h"
#
-alpha/alpha/alpha-gdbstub.c optional gdb
alpha/alpha/api_up1000.c optional api_up1000
alpha/alpha/atomic.s standard
alpha/alpha/autoconf.c standard
@@ -67,6 +66,7 @@
alpha/alpha/exception.s standard
alpha/alpha/fp_emulate.c standard
alpha/alpha/ieee_float.c standard
+alpha/alpha/gdb_machdep.c optional gdb
alpha/alpha/in_cksum.c optional inet
alpha/alpha/interrupt.c standard
alpha/alpha/locore.s standard no-obj
==== //depot/projects/gdb/sys/conf/files.sparc64#2 (text+ko) ====
@@ -78,6 +78,7 @@
sparc64/sparc64/eeprom_ebus.c optional eeprom ebus
sparc64/sparc64/eeprom_fhc.c optional eeprom fhc
sparc64/sparc64/eeprom_sbus.c optional eeprom sbus
+sparc64/sparc64/gdb_machdep.c optional gdb
sparc64/sparc64/identcpu.c standard
sparc64/sparc64/in_cksum.c optional inet
sparc64/sparc64/interrupt.S standard no-obj
==== //depot/projects/gdb/sys/dev/uart/uart_cpu_sparc64.c#5 (text+ko) ====
@@ -123,7 +123,7 @@
return (-1);
/* Rudimentary sanity check: the debug port cannot be the console. */
if (OF_getprop(options, "input-device", buf, sizeof(buf)) == -1)
- return (-1);
+ return (input);
if (OF_finddevice(buf) == input)
return (-1);
return (input);
==== //depot/projects/gdb/sys/dev/uart/uart_dbg.c#3 (text+ko) ====
@@ -55,12 +55,12 @@
{
if (uart_cpu_getdev(UART_DEV_DBGPORT, &uart_dbgport))
- return (0);
+ return (-1);
if (uart_probe(&uart_dbgport))
- return (0);
+ return (-1);
- return (1);
+ return (0);
}
static void
==== //depot/projects/gdb/sys/gdb/gdb_int.h#3 (text+ko) ====
@@ -29,10 +29,6 @@
#ifndef _GDB_GDB_INT_H_
#define _GDB_GDB_INT_H_
-#ifndef GDB_BUFSZ
-#define GDB_BUFSZ 400
-#endif
-
extern struct gdb_dbgport *gdb_cur;
extern char *gdb_rxp;
==== //depot/projects/gdb/sys/gdb/gdb_main.c#5 (text+ko) ====
@@ -33,6 +33,7 @@
#include <sys/kernel.h>
#include <sys/pcpu.h>
#include <sys/proc.h>
+#include <sys/reboot.h>
#include <machine/gdb_machdep.h>
@@ -80,7 +81,11 @@
gdb_cur->gdb_init();
printf("GDB: current port: %s\n", gdb_cur->gdb_name);
}
- return ((gdb_cur != NULL) ? 1 : 0);
+ if (gdb_cur != NULL)
+ cur_pri = (boothowto & RB_GDB) ? 2 : 0;
+ else
+ cur_pri = -1;
+ return (cur_pri);
}
static int
==== //depot/projects/gdb/sys/gdb/gdb_packet.c#3 (text+ko) ====
@@ -31,6 +31,8 @@
#include <sys/systm.h>
#include <sys/ctype.h>
+#include <machine/gdb_machdep.h>
+
#include <gdb/gdb.h>
#include <gdb/gdb_int.h>
==== //depot/projects/gdb/sys/i386/include/gdb_machdep.h#2 (text+ko) ====
@@ -29,6 +29,8 @@
#ifndef _MACHINE_GDB_MACHDEP_H_
#define _MACHINE_GDB_MACHDEP_H_
+#define GDB_BUFSZ 400
+
#define GDB_REG_FP 5
#define GDB_REG_PC 8
#define GDB_REG_SP 4
==== //depot/projects/gdb/sys/ia64/ia64/gdb_machdep.c#2 (text+ko) ====
@@ -59,6 +59,9 @@
if (sizeof(*r) > bufsz)
return (-1);
+ r->r_special = tf->tf_special;
+ r->r_scratch = tf->tf_scratch;
+ bzero(&r->r_preserved, sizeof(r->r_preserved));
return (sizeof(*r));
}
==== //depot/projects/gdb/sys/ia64/include/gdb_machdep.h#2 (text+ko) ====
@@ -29,6 +29,8 @@
#ifndef _MACHINE_GDB_MACHDEP_H_
#define _MACHINE_GDB_MACHDEP_H_
+#define GDB_BUFSZ 4096
+
#define GDB_REG_FP 328
#define GDB_REG_PC 331
#define GDB_REG_SP 12
More information about the p4-projects
mailing list