sim: delete old breakpoint code
This code relies on the old sim-break module, but that was deleted in 2003. The module only existed for gdb to tell the sim to set breakpoints on its behalf, but then that logic was abandoned in favor of gdb knowing all about proper breakpoints (since it does already for non-sim targets). Some dead code lived on in the older ports though -- clean it up now.
This commit is contained in:
parent
bd3fb5b8fb
commit
cec1974488
11 changed files with 26 additions and 83 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* tconfig.h (SIM_HAVE_BREAKPOINTS, SIM_BREAKPOINT,
|
||||||
|
SIM_BREAKPOINT_SIZE): Delete.
|
||||||
|
* traps.c [SIM_HAVE_BREAKPOINTS] (frv_itrap): Delete sim breakpoint
|
||||||
|
code.
|
||||||
|
[SIM_HAVE_BREAKPOINTS] (frv_break): Likewise.
|
||||||
|
|
||||||
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* tconfig.h (WITH_WATCHPOINTS): Delete.
|
* tconfig.h (WITH_WATCHPOINTS): Delete.
|
||||||
|
|
|
@ -9,15 +9,6 @@
|
||||||
/* ??? Temporary hack until model support unified. */
|
/* ??? Temporary hack until model support unified. */
|
||||||
#define SIM_HAVE_MODEL
|
#define SIM_HAVE_MODEL
|
||||||
|
|
||||||
/* Define this to enable the intrinsic breakpoint mechanism. */
|
|
||||||
/* FIXME: may be able to remove SIM_HAVE_BREAKPOINTS since it essentially
|
|
||||||
duplicates ifdef SIM_BREAKPOINT (right?) */
|
|
||||||
#if 0
|
|
||||||
#define SIM_HAVE_BREAKPOINTS
|
|
||||||
#define SIM_BREAKPOINT { 0x10, 0xf1 }
|
|
||||||
#define SIM_BREAKPOINT_SIZE 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
||||||
and -pbb. However some cpu families may use -simple while others use
|
and -pbb. However some cpu families may use -simple while others use
|
||||||
one of -scache/-pbb. ???? */
|
one of -scache/-pbb. ???? */
|
||||||
|
|
|
@ -110,18 +110,6 @@ frv_itrap (SIM_CPU *current_cpu, PCADDR pc, USI base, SI offset)
|
||||||
host_callback *cb = STATE_CALLBACK (sd);
|
host_callback *cb = STATE_CALLBACK (sd);
|
||||||
USI num = ((base + offset) & 0x7f) + 0x80;
|
USI num = ((base + offset) & 0x7f) + 0x80;
|
||||||
|
|
||||||
#ifdef SIM_HAVE_BREAKPOINTS
|
|
||||||
/* Check for breakpoints "owned" by the simulator first, regardless
|
|
||||||
of --environment. */
|
|
||||||
if (num == TRAP_BREAKPOINT)
|
|
||||||
{
|
|
||||||
/* First try sim-break.c. If it's a breakpoint the simulator "owns"
|
|
||||||
it doesn't return. Otherwise it returns and let's us try. */
|
|
||||||
sim_handle_breakpoint (sd, current_cpu, pc);
|
|
||||||
/* Fall through. */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
|
if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
|
||||||
{
|
{
|
||||||
frv_queue_software_interrupt (current_cpu, num);
|
frv_queue_software_interrupt (current_cpu, num);
|
||||||
|
@ -293,21 +281,10 @@ frv_break (SIM_CPU *current_cpu)
|
||||||
IADDR pc;
|
IADDR pc;
|
||||||
SIM_DESC sd = CPU_STATE (current_cpu);
|
SIM_DESC sd = CPU_STATE (current_cpu);
|
||||||
|
|
||||||
#ifdef SIM_HAVE_BREAKPOINTS
|
|
||||||
/* First try sim-break.c. If it's a breakpoint the simulator "owns"
|
|
||||||
it doesn't return. Otherwise it returns and let's us try. */
|
|
||||||
pc = GET_H_PC ();
|
|
||||||
sim_handle_breakpoint (sd, current_cpu, pc);
|
|
||||||
/* Fall through. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
|
if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
|
||||||
{
|
{
|
||||||
/* Invalidate the insn cache because the debugger will presumably
|
/* Invalidate the insn cache because the debugger will presumably
|
||||||
replace the breakpoint insn with the real one. */
|
replace the breakpoint insn with the real one. */
|
||||||
#ifndef SIM_HAVE_BREAKPOINTS
|
|
||||||
pc = GET_H_PC ();
|
|
||||||
#endif
|
|
||||||
sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped, SIM_SIGTRAP);
|
sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped, SIM_SIGTRAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* tconfig.h (SIM_HAVE_BREAKPOINTS, SIM_BREAKPOINT,
|
||||||
|
SIM_BREAKPOINT_SIZE): Delete.
|
||||||
|
|
||||||
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* tconfig.h (WITH_WATCHPOINTS): Delete.
|
* tconfig.h (WITH_WATCHPOINTS): Delete.
|
||||||
|
|
|
@ -9,15 +9,6 @@
|
||||||
/* ??? Temporary hack until model support unified. */
|
/* ??? Temporary hack until model support unified. */
|
||||||
#define SIM_HAVE_MODEL
|
#define SIM_HAVE_MODEL
|
||||||
|
|
||||||
/* Define this to enable the intrinsic breakpoint mechanism. */
|
|
||||||
/* FIXME: may be able to remove SIM_HAVE_BREAKPOINTS since it essentially
|
|
||||||
duplicates ifdef SIM_BREAKPOINT (right?) */
|
|
||||||
#if 1
|
|
||||||
#define SIM_HAVE_BREAKPOINTS
|
|
||||||
#define SIM_BREAKPOINT { 0, 0, 0, 0xD }
|
|
||||||
#define SIM_BREAKPOINT_SIZE 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
||||||
and -pbb. However some cpu families may use -simple while others use
|
and -pbb. However some cpu families may use -simple while others use
|
||||||
one of -scache/-pbb. ???? */
|
one of -scache/-pbb. ???? */
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* tconfig.h (SIM_HAVE_BREAKPOINTS, SIM_BREAKPOINT,
|
||||||
|
SIM_BREAKPOINT_SIZE): Delete.
|
||||||
|
* traps-linux.c [SIM_HAVE_BREAKPOINTS] (m32r_trap): Delete sim
|
||||||
|
breakpoint code.
|
||||||
|
* traps.c [SIM_HAVE_BREAKPOINTS] (m32r_trap): Likewise.
|
||||||
|
|
||||||
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* tconfig.h (WITH_WATCHPOINTS): Delete.
|
* tconfig.h (WITH_WATCHPOINTS): Delete.
|
||||||
|
|
|
@ -9,15 +9,6 @@
|
||||||
/* For MSPR support. FIXME: revisit. */
|
/* For MSPR support. FIXME: revisit. */
|
||||||
#define WITH_DEVICES 1
|
#define WITH_DEVICES 1
|
||||||
|
|
||||||
/* Define this to enable the intrinsic breakpoint mechanism. */
|
|
||||||
/* FIXME: may be able to remove SIM_HAVE_BREAKPOINT since it essentially
|
|
||||||
duplicates ifdef SIM_BREAKPOINT (right?) */
|
|
||||||
#if 0
|
|
||||||
#define SIM_HAVE_BREAKPOINTS
|
|
||||||
#define SIM_BREAKPOINT { 0x10, 0xf1 }
|
|
||||||
#define SIM_BREAKPOINT_SIZE 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
||||||
and -pbb. However some cpu families may use -simple while others use
|
and -pbb. However some cpu families may use -simple while others use
|
||||||
one of -scache/-pbb. */
|
one of -scache/-pbb. */
|
||||||
|
|
|
@ -197,18 +197,6 @@ m32r_trap (SIM_CPU *current_cpu, PCADDR pc, int num)
|
||||||
SIM_DESC sd = CPU_STATE (current_cpu);
|
SIM_DESC sd = CPU_STATE (current_cpu);
|
||||||
host_callback *cb = STATE_CALLBACK (sd);
|
host_callback *cb = STATE_CALLBACK (sd);
|
||||||
|
|
||||||
#ifdef SIM_HAVE_BREAKPOINTS
|
|
||||||
/* Check for breakpoints "owned" by the simulator first, regardless
|
|
||||||
of --environment. */
|
|
||||||
if (num == TRAP_BREAKPOINT)
|
|
||||||
{
|
|
||||||
/* First try sim-break.c. If it's a breakpoint the simulator "owns"
|
|
||||||
it doesn't return. Otherwise it returns and let's us try. */
|
|
||||||
sim_handle_breakpoint (sd, current_cpu, pc);
|
|
||||||
/* Fall through. */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (num)
|
switch (num)
|
||||||
{
|
{
|
||||||
case TRAP_ELF_SYSCALL :
|
case TRAP_ELF_SYSCALL :
|
||||||
|
|
|
@ -103,18 +103,6 @@ m32r_trap (SIM_CPU *current_cpu, PCADDR pc, int num)
|
||||||
SIM_DESC sd = CPU_STATE (current_cpu);
|
SIM_DESC sd = CPU_STATE (current_cpu);
|
||||||
host_callback *cb = STATE_CALLBACK (sd);
|
host_callback *cb = STATE_CALLBACK (sd);
|
||||||
|
|
||||||
#ifdef SIM_HAVE_BREAKPOINTS
|
|
||||||
/* Check for breakpoints "owned" by the simulator first, regardless
|
|
||||||
of --environment. */
|
|
||||||
if (num == TRAP_BREAKPOINT)
|
|
||||||
{
|
|
||||||
/* First try sim-break.c. If it's a breakpoint the simulator "owns"
|
|
||||||
it doesn't return. Otherwise it returns and let's us try. */
|
|
||||||
sim_handle_breakpoint (sd, current_cpu, pc);
|
|
||||||
/* Fall through. */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
|
if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
|
||||||
{
|
{
|
||||||
/* The new pc is the trap vector entry.
|
/* The new pc is the trap vector entry.
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* tconfig.h (SIM_HAVE_BREAKPOINTS, SIM_BREAKPOINT,
|
||||||
|
SIM_BREAKPOINT_SIZE): Delete.
|
||||||
|
|
||||||
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
2015-12-24 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* tconfig.h (WITH_WATCHPOINTS): Delete.
|
* tconfig.h (WITH_WATCHPOINTS): Delete.
|
||||||
|
|
|
@ -9,15 +9,6 @@
|
||||||
/* ??? Temporary hack until model support unified. */
|
/* ??? Temporary hack until model support unified. */
|
||||||
#define SIM_HAVE_MODEL
|
#define SIM_HAVE_MODEL
|
||||||
|
|
||||||
/* Define this to enable the intrinsic breakpoint mechanism. */
|
|
||||||
/* FIXME: may be able to remove SIM_HAVE_BREAKPOINTS since it essentially
|
|
||||||
duplicates ifdef SIM_BREAKPOINT (right?) */
|
|
||||||
#if 1
|
|
||||||
#define SIM_HAVE_BREAKPOINTS
|
|
||||||
#define SIM_BREAKPOINT { 0, 0, 0, 0xD }
|
|
||||||
#define SIM_BREAKPOINT_SIZE 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
||||||
and -pbb. However some cpu families may use -simple while others use
|
and -pbb. However some cpu families may use -simple while others use
|
||||||
one of -scache/-pbb. ???? */
|
one of -scache/-pbb. ???? */
|
||||||
|
|
Loading…
Reference in a new issue