PERFORCE change 50175 for review
Marcel Moolenaar
marcel at FreeBSD.org
Thu Apr 1 23:47:17 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=50175
Change 50175 by marcel at marcel_nfs on 2004/04/01 23:46:31
Make alpha and sparc64 build again. Need to implement
gdb_cpu_getreg() and gdb_cpu_setreg() in both cases.
Affected files ...
.. //depot/projects/gdb/sys/alpha/alpha/gdb_machdep.c#3 edit
.. //depot/projects/gdb/sys/alpha/include/gdb_machdep.h#2 edit
.. //depot/projects/gdb/sys/sparc64/include/gdb_machdep.h#3 edit
.. //depot/projects/gdb/sys/sparc64/sparc64/gdb_machdep.c#3 edit
Differences ...
==== //depot/projects/gdb/sys/alpha/alpha/gdb_machdep.c#3 (text+ko) ====
@@ -38,44 +38,20 @@
#include <gdb/gdb.h>
-uintmax_t
-gdb_cpu_getreg(int regnum, struct trapframe *tf)
+void *
+gdb_cpu_getreg(int regnum, size_t *regsz)
{
+
+ *regsz = gdb_cpu_regsz(regnum);
switch (regnum) {
- case GDB_REG_FP:
- break;
- case GDB_REG_PC:
- break;
- case GDB_REG_SP:
- break;
}
- return (0);
-}
-
-ssize_t
-gdb_cpu_getregs(struct trapframe *tf, void *buf, size_t bufsz)
-{
- struct reg *r = buf;
-
- if (sizeof(*r) > bufsz)
- return (-1);
- bzero(r, sizeof(*r));
- return (sizeof(*r));
-}
-
-int
-gdb_cpu_regsz(int regnum)
-{
- return (8); /* XXX not really. */
+ return (NULL);
}
void
-gdb_cpu_setreg(int regnum, struct trapframe *tf, uintmax_t val)
+gdb_cpu_setreg(int regnum, register_t val)
{
switch (regnum) {
- case GDB_REG_FP: break;
- case GDB_REG_PC: break;
- case GDB_REG_SP: break;
}
}
@@ -113,13 +89,3 @@
}
return (SIGILL);
}
-
-void
-gdb_cpu_singlestep(int on, struct trapframe *tf)
-{
-}
-
-void
-gdb_cpu_trap(int entry, int code, struct trapframe *tf)
-{
-}
==== //depot/projects/gdb/sys/alpha/include/gdb_machdep.h#2 (text+ko) ====
@@ -30,9 +30,23 @@
#define _MACHINE_GDB_MACHDEP_H_
#define GDB_BUFSZ 600
+#define GDB_NREGS 67
+#define GDB_REG_PC 64
+
+static __inline size_t
+gdb_cpu_regsz(int regnum)
+{
+ return (sizeof(long));
+}
+
+static __inline int
+gdb_cpu_query(void)
+{
+ return (0);
+}
-#define GDB_REG_FP 328
-#define GDB_REG_PC 331
-#define GDB_REG_SP 12
+void *gdb_cpu_getreg(int, size_t *);
+void gdb_cpu_setreg(int, register_t);
+int gdb_cpu_signal(int, int);
#endif /* !_MACHINE_GDB_MACHDEP_H_ */
==== //depot/projects/gdb/sys/sparc64/include/gdb_machdep.h#3 (text+ko) ====
@@ -30,9 +30,28 @@
#define _MACHINE_GDB_MACHDEP_H_
#define GDB_BUFSZ 600
+#define GDB_NREGS 462
+#define GDB_REG_PC 80
-#define GDB_REG_FP 30
-#define GDB_REG_PC 80
-#define GDB_REG_SP 14
+static __inline size_t
+gdb_cpu_regsz(int regnum)
+{
+ return (sizeof(long)); /* XXX not really. */
+}
+
+static __inline int
+gdb_cpu_query(void)
+{
+ return (0);
+}
+
+static __inline int
+gdb_cpu_signal(int vector, int _)
+{
+ return (vector);
+}
+
+void *gdb_cpu_getreg(int, size_t *);
+void gdb_cpu_setreg(int, register_t);
#endif /* !_MACHINE_GDB_MACHDEP_H_ */
==== //depot/projects/gdb/sys/sparc64/sparc64/gdb_machdep.c#3 (text+ko) ====
@@ -38,62 +38,19 @@
#include <gdb/gdb.h>
-uintmax_t
-gdb_cpu_getreg(int regnum, struct trapframe *tf)
+void *
+gdb_cpu_getreg(int regnum, size_t *regsz)
{
+
+ *regsz = gdb_cpu_regsz(regnum);
switch (regnum) {
- case GDB_REG_FP:
- break;
- case GDB_REG_PC:
- break;
- case GDB_REG_SP:
- break;
}
- return (0);
+ return (NULL);
}
-ssize_t
-gdb_cpu_getregs(struct trapframe *tf, void *buf, size_t bufsz)
-{
- struct reg *r = buf;
-
- if (sizeof(*r) > bufsz)
- return (-1);
- bzero(r, sizeof(*r));
- return (sizeof(*r));
-}
-
-int
-gdb_cpu_regsz(int regnum)
-{
- return (8); /* XXX not really. */
-}
-
void
-gdb_cpu_setreg(int regnum, struct trapframe *tf, uintmax_t val)
+gdb_cpu_setreg(int regnum, register_t val)
{
switch (regnum) {
- case GDB_REG_FP: break;
- case GDB_REG_PC: break;
- case GDB_REG_SP: break;
}
}
-
-int
-gdb_cpu_signal(int type, int dummy)
-{
- return (type);
-}
-
-void
-gdb_cpu_singlestep(int on, struct trapframe *tf)
-{
- /* XXX dunno. */
- TF_DONE(tf);
-}
-
-void
-gdb_cpu_trap(int type, int dummy, struct trapframe *tf)
-{
- flushw();
-}
More information about the p4-projects
mailing list