]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/bios_emulator/x86emu/debug.c
bios_emulator: Allow x86 to use the emulator
[karo-tx-uboot.git] / drivers / bios_emulator / x86emu / debug.c
index 2fa8050f6a52535fdf47d1f0680b626df2f382a8..2ec64c24ce794b4992c2435675bd47b23c9f8336 100644 (file)
@@ -211,9 +211,7 @@ void X86EMU_dump_memory(u16 seg, u16 off, u32 amt)
        u32 start = off & 0xfffffff0;
        u32 end = (off + 16) & 0xfffffff0;
        u32 i;
-       u32 current;
 
-       current = start;
        while (end <= off + amt) {
                printk("%04x:%04x ", seg, start);
                for (i = start; i < off; i++)
@@ -229,7 +227,7 @@ void X86EMU_dump_memory(u16 seg, u16 off, u32 amt)
 void x86emu_single_step(void)
 {
        char s[1024];
-       int ps[10];
+        int ps[10];
        int ntok;
        int cmd;
        int done;
@@ -238,8 +236,6 @@ void x86emu_single_step(void)
        static int breakpoint;
        static int noDecode = 1;
 
-       char *p;
-
        if (DEBUG_BREAK()) {
                if (M.x86.saved_ip != breakpoint) {
                        return;
@@ -255,6 +251,8 @@ void x86emu_single_step(void)
        offset = M.x86.saved_ip;
        while (!done) {
                printk("-");
+               ps[1] = 0; /* Avoid dodgy compiler warnings */
+               ps[2] = 0;
                cmd = x86emu_parse_line(s, ps, &ntok);
                switch (cmd) {
                case 'u':