25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: main.c,v 1.293 2007/02/05 16:49:05 debug Exp $ |
* $Id: main.c,v 1.296 2007/03/31 15:11:26 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
46 |
#include "settings.h" |
#include "settings.h" |
47 |
#include "timer.h" |
#include "timer.h" |
48 |
|
|
49 |
|
#ifdef TEST_NATIVE_X86 |
50 |
|
#include "native_x86.h" |
51 |
|
#endif |
52 |
|
|
53 |
|
|
54 |
extern volatile int single_step; |
extern volatile int single_step; |
55 |
extern int force_debugger_at_exit; |
extern int force_debugger_at_exit; |
248 |
" file)\n"); |
" file)\n"); |
249 |
printf(" s SCSI\n"); |
printf(" s SCSI\n"); |
250 |
printf(" t tape\n"); |
printf(" t tape\n"); |
251 |
|
printf(" V add an overlay\n"); |
252 |
printf(" 0-7 force a specific ID\n"); |
printf(" 0-7 force a specific ID\n"); |
|
printf(" -G port listen to gdb remote connections on this port\n"); |
|
253 |
printf(" -I hz set the main cpu frequency to hz (not used by " |
printf(" -I hz set the main cpu frequency to hz (not used by " |
254 |
"all combinations\n of machines and guest OSes)\n"); |
"all combinations\n of machines and guest OSes)\n"); |
255 |
printf(" -i display each instruction as it is executed\n"); |
printf(" -i display each instruction as it is executed\n"); |
370 |
#ifdef UNSTABLE_DEVEL |
#ifdef UNSTABLE_DEVEL |
371 |
"bB" |
"bB" |
372 |
#endif |
#endif |
373 |
"C:c:Dd:E:e:G:HhI:iJj:k:KM:Nn:Oo:p:QqRrSs:TtU" |
"C:c:Dd:E:e:HhI:iJj:k:KM:Nn:Oo:p:QqRrSs:TtU" |
374 |
#ifdef UNSTABLE_DEVEL |
#ifdef UNSTABLE_DEVEL |
375 |
"u:" |
"u:" |
376 |
#endif |
#endif |
442 |
subtype = optarg; |
subtype = optarg; |
443 |
msopts = 1; |
msopts = 1; |
444 |
break; |
break; |
|
case 'G': |
|
|
m->gdb.port = atoi(optarg); |
|
|
if (m->gdb.port < 1 || m->gdb.port > 65535) { |
|
|
fprintf(stderr, "Invalid debugger port %i.\n", |
|
|
m->gdb.port); |
|
|
exit(1); |
|
|
} |
|
|
/* Note: implicit -V */ |
|
|
single_step = ENTER_SINGLE_STEPPING; |
|
|
msopts = 1; |
|
|
break; |
|
445 |
case 'H': |
case 'H': |
446 |
machine_list_available_types_and_cpus(); |
machine_list_available_types_and_cpus(); |
447 |
exit(1); |
exit(1); |
740 |
int i; |
int i; |
741 |
|
|
742 |
|
|
743 |
|
/* |
744 |
|
* Experimental profil() code, which works on my laptop. |
745 |
|
* Don't use it for anything else. |
746 |
|
*/ |
747 |
#ifdef USE_PROFIL |
#ifdef USE_PROFIL |
748 |
uint16_t samples[0x100000]; |
uint16_t samples[0x100000]; |
749 |
memset(samples, 0, sizeof(samples)); |
memset(samples, 0, sizeof(samples)); |
755 |
#endif |
#endif |
756 |
|
|
757 |
|
|
758 |
|
/* Experimental test code: */ |
759 |
|
#ifdef TEST_NATIVE_X86 |
760 |
|
test_native_x86(); |
761 |
|
#endif |
762 |
|
|
763 |
|
|
764 |
|
|
765 |
progname = argv[0]; |
progname = argv[0]; |
766 |
|
|
767 |
|
|