Fix cross-debugger build
This commit is contained in:
parent
92a010d28b
commit
ce9346c8a4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=214962
@ -46,13 +46,16 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <frame-unwind.h>
|
#include <frame-unwind.h>
|
||||||
#include <mips-tdep.h>
|
#include <mips-tdep.h>
|
||||||
|
|
||||||
|
#ifndef CROSS_DEBUGGER
|
||||||
#include <machine/pcb.h>
|
#include <machine/pcb.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "kgdb.h"
|
#include "kgdb.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
kgdb_trgt_fetch_registers(int regno __unused)
|
kgdb_trgt_fetch_registers(int regno __unused)
|
||||||
{
|
{
|
||||||
|
#ifndef CROSS_DEBUGGER
|
||||||
struct kthr *kt;
|
struct kthr *kt;
|
||||||
struct pcb pcb;
|
struct pcb pcb;
|
||||||
|
|
||||||
@ -76,6 +79,7 @@ kgdb_trgt_fetch_registers(int regno __unused)
|
|||||||
supply_register(MIPS_FP_REGNUM, (char *)&pcb.pcb_context[PCB_REG_GP]);
|
supply_register(MIPS_FP_REGNUM, (char *)&pcb.pcb_context[PCB_REG_GP]);
|
||||||
supply_register(MIPS_RA_REGNUM, (char *)&pcb.pcb_context[PCB_REG_RA]);
|
supply_register(MIPS_RA_REGNUM, (char *)&pcb.pcb_context[PCB_REG_RA]);
|
||||||
supply_register(MIPS_EMBED_PC_REGNUM, (char *)&pcb.pcb_context[PCB_REG_PC]);
|
supply_register(MIPS_EMBED_PC_REGNUM, (char *)&pcb.pcb_context[PCB_REG_PC]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -90,6 +94,7 @@ kgdb_trgt_new_objfile(struct objfile *objfile)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CROSS_DEBUGGER
|
||||||
struct kgdb_frame_cache {
|
struct kgdb_frame_cache {
|
||||||
CORE_ADDR pc;
|
CORE_ADDR pc;
|
||||||
CORE_ADDR sp;
|
CORE_ADDR sp;
|
||||||
@ -194,10 +199,12 @@ static const struct frame_unwind kgdb_trgt_trapframe_unwind = {
|
|||||||
&kgdb_trgt_trapframe_this_id,
|
&kgdb_trgt_trapframe_this_id,
|
||||||
&kgdb_trgt_trapframe_prev_register
|
&kgdb_trgt_trapframe_prev_register
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
const struct frame_unwind *
|
const struct frame_unwind *
|
||||||
kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame)
|
kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame)
|
||||||
{
|
{
|
||||||
|
#ifndef CROSS_DEBUGGER
|
||||||
char *pname;
|
char *pname;
|
||||||
CORE_ADDR pc;
|
CORE_ADDR pc;
|
||||||
|
|
||||||
@ -211,5 +218,6 @@ kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame)
|
|||||||
(strcmp(pname, "MipsUserIntr") == 0) ||
|
(strcmp(pname, "MipsUserIntr") == 0) ||
|
||||||
(strcmp(pname, "MipsUserGenException") == 0))
|
(strcmp(pname, "MipsUserGenException") == 0))
|
||||||
return (&kgdb_trgt_trapframe_unwind);
|
return (&kgdb_trgt_trapframe_unwind);
|
||||||
|
#endif
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user