Revisión | e65b4ac0f7d2f05e249eababeb7eaefcecb9310f (tree) |
---|---|
Tiempo | 2015-11-21 03:06:11 |
Autor | Yoshinori Sato <ysato@sa76...> |
Commiter | Yoshinori Sato |
Conver signal number
@@ -36,10 +36,6 @@ | ||
36 | 36 | #include "sys/types.h" |
37 | 37 | #include "sim-options.h" |
38 | 38 | |
39 | -#ifndef SIGTRAP | |
40 | -# define SIGTRAP 5 | |
41 | -#endif | |
42 | - | |
43 | 39 | int debug; |
44 | 40 | int h8300_interrupt_mode; |
45 | 41 |
@@ -572,7 +568,7 @@ lvalue (SIM_DESC sd, int x, int rn, unsigned int *val) | ||
572 | 568 | *val = X (OP_MEM, SP); |
573 | 569 | break; |
574 | 570 | default: |
575 | - sim_engine_set_run_state (sd, sim_stopped, SIGSEGV); | |
571 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGSEGV); | |
576 | 572 | return -1; |
577 | 573 | } |
578 | 574 | return 0; |
@@ -1569,7 +1565,7 @@ fetch_1 (SIM_DESC sd, ea_type *arg, int *val, int twice) | ||
1569 | 1565 | |
1570 | 1566 | case X (OP_MEM, SB): /* Why isn't this implemented? */ |
1571 | 1567 | default: |
1572 | - sim_engine_set_run_state (sd, sim_stopped, SIGSEGV); | |
1568 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGSEGV); | |
1573 | 1569 | return -1; |
1574 | 1570 | } |
1575 | 1571 | return 0; /* Success. */ |
@@ -1778,7 +1774,7 @@ store_1 (SIM_DESC sd, ea_type *arg, int n, int twice) | ||
1778 | 1774 | case X (OP_MEM, SW): /* Why isn't this implemented? */ |
1779 | 1775 | case X (OP_MEM, SL): /* Why isn't this implemented? */ |
1780 | 1776 | default: |
1781 | - sim_engine_set_run_state (sd, sim_stopped, SIGSEGV); | |
1777 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGSEGV); | |
1782 | 1778 | return -1; |
1783 | 1779 | } |
1784 | 1780 | return 0; |
@@ -2038,7 +2034,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal) | ||
2038 | 2034 | |
2039 | 2035 | if (step) |
2040 | 2036 | { |
2041 | - sim_engine_set_run_state (sd, sim_stopped, SIGTRAP); | |
2037 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGTRAP); | |
2042 | 2038 | } |
2043 | 2039 | else |
2044 | 2040 | { |
@@ -2050,7 +2046,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal) | ||
2050 | 2046 | /* The PC should never be odd. */ |
2051 | 2047 | if (pc & 0x1) |
2052 | 2048 | { |
2053 | - sim_engine_set_run_state (sd, sim_stopped, SIGBUS); | |
2049 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGBUS); | |
2054 | 2050 | return; |
2055 | 2051 | } |
2056 | 2052 |
@@ -3754,7 +3750,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal) | ||
3754 | 3750 | goto end; |
3755 | 3751 | |
3756 | 3752 | case O (O_ILL, SB): /* illegal */ |
3757 | - sim_engine_set_run_state (sd, sim_stopped, SIGILL); | |
3753 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGILL); | |
3758 | 3754 | goto end; |
3759 | 3755 | |
3760 | 3756 | case O (O_SLEEP, SN): /* sleep */ |
@@ -3780,7 +3776,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal) | ||
3780 | 3776 | else |
3781 | 3777 | { |
3782 | 3778 | /* Treat it as a sigtrap. */ |
3783 | - sim_engine_set_run_state (sd, sim_stopped, SIGTRAP); | |
3779 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGTRAP); | |
3784 | 3780 | } |
3785 | 3781 | #else |
3786 | 3782 | else |
@@ -3798,7 +3794,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal) | ||
3798 | 3794 | } |
3799 | 3795 | |
3800 | 3796 | case O (O_BPT, SN): |
3801 | - sim_engine_set_run_state (sd, sim_stopped, SIGTRAP); | |
3797 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGTRAP); | |
3802 | 3798 | goto end; |
3803 | 3799 | |
3804 | 3800 | case O (O_BSETEQ, SB): |
@@ -4471,14 +4467,14 @@ sim_resume (SIM_DESC sd, int step, int siggnal) | ||
4471 | 4467 | |
4472 | 4468 | default: |
4473 | 4469 | illegal: |
4474 | - sim_engine_set_run_state (sd, sim_stopped, SIGILL); | |
4470 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGILL); | |
4475 | 4471 | goto end; |
4476 | 4472 | |
4477 | 4473 | } |
4478 | 4474 | |
4479 | 4475 | (*sim_callback->printf_filtered) (sim_callback, |
4480 | 4476 | "sim_resume: internal error.\n"); |
4481 | - sim_engine_set_run_state (sd, sim_stopped, SIGILL); | |
4477 | + sim_engine_set_run_state (sd, sim_stopped, SIM_SIGILL); | |
4482 | 4478 | goto end; |
4483 | 4479 | |
4484 | 4480 | setc: |