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@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
This commit is contained in:
Randall Stewart 2010-02-20 17:29:27 +00:00
parent 7198148c8e
commit 7e1f32462d
5 changed files with 28 additions and 18 deletions

View File

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

View File

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

View File

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

View File

@ -123,14 +123,18 @@ 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 ();

View File

@ -61,18 +61,17 @@ kgdb_trgt_fetch_registers(int regno __unused)
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