mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
Clarify meaning of sim_signalled's SIGRC argument. Document that this
isn't possible in sim-reason.c and just return the target SIGRC instead. For simulators that rely on sim-reason.c, replace SIG* with SIM_SIG*. Hack nrun.c so that when it is executed (ARGV[0]) as `step' instead of `run' it single steps the simulator. Allows testing of single step without full GDB.
This commit is contained in:
@ -1,3 +1,17 @@
|
||||
Sat Nov 22 21:42:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* interp.c (engine_step): Replace SIGTRAP with SIM_SIGTRAP.
|
||||
(engine_run_until_stop): Replace SIGINT with SIM_SIGINT.
|
||||
|
||||
* sim-main.h: Include sim-signal.h.
|
||||
(SIGTRAP): Delete definition.
|
||||
|
||||
* interp.c, sim-calls.c: Do not include signal.h.
|
||||
|
||||
* insns (illegal): SIGILL -> SIM_SIGILL.
|
||||
(fp_unavailable): SIGFPE -> SIM_SIGFPE.
|
||||
(do_trap): SIGTRAP -> SIM_SIGTRAP.
|
||||
|
||||
Tue Nov 18 15:33:48 1997 Doug Evans <devans@canuck.cygnus.com>
|
||||
|
||||
* sim-main.h (CIA_ADDR): Define.
|
||||
|
@ -22,12 +22,12 @@
|
||||
// The following is called when ever an illegal instruction is encountered.
|
||||
:internal::::illegal:
|
||||
sim_io_eprintf (SD, "0x%lx: illegal instruction\n", (unsigned long) cia.ip);
|
||||
sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIGILL);
|
||||
sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGILL);
|
||||
|
||||
// The following is called when ever an FP op is attempted with FPU disabled.
|
||||
:internal::::fp_unavailable:
|
||||
sim_io_eprintf (SD, "0x%lx: floating-point unavailable\n", (unsigned long) cia.ip);
|
||||
sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIGFPE);
|
||||
sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGFPE);
|
||||
|
||||
// Handle a branch instruction
|
||||
:function:::instruction_address:do_branch:int annul, address_word target, int rLink_p, unsigned32 *rLink
|
||||
@ -1229,7 +1229,7 @@ void::function::do_trap:unsigned32 trap_number
|
||||
}
|
||||
break;
|
||||
case 73:
|
||||
sim_engine_halt (SD, CPU, NULL, cia, sim_stopped, SIGTRAP);
|
||||
sim_engine_halt (SD, CPU, NULL, cia, sim_stopped, SIM_SIGTRAP);
|
||||
|
||||
/* Add a few traps for now to print the register state */
|
||||
case 74:
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include "idecode.h"
|
||||
#include "itable.h"
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
@ -103,7 +101,7 @@ engine_run_until_stop (SIM_DESC sd,
|
||||
cia = idecode_issue (sd, insn, cia);
|
||||
}
|
||||
while (*keep_running);
|
||||
engine_halt (sd, cpu, cia, sim_stopped, SIGINT);
|
||||
engine_halt (sd, cpu, cia, sim_stopped, SIM_SIGINT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,9 +120,8 @@ engine_step (SIM_DESC sd)
|
||||
cia = cpu->cia;
|
||||
insn = IMEM (cia);
|
||||
cia = idecode_issue (sd, insn, cia);
|
||||
engine_halt (sd, cpu, cia, sim_stopped, SIGTRAP);
|
||||
engine_halt (sd, cpu, cia, sim_stopped, SIM_SIGTRAP);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <signal.h> /* FIXME - should be machine dependant version */
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
@ -25,8 +25,10 @@
|
||||
|
||||
|
||||
#include "sim-basics.h"
|
||||
#include "sim-signal.h"
|
||||
|
||||
#include <signal.h> /* For kill() in insns:do_trap */
|
||||
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
@ -77,7 +79,3 @@ extern void engine_init
|
||||
#define kill(sig, pid) (errno = EINVAL, -1)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SIGTRAP
|
||||
# define SIGTRAP 5
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user