1 /* This file is part of the GDB simulators.
3 Copyright (C) 1997, Free Software Foundation
4 Condtributed by Cyngnus Solutions.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
43 engine_error (SIM_DESC sd
,
45 instruction_address cia
,
51 sim_io_evprintf (sd
, fmt
, ap
);
54 sim_halt (sd
, cpu
, NULL
, cia
, sim_stopped
, SIGABRT
);
58 engine_halt (SIM_DESC sd
,
60 instruction_address cia
,
65 sim_io_error (sd
, "engine_halt - bad longjmp");
67 sd
->siggnal
= siggnal
;
72 longjmp (sd
->path_to_halt
, 1);
76 engine_restart (SIM_DESC sd
,
78 instruction_address cia
)
81 sim_io_error (sd
, "engine_restart - bad longjmp");
84 longjmp(sd
->path_to_restart
, 1);
89 engine_run_until_stop (SIM_DESC sd
,
90 volatile int *keep_running
)
92 if (!setjmp (sd
->path_to_halt
))
94 instruction_address cia
;
95 sim_cpu
*cpu
= STATE_CPU (sd
, 0);
97 setjmp (sd
->path_to_restart
);
102 instruction_word insn
= IMEM (cia
);
103 cia
= idecode_issue (sd
, insn
, cia
);
105 while (*keep_running
);
106 engine_halt (sd
, cpu
, cia
, sim_stopped
, SIGINT
);
112 engine_step (SIM_DESC sd
)
114 if (!setjmp (sd
->path_to_halt
))
116 instruction_address cia
;
117 instruction_word insn
;
118 sim_cpu
*cpu
= STATE_CPU (sd
, 0);
120 setjmp (sd
->path_to_restart
);
124 cia
= idecode_issue (sd
, insn
, cia
);
125 engine_halt (sd
, cpu
, cia
, sim_stopped
, SIGTRAP
);
This page took 0.035363 seconds and 4 git commands to generate.