svn commit: r204138 - in head: contrib/gdb/gdb gnu/usr.bin
gnu/usr.bin/gdb/arch/mips gnu/usr.bin/gdb/kgdb
Randall Stewart
rrs at FreeBSD.org
Sat Feb 20 17:29:28 UTC 2010
Author: rrs
Date: Sat Feb 20 17:29:27 2010
New Revision: 204138
URL: http://svn.freebsd.org/changeset/base/204138
Log:
These contain JC's patch to get gdb sort of working
on mips. Its not fully done yet but its a start.
Obtained from: JC - c.jayachandran at gmail.com
M gnu/usr.bin/gdb/kgdb/trgt_mips.c
M gnu/usr.bin/gdb/arch/mips/init.c
M gnu/usr.bin/gdb/arch/mips/Makefile
M gnu/usr.bin/Makefile
M contrib/gdb/gdb/mips-tdep.h
Modified:
head/contrib/gdb/gdb/mips-tdep.h
head/gnu/usr.bin/Makefile
head/gnu/usr.bin/gdb/arch/mips/Makefile
head/gnu/usr.bin/gdb/arch/mips/init.c
head/gnu/usr.bin/gdb/kgdb/trgt_mips.c
Modified: head/contrib/gdb/gdb/mips-tdep.h
==============================================================================
--- head/contrib/gdb/gdb/mips-tdep.h Sat Feb 20 17:24:33 2010 (r204137)
+++ head/contrib/gdb/gdb/mips-tdep.h Sat Feb 20 17:29:27 2010 (r204138)
@@ -62,6 +62,17 @@ struct mips_regnum
extern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch);
enum {
+ MIPS_S0_REGNUM = 16,
+ MIPS_S1_REGNUM = 17,
+ MIPS_S2_REGNUM = 18,
+ MIPS_S3_REGNUM = 19,
+ MIPS_S4_REGNUM = 20,
+ MIPS_S5_REGNUM = 21,
+ MIPS_S6_REGNUM = 22,
+ MIPS_S7_REGNUM = 23,
+ MIPS_SP_REGNUM = 29,
+ MIPS_FP_REGNUM = 30,
+ MIPS_RA_REGNUM = 31,
MIPS_EMBED_LO_REGNUM = 33,
MIPS_EMBED_HI_REGNUM = 34,
MIPS_EMBED_BADVADDR_REGNUM = 35,
Modified: head/gnu/usr.bin/Makefile
==============================================================================
--- head/gnu/usr.bin/Makefile Sat Feb 20 17:24:33 2010 (r204137)
+++ head/gnu/usr.bin/Makefile Sat Feb 20 17:29:27 2010 (r204138)
@@ -21,10 +21,6 @@ SUBDIR= ${_binutils} \
sort \
${_texinfo}
-.if ${MACHINE_ARCH} == "mips"
-MK_GDB=no # not yet
-.endif
-
.if ${MK_CXX} != "no"
_gperf= gperf
.if ${MK_GROFF} != "no"
Modified: head/gnu/usr.bin/gdb/arch/mips/Makefile
==============================================================================
--- head/gnu/usr.bin/gdb/arch/mips/Makefile Sat Feb 20 17:24:33 2010 (r204137)
+++ head/gnu/usr.bin/gdb/arch/mips/Makefile Sat Feb 20 17:29:27 2010 (r204138)
@@ -1,10 +1,10 @@
# $FreeBSD$
.if !defined(GDB_CROSS_DEBUGGER)
-LIBSRCS+= mips-nat.c mips-nat.c mipsfbsd-nat.c
+LIBSRCS+= mipsfbsd-nat.c
.endif
LIBSRCS+= solib.c solib-svr4.c
-LIBSRCS+= mips-tdep.c mipsfbsd-tdep.c
+LIBSRCS+= mips-tdep.c mipsfbsd-tdep.c fbsd-proc.c
nm.h:
echo '#include "mips/nm-fbsd.h"' > ${.TARGET}
Modified: head/gnu/usr.bin/gdb/arch/mips/init.c
==============================================================================
--- head/gnu/usr.bin/gdb/arch/mips/init.c Sat Feb 20 17:24:33 2010 (r204137)
+++ head/gnu/usr.bin/gdb/arch/mips/init.c Sat Feb 20 17:29:27 2010 (r204138)
@@ -123,15 +123,19 @@ initialize_all_files (void)
_initialize_ser_pipe ();
_initialize_ser_tcp ();
#ifndef CROSS_DEBUGGER
+#if 0
_initialize_mipsfbsd_nat ();
_initialize_mips_nat ();
+#endif
_initialize_kernel_u_addr ();
_initialize_infptrace ();
_initialize_inftarg ();
_initialize_solib ();
_initialize_svr4_solib ();
+#if 0
_initialize_svr4_lm ();
#endif
+#endif
_initialize_remote ();
_initialize_dcache ();
_initialize_sr_support ();
Modified: head/gnu/usr.bin/gdb/kgdb/trgt_mips.c
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Sat Feb 20 17:24:33 2010 (r204137)
+++ head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Sat Feb 20 17:29:27 2010 (r204138)
@@ -61,18 +61,17 @@ kgdb_trgt_fetch_registers(int regno __un
warnx("kvm_read: %s", kvm_geterr(kvm));
memset(&pcb, 0, sizeof(pcb));
}
- supply_register(MIPS_S0_REGNUM, (char *)&pcb.pcb_context.val[0]);
- supply_register(MIPS_S1_REGNUM, (char *)&pcb.pcb_context.val[1]);
- supply_register(MIPS_S2_REGNUM, (char *)&pcb.pcb_context.val[2]);
- supply_register(MIPS_S3_REGNUM, (char *)&pcb.pcb_context.val[3]);
- supply_register(MIPS_S4_REGNUM, (char *)&pcb.pcb_context.val[4]);
- supply_register(MIPS_S5_REGNUM, (char *)&pcb.pcb_context.val[5]);
- supply_register(MIPS_S6_REGNUM, (char *)&pcb.pcb_context.val[6]);
- supply_register(MIPS_S7_REGNUM, (char *)&pcb.pcb_context.val[7]);
- supply_register(MIPS_SP_REGNUM, (char *)&pcb.pcb_context.val[8]);
- supply_register(MIPS_SP_REGNUM, (char *)&pcb.pcb_context.val[8]);
- supply_register(MIPS_FP_REGNUM, (char *)&pcb.pcb_context.val[9]);
- supply_register(MIPS_RA_REGNUM, (char *)&pcb.pcb_context.val[10]);
+ supply_register(MIPS_S0_REGNUM, (char *)&pcb.pcb_context[0]);
+ supply_register(MIPS_S1_REGNUM, (char *)&pcb.pcb_context[1]);
+ supply_register(MIPS_S2_REGNUM, (char *)&pcb.pcb_context[2]);
+ supply_register(MIPS_S3_REGNUM, (char *)&pcb.pcb_context[3]);
+ supply_register(MIPS_S4_REGNUM, (char *)&pcb.pcb_context[4]);
+ supply_register(MIPS_S5_REGNUM, (char *)&pcb.pcb_context[5]);
+ supply_register(MIPS_S6_REGNUM, (char *)&pcb.pcb_context[6]);
+ supply_register(MIPS_S7_REGNUM, (char *)&pcb.pcb_context[7]);
+ supply_register(MIPS_SP_REGNUM, (char *)&pcb.pcb_context[8]);
+ supply_register(MIPS_FP_REGNUM, (char *)&pcb.pcb_context[9]);
+ supply_register(MIPS_RA_REGNUM, (char *)&pcb.pcb_context[10]);
}
void
More information about the svn-src-all
mailing list