From c90f9b9ef3ff1515d3a35041ca56c1fa12ea35da Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 21 Jul 2009 15:10:58 +0000 Subject: [PATCH] Correctly recognize the "call r/m32" opcode. There are three opcode bits in the second byte, which we didn't check, thus incorrectly identifying some other instructions as calls. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31674 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/debugger/arch/x86/ArchitectureX86.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/debugger/arch/x86/ArchitectureX86.cpp b/src/apps/debugger/arch/x86/ArchitectureX86.cpp index eeab3596dc..776b5ac731 100644 --- a/src/apps/debugger/arch/x86/ArchitectureX86.cpp +++ b/src/apps/debugger/arch/x86/ArchitectureX86.cpp @@ -558,7 +558,7 @@ ArchitectureX86::GetInstructionInfo(target_addr_t address, return error; instruction_type instructionType = INSTRUCTION_TYPE_OTHER; - if (buffer[0] == 0xff) { + if (buffer[0] == 0xff && (buffer[1] & 0x34) == 0x10) { // absolute call with r/m32 instructionType = INSTRUCTION_TYPE_SUBROUTINE_CALL; } else if (buffer[0] == 0xe8 && instructionSize == 5) {