[PATCH] [WineDbg]: also recognize 'rep ret' as a valid return insn for i386 as we did for x86_64
Eric Pouech
eric.pouech at orange.fr
Sat May 12 11:11:31 CDT 2012
(gcc 4.7 also emits this code with -m32)
A+
---
programs/winedbg/be_i386.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/programs/winedbg/be_i386.c b/programs/winedbg/be_i386.c
index d9fb67c..5dc00ed 100644
--- a/programs/winedbg/be_i386.c
+++ b/programs/winedbg/be_i386.c
@@ -354,6 +354,11 @@ static unsigned be_i386_is_function_return(const void* insn)
BYTE ch;
if (!dbg_read_memory(insn, &ch, sizeof(ch))) return FALSE;
+ if (ch == 0xF3) /* REP */
+ {
+ insn = (const char*)insn + 1;
+ if (!dbg_read_memory(insn, &ch, sizeof(ch))) return FALSE;
+ }
return (ch == 0xC2) || (ch == 0xC3);
}
More information about the wine-patches
mailing list