--- trunk/src/debugger.c 2007/10/08 16:17:52 3 +++ trunk/src/debugger.c 2007/10/08 16:18:00 4 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $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 $ * * Single-step debugger. * @@ -54,6 +54,7 @@ #include #include +#include "bintrans.h" #include "console.h" #include "cpu.h" #include "device.h" @@ -380,6 +381,8 @@ */ static void debugger_cmd_bintrans(struct machine *m, char *cmd_line) { + int i; + if (*cmd_line == '\0') goto printstate; @@ -393,9 +396,11 @@ cmd_line++; /* Note: len 3 and 4, to include the NUL char. */ - if (strncasecmp(cmd_line, "on", 3) == 0) + if (strncasecmp(cmd_line, "on", 3) == 0) { m->bintrans_enable = 1; - else if (strncasecmp(cmd_line, "off", 4) == 0) + for (i=0; incpus; i++) + bintrans_restart(m->cpus[i]); + } else if (strncasecmp(cmd_line, "off", 4) == 0) m->bintrans_enable = 0; else printf("syntax: bintrans [on|off]\n"); @@ -1344,14 +1349,11 @@ addr = addr_start; - if ((addr & 3) != 0) - printf("WARNING! You entered an unaligned address.\n"); - ctrl_c = 0; while (addr < addr_end) { int i, len; - unsigned char buf[25]; /* TODO: How long can an + unsigned char buf[32]; /* TODO: How long can an instruction be, on weird archs? */ memset(buf, 0, sizeof(buf));