winedbg: Remove dead code
André Hentschel
nerv at dawncrow.de
Sun Feb 5 08:59:47 CST 2012
---
programs/winedbg/be_x86_64.c | 24 +++++++-----------------
1 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/programs/winedbg/be_x86_64.c b/programs/winedbg/be_x86_64.c
index 7dbd301..133034d 100644
--- a/programs/winedbg/be_x86_64.c
+++ b/programs/winedbg/be_x86_64.c
@@ -343,7 +343,6 @@ static unsigned be_x86_64_is_func_call(const void* insn, ADDRESS64* callee)
{
BYTE ch;
LONG delta;
- short segment;
unsigned op_size = 32, rex = 0;
DWORD64 dst;
@@ -376,13 +375,7 @@ static unsigned be_x86_64_is_func_call(const void* insn, ADDRESS64* callee)
return FALSE;
WINE_TRACE("Got 0xFF %x (&C7=%x) with rex=%x\n", ch, ch & 0xC7, rex);
/* keep only the CALL and LCALL insn:s */
- switch (f_reg(ch))
- {
- case 0x02:
- segment = dbg_context.SegCs;
- break;
- default: return FALSE;
- }
+ if (f_reg(ch) != 0x2) return FALSE;
if (rex == 0) switch (ch & 0xC7) /* keep Mod R/M only (skip reg) */
{
case 0x04:
@@ -391,16 +384,13 @@ static unsigned be_x86_64_is_func_call(const void* insn, ADDRESS64* callee)
WINE_FIXME("Unsupported yet call insn (0xFF 0x%02x) (SIB bytes) at %p\n", ch, insn);
return FALSE;
case 0x05: /* addr32 */
- if (f_reg(ch) == 0x2)
- {
- /* rip-relative to next insn */
- if (!dbg_read_memory((const char*)insn + 2, &delta, sizeof(delta)) ||
- !dbg_read_memory((const char*)insn + 6 + delta, &dst, sizeof(dst)))
- return FALSE;
+ /* rip-relative to next insn */
+ if (!dbg_read_memory((const char*)insn + 2, &delta, sizeof(delta)) ||
+ !dbg_read_memory((const char*)insn + 6 + delta, &dst, sizeof(dst)))
+ return FALSE;
- callee->Offset = dst;
- return TRUE;
- }
+ callee->Offset = dst;
+ return TRUE;
WINE_FIXME("Unsupported yet call insn (0xFF 0x%02x) at %p\n", ch, insn);
return FALSE;
default:
--
Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120205/98f7039c/attachment.ksh>
More information about the wine-patches
mailing list