2003-06-24 Michael Snyder <msnyder@redhat.com>
* sim-main.h (SIM_WIFSTOPPED, SIM_WSTOPSIG): Define. * compile.c (sim_resume): Use the above to return stop signal.
This commit is contained in:
parent
fd13a04acf
commit
f0861129d5
3 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-06-24 Michael Snyder <msnyder@redhat.com>
|
||||||
|
|
||||||
|
* sim-main.h (SIM_WIFSTOPPED, SIM_WSTOPSIG): Define.
|
||||||
|
* compile.c (sim_resume): Use the above to return stop signal.
|
||||||
|
|
||||||
2003-06-18 Michael Snyder <msnyder@redhat.com>
|
2003-06-18 Michael Snyder <msnyder@redhat.com>
|
||||||
|
|
||||||
* compile.c: Replace "Hitachi" with "Renesas".
|
* compile.c: Replace "Hitachi" with "Renesas".
|
||||||
|
|
|
@ -3575,6 +3575,12 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
|
||||||
sim_engine_set_run_state (sd, sim_exited,
|
sim_engine_set_run_state (sd, sim_exited,
|
||||||
SIM_WEXITSTATUS (h8_get_reg (sd, 0)));
|
SIM_WEXITSTATUS (h8_get_reg (sd, 0)));
|
||||||
}
|
}
|
||||||
|
else if (SIM_WIFSTOPPED (h8_get_reg (sd, 0)))
|
||||||
|
{
|
||||||
|
/* Pass the stop signal up to gdb. */
|
||||||
|
sim_engine_set_run_state (sd, sim_stopped,
|
||||||
|
SIM_WSTOPSIG (h8_get_reg (sd, 0)));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Treat it as a sigtrap. */
|
/* Treat it as a sigtrap. */
|
||||||
|
|
|
@ -164,7 +164,9 @@ struct sim_state {
|
||||||
/* Local version of macros for decoding exit status.
|
/* Local version of macros for decoding exit status.
|
||||||
(included here rather than try to find target version of wait.h)
|
(included here rather than try to find target version of wait.h)
|
||||||
*/
|
*/
|
||||||
#define SIM_WIFEXITED(V) (((V) & 0xff) == 0)
|
#define SIM_WIFEXITED(V) (((V) & 0xff) == 0)
|
||||||
#define SIM_WEXITSTATUS(V) ((V) >> 8)
|
#define SIM_WIFSTOPPED(V) (!SIM_WIFEXITED (V))
|
||||||
|
#define SIM_WEXITSTATUS(V) (((V) >> 8) & 0xff)
|
||||||
|
#define SIM_WSTOPSIG(V) ((V) & 0x7f)
|
||||||
|
|
||||||
#endif /* SIM_MAIN_H */
|
#endif /* SIM_MAIN_H */
|
||||||
|
|
Loading…
Add table
Reference in a new issue