[coreboot] r1075 - coreboot-v3/util/x86emu/x86emu

svn at coreboot.org svn at coreboot.org
Tue Dec 16 23:42:58 CET 2008


Author: myles
Date: 2008-12-16 23:42:58 +0100 (Tue, 16 Dec 2008)
New Revision: 1075

Modified:
   coreboot-v3/util/x86emu/x86emu/debug.c
   coreboot-v3/util/x86emu/x86emu/debug.h
   coreboot-v3/util/x86emu/x86emu/sys.c
Log:

Subject: [PATCH 3/5] fix build warnings in x86emu, especially with -DDEBUG

Signed-off-by: Pattrick Hueper <phueper at hueper.net>
Acked-by: Myles Watson <mylesgw at gmail.com>


Modified: coreboot-v3/util/x86emu/x86emu/debug.c
===================================================================
--- coreboot-v3/util/x86emu/x86emu/debug.c	2008-12-16 22:42:05 UTC (rev 1074)
+++ coreboot-v3/util/x86emu/x86emu/debug.c	2008-12-16 22:42:58 UTC (rev 1075)
@@ -46,7 +46,7 @@
 
 static void     print_encoded_bytes (u16 s, u16 o);
 static void     print_decoded_instruction (void);
-static int      parse_line (char *s, int *ps, int *n);
+int      parse_line (char *s, int *ps, int *n);
 
 /* should look something like debug's output. */
 void X86EMU_trace_regs (void)
@@ -83,7 +83,7 @@
     print_decoded_instruction();
 }
 
-static void disassemble_forward (u16 seg, u16 off, int n)
+void disassemble_forward (u16 seg, u16 off, int n)
 {
     X86EMU_sysEnv tregs;
     int i;
@@ -331,7 +331,7 @@
     return M.x86.debug &= ~(DEBUG_STEP_F | DEBUG_DECODE_F | DEBUG_TRACE_F);
 }
 
-static int parse_line (char *s, int *ps, int *n)
+int parse_line (char *s, int *ps, int *n)
 {
 #if 0
     int cmd;
@@ -359,6 +359,8 @@
         sscanf(s,"%x",&ps[*n]);
         *n += 1;
     }
+#else
+    return 0;
 #endif
 }
 

Modified: coreboot-v3/util/x86emu/x86emu/debug.h
===================================================================
--- coreboot-v3/util/x86emu/x86emu/debug.h	2008-12-16 22:42:05 UTC (rev 1074)
+++ coreboot-v3/util/x86emu/x86emu/debug.h	2008-12-16 22:42:58 UTC (rev 1075)
@@ -41,7 +41,7 @@
 #define __X86EMU_DEBUG_H
 
 //#define DEBUG 0
-#undef DEBUG
+//#undef DEBUG
 /*---------------------- Macros and type definitions ----------------------*/
 
 /* checks to be enabled for "runtime" */

Modified: coreboot-v3/util/x86emu/x86emu/sys.c
===================================================================
--- coreboot-v3/util/x86emu/x86emu/sys.c	2008-12-16 22:42:05 UTC (rev 1074)
+++ coreboot-v3/util/x86emu/x86emu/sys.c	2008-12-16 22:42:58 UTC (rev 1075)
@@ -69,7 +69,7 @@
 	u8 *retaddr = 0;
 
 	if (addr > M.mem_size - size) {
-		DB(printk("mem_ptr: address %#lx out of range!\n", addr);)
+		DB(printk("mem_ptr: address %#x out of range!\n", addr);)
 		    HALT_SYS();
 	}
 	if (addr < 0x200) {





More information about the coreboot mailing list