OLD | NEW |
1 /* This file is part of the program psim. | 1 /* This file is part of the program psim. |
2 | 2 |
3 Copyright 1994, 1995, 1996, 1998, 2003 Andrew Cagney | 3 Copyright 1994, 1995, 1996, 1998, 2003 Andrew Cagney |
4 | 4 |
5 This program is free software; you can redistribute it and/or modify | 5 This program is free software; you can redistribute it and/or modify |
6 it under the terms of the GNU General Public License as published by | 6 it under the terms of the GNU General Public License as published by |
7 the Free Software Foundation; either version 2 of the License, or | 7 the Free Software Foundation; either version 2 of the License, or |
8 (at your option) any later version. | 8 (at your option) any later version. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, | 10 This program is distributed in the hope that it will be useful, |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 void | 192 void |
193 sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc) | 193 sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc) |
194 { | 194 { |
195 psim_status status = psim_get_status(simulator); | 195 psim_status status = psim_get_status(simulator); |
196 | 196 |
197 switch (status.reason) { | 197 switch (status.reason) { |
198 case was_continuing: | 198 case was_continuing: |
199 *reason = sim_stopped; | 199 *reason = sim_stopped; |
200 if (status.signal == 0) | 200 if (status.signal == 0) |
201 *sigrc = TARGET_SIGNAL_TRAP; | 201 *sigrc = GDB_SIGNAL_TRAP; |
202 else | 202 else |
203 *sigrc = status.signal; | 203 *sigrc = status.signal; |
204 break; | 204 break; |
205 case was_trap: | 205 case was_trap: |
206 *reason = sim_stopped; | 206 *reason = sim_stopped; |
207 *sigrc = TARGET_SIGNAL_TRAP; | 207 *sigrc = GDB_SIGNAL_TRAP; |
208 break; | 208 break; |
209 case was_exited: | 209 case was_exited: |
210 *reason = sim_exited; | 210 *reason = sim_exited; |
211 *sigrc = status.signal; | 211 *sigrc = status.signal; |
212 break; | 212 break; |
213 case was_signalled: | 213 case was_signalled: |
214 *reason = sim_signalled; | 214 *reason = sim_signalled; |
215 *sigrc = status.signal; | 215 *sigrc = status.signal; |
216 break; | 216 break; |
217 } | 217 } |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 388 |
389 void * | 389 void * |
390 zalloc(long size) | 390 zalloc(long size) |
391 { | 391 { |
392 void *memory = (void*)xmalloc(size); | 392 void *memory = (void*)xmalloc(size); |
393 if (memory == NULL) | 393 if (memory == NULL) |
394 error("xmalloc failed\n"); | 394 error("xmalloc failed\n"); |
395 memset(memory, 0, size); | 395 memset(memory, 0, size); |
396 return memory; | 396 return memory; |
397 } | 397 } |
OLD | NEW |