Skip to contentSkip to conversation

Fix the function conflict in x86emu when DEBUG is on

PATCH New Jason Jin 2 participants 2 messages Oct 15, 2008 – Oct 16, 2008

lore
Share & tools
lore

Jason Jin

author
#0 lore raw

PATCH 1/1 Fix the function conflict in x86emu when DEBUG is on

The function parse_line() in common/main.c was exposed globally by commit 6636b62a6efc7f14e6e788788631ae7a7fca4537, Result in conflict with the same name funciton in drivers/bios_emulator/x86emu/debug.c when define the DEBUG. This patch fix this by renaming the function in the debug.c file.

---
 drivers/bios_emulator/x86emu/debug.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/bios_emulator/x86emu/debug.c +3 -3
index 5cbcc95..29fe3f1 100644
@@ -50,7 +50,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);
+static int x86emu_parse_line(char *s, int *ps, int *n);
 
 /* should look something like debug's output. */
 void X86EMU_trace_regs(void)
@@ -257,7 +257,7 @@ void x86emu_single_step(void)
 	offset = M.x86.saved_ip;
 	while (!done) {
 		printk("-");
-		cmd = parse_line(s, ps, &ntok);
+		cmd = x86emu_parse_line(s, ps, &ntok);
 		switch (cmd) {
 		case 'u':
 			disassemble_forward(M.x86.saved_cs, (u16) offset, 10);
@@ -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)
+static int x86emu_parse_line(char *s, int *ps, int *n)
 {
 	int cmd;
 
Signature · 1 line
1.5.4
#1 lore raw

PATCH 1/1 Fix the function conflict in x86emu when DEBUG is on

Dear Jason Jin,

Quoted 9 lines · In message <[email protected]> you…

The function parse_line() in common/main.c was exposed globally by commit 6636b62a6efc7f14e6e788788631ae7a7fca4537, Result in conflict with the same name funciton in drivers/bios_emulator/x86emu/debug.c when define the DEBUG. This patch fix this by renaming the function in the debug.c file.

---
 drivers/bios_emulator/x86emu/debug.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
[Braddock:] Mr. Churchill, you are drunk.
[Churchill:] And you madam, are ugly.  But I shall be sober tomorrow.