2013-01-25 12:28:06 +01:00
|
|
|
/** @file
|
|
|
|
|
|
|
|
Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
|
|
|
|
|
2019-04-04 01:03:18 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2013-01-25 12:28:06 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
2021-04-20 13:00:23 +02:00
|
|
|
#ifndef ARM_DISASSEMBLER_LIB_H_
|
|
|
|
#define ARM_DISASSEMBLER_LIB_H_
|
2013-01-25 12:28:06 +01:00
|
|
|
|
|
|
|
/**
|
2019-02-06 16:39:35 +01:00
|
|
|
Place a disassembly of **OpCodePtr into buffer, and update OpCodePtr to
|
|
|
|
point to next instruction.
|
2014-08-19 15:29:52 +02:00
|
|
|
|
|
|
|
We cheat and only decode instructions that access
|
2013-01-25 12:28:06 +01:00
|
|
|
memory. If the instruction is not found we dump the instruction in hex.
|
2014-08-19 15:29:52 +02:00
|
|
|
|
|
|
|
@param OpCodePtrPtr Pointer to pointer of ARM Thumb instruction to disassemble.
|
2013-01-25 12:28:06 +01:00
|
|
|
@param Thumb TRUE for Thumb(2), FALSE for ARM instruction stream
|
|
|
|
@param Extended TRUE dump hex for instruction too.
|
2010-02-05 07:50:09 +01:00
|
|
|
@param ItBlock Size of IT Block
|
2013-01-25 12:28:06 +01:00
|
|
|
@param Buf Buffer to sprintf disassembly into.
|
2014-08-19 15:29:52 +02:00
|
|
|
@param Size Size of Buf in bytes.
|
|
|
|
|
2013-01-25 12:28:06 +01:00
|
|
|
**/
|
|
|
|
VOID
|
|
|
|
DisassembleInstruction (
|
|
|
|
IN UINT8 **OpCodePtr,
|
|
|
|
IN BOOLEAN Thumb,
|
|
|
|
IN BOOLEAN Extended,
|
2010-02-05 07:50:09 +01:00
|
|
|
IN OUT UINT32 *ItBlock,
|
2013-01-25 12:28:06 +01:00
|
|
|
OUT CHAR8 *Buf,
|
|
|
|
OUT UINTN Size
|
|
|
|
);
|
2014-08-19 15:29:52 +02:00
|
|
|
|
2021-04-20 13:00:23 +02:00
|
|
|
#endif // ARM_DISASSEMBLER_LIB_H_
|