/[qemu]/qemu/exec.c
ViewVC logotype

Diff of /qemu/exec.c

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

revision 1.16 by bellard, Tue Sep 30 21:04:53 2003 UTC revision 1.17 by bellard, Sun Oct 5 14:28:56 2003 UTC
# Line 78  CPUWriteMemoryFunc *io_mem_write[IO_MEM_ Line 78  CPUWriteMemoryFunc *io_mem_write[IO_MEM_
78  CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];  CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
79  static int io_mem_nb;  static int io_mem_nb;
80    
81    /* log support */
82    char *logfilename = "/tmp/qemu.log";
83    FILE *logfile;
84    int loglevel;
85    
86  static void page_init(void)  static void page_init(void)
87  {  {
88      /* NOTE: we can always suppose that host_page_size >=      /* NOTE: we can always suppose that host_page_size >=
# Line 676  void cpu_single_step(CPUState *env, int Line 681  void cpu_single_step(CPUState *env, int
681  #endif  #endif
682  }  }
683    
684    /* enable or disable low levels log */
685    void cpu_set_log(int log_flags)
686    {
687        loglevel = log_flags;
688        if (loglevel && !logfile) {
689            logfile = fopen(logfilename, "w");
690            if (!logfile) {
691                perror(logfilename);
692                _exit(1);
693            }
694            setvbuf(logfile, NULL, _IOLBF, 0);
695        }
696    }
697    
698    void cpu_set_log_filename(const char *filename)
699    {
700        logfilename = strdup(filename);
701    }
702    
703  /* mask must never be zero */  /* mask must never be zero */
704  void cpu_interrupt(CPUState *env, int mask)  void cpu_interrupt(CPUState *env, int mask)

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26