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

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


git-svn-id: svn://coreboot.org/repository/coreboot-v3@1075 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Myles Watson 2008-12-16 22:42:58 +00:00
commit 755783fa42
3 changed files with 7 additions and 5 deletions

View file

@ -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 @@ void x86emu_just_disassemble (void)
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 @@ int X86EMU_trace_off(void)
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 @@ static int parse_line (char *s, int *ps, int *n)
sscanf(s,"%x",&ps[*n]);
*n += 1;
}
#else
return 0;
#endif
}

View file

@ -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" */

View file

@ -69,7 +69,7 @@ u8 *mem_ptr(u32 addr, int size)
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) {