/[gxemul]/trunk/src/debugger.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/debugger.c

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

revision 3 by dpavlin, Mon Oct 8 16:17:48 2007 UTC revision 4 by dpavlin, Mon Oct 8 16:18:00 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: debugger.c,v 1.98 2005/03/20 20:27:26 debug Exp $   *  $Id: debugger.c,v 1.101 2005/04/18 21:41:19 debug Exp $
29   *   *
30   *  Single-step debugger.   *  Single-step debugger.
31   *   *
# Line 54  Line 54 
54  #include <string.h>  #include <string.h>
55  #include <unistd.h>  #include <unistd.h>
56    
57    #include "bintrans.h"
58  #include "console.h"  #include "console.h"
59  #include "cpu.h"  #include "cpu.h"
60  #include "device.h"  #include "device.h"
# Line 380  static void debugger_cmd_breakpoint(stru Line 381  static void debugger_cmd_breakpoint(stru
381   */   */
382  static void debugger_cmd_bintrans(struct machine *m, char *cmd_line)  static void debugger_cmd_bintrans(struct machine *m, char *cmd_line)
383  {  {
384            int i;
385    
386          if (*cmd_line == '\0')          if (*cmd_line == '\0')
387                  goto printstate;                  goto printstate;
388    
# Line 393  static void debugger_cmd_bintrans(struct Line 396  static void debugger_cmd_bintrans(struct
396                  cmd_line++;                  cmd_line++;
397    
398          /*  Note: len 3 and 4, to include the NUL char.  */          /*  Note: len 3 and 4, to include the NUL char.  */
399          if (strncasecmp(cmd_line, "on", 3) == 0)          if (strncasecmp(cmd_line, "on", 3) == 0) {
400                  m->bintrans_enable = 1;                  m->bintrans_enable = 1;
401          else if (strncasecmp(cmd_line, "off", 4) == 0)                  for (i=0; i<m->ncpus; i++)
402                            bintrans_restart(m->cpus[i]);
403            } else if (strncasecmp(cmd_line, "off", 4) == 0)
404                  m->bintrans_enable = 0;                  m->bintrans_enable = 0;
405          else          else
406                  printf("syntax: bintrans [on|off]\n");                  printf("syntax: bintrans [on|off]\n");
# Line 1344  static void debugger_cmd_unassemble(stru Line 1349  static void debugger_cmd_unassemble(stru
1349    
1350          addr = addr_start;          addr = addr_start;
1351    
         if ((addr & 3) != 0)  
                 printf("WARNING! You entered an unaligned address.\n");  
   
1352          ctrl_c = 0;          ctrl_c = 0;
1353    
1354          while (addr < addr_end) {          while (addr < addr_end) {
1355                  int i, len;                  int i, len;
1356                  unsigned char buf[25];  /*  TODO: How long can an                  unsigned char buf[32];  /*  TODO: How long can an
1357                                              instruction be, on weird archs?  */                                              instruction be, on weird archs?  */
1358                  memset(buf, 0, sizeof(buf));                  memset(buf, 0, sizeof(buf));
1359    

Legend:
Removed from v.3  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26