/[gxemul]/trunk/src/main.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 37 by dpavlin, Mon Oct 8 16:21:17 2007 UTC revision 38 by dpavlin, Mon Oct 8 16:21:53 2007 UTC
# Line 25  Line 25 
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>
# Line 46  Line 46 
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;
# Line 244  static void usage(int longusage) Line 248  static void usage(int longusage)
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");
# Line 366  int get_cmd_args(int argc, char *argv[], Line 370  int get_cmd_args(int argc, char *argv[],
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
# Line 438  int get_cmd_args(int argc, char *argv[], Line 442  int get_cmd_args(int argc, char *argv[],
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);
# Line 747  int main(int argc, char *argv[]) Line 740  int main(int argc, char *argv[])
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));
# Line 758  int main(int argc, char *argv[]) Line 755  int main(int argc, char *argv[])
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    

Legend:
Removed from v.37  
changed lines
  Added in v.38

  ViewVC Help
Powered by ViewVC 1.1.26