Fix some disasm issues

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9908 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish 2010-02-02 04:34:19 +00:00
parent 5ee9264acc
commit 778449055f
1 changed files with 7 additions and 5 deletions

View File

@ -47,7 +47,7 @@ EblDisassembler (
IN CHAR8 **Argv
)
{
UINT8 *Ptr;
UINT8 *Ptr, *CurrentAddress;
UINT32 Address;
UINT32 Count;
CHAR8 Buffer[80];
@ -57,13 +57,15 @@ EblDisassembler (
}
Address = AsciiStrHexToUintn (Argv[1]);
Count = (Argc > 2) ? (UINT32)AsciiStrHexToUintn (Argv[2]) : 10;
Count = (Argc > 2) ? (UINT32)AsciiStrHexToUintn (Argv[2]) : 20;
Ptr = (UINT8 *)(UINTN)Address;
while (Count-- > 0) {
do {
CurrentAddress = Ptr;
DisassembleInstruction (&Ptr, TRUE, TRUE, Buffer, sizeof (Buffer));
AsciiPrint ("0x%08x: %a", Address, Buffer);
}
AsciiPrint ("0x%08x: %a\n", CurrentAddress, Buffer);
} while (Count-- > 0);
return EFI_SUCCESS;
}