| OLD | NEW |
| 1 /* main.c --- main function for stand-alone RX simulator. | 1 /* main.c --- main function for stand-alone RX simulator. |
| 2 | 2 |
| 3 Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc. |
| 4 Contributed by Red Hat, Inc. | 4 Contributed by Red Hat, Inc. |
| 5 | 5 |
| 6 This file is part of the GNU simulators. | 6 This file is part of the GNU simulators. |
| 7 | 7 |
| 8 This program is free software; you can redistribute it and/or modify | 8 This program is free software; you can redistribute it and/or modify |
| 9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
| 10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 { | 167 { |
| 168 fprintf (stderr, "%s not a rx program\n", argv[optind]); | 168 fprintf (stderr, "%s not a rx program\n", argv[optind]); |
| 169 exit (1); | 169 exit (1); |
| 170 } | 170 } |
| 171 | 171 |
| 172 init_regs (); | 172 init_regs (); |
| 173 | 173 |
| 174 rx_in_gdb = 0; | 174 rx_in_gdb = 0; |
| 175 save_trace = trace; | 175 save_trace = trace; |
| 176 trace = 0; | 176 trace = 0; |
| 177 rx_load (prog); | 177 rx_load (prog, NULL); |
| 178 trace = save_trace; | 178 trace = save_trace; |
| 179 | 179 |
| 180 sim_disasm_init (prog); | 180 sim_disasm_init (prog); |
| 181 | 181 |
| 182 enable_counting = verbose; | 182 enable_counting = verbose; |
| 183 | 183 |
| 184 rc = setjmp (decode_jmp_buf); | 184 rc = setjmp (decode_jmp_buf); |
| 185 | 185 |
| 186 if (rc == 0) | 186 if (rc == 0) |
| 187 { | 187 { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 done (RX_EXIT_STATUS (rc)); | 219 done (RX_EXIT_STATUS (rc)); |
| 220 else if (RX_STOPPED (rc)) | 220 else if (RX_STOPPED (rc)) |
| 221 { | 221 { |
| 222 if (verbose) | 222 if (verbose) |
| 223 printf("Stopped on signal %d\n", RX_STOP_SIG (rc)); | 223 printf("Stopped on signal %d\n", RX_STOP_SIG (rc)); |
| 224 exit(1); | 224 exit(1); |
| 225 } | 225 } |
| 226 done (0); | 226 done (0); |
| 227 exit (0); | 227 exit (0); |
| 228 } | 228 } |
| OLD | NEW |