mirror of https://github.com/acidanthera/audk.git
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:
parent
5ee9264acc
commit
778449055f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue