6ba270fea3df3b0b1854746413b9f8a468ae57af
[mirror_edk2.git] / ArmPkg / Include / Library / ArmDisassemblerLib.h
1 /** @file
2
3 Copyright (c) 2008-2010 Apple Inc. All rights reserved.<BR>
4
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __ARM_DISASSEBLER_LIB_H__
16 #define __ARM_DISASSEBLER_LIB_H__
17
18 /**
19 Place a dissasembly of of **OpCodePtr into buffer, and update OpCodePtr to
20 point to next instructin.
21
22 We cheat and only decode instructions that access
23 memory. If the instruction is not found we dump the instruction in hex.
24
25 @param OpCodePtrPtr Pointer to pointer of ARM Thumb instruction to disassemble.
26 @param Thumb TRUE for Thumb(2), FALSE for ARM instruction stream
27 @param Buf Buffer to sprintf disassembly into.
28 @param Size Size of Buf in bytes.
29
30 **/
31 VOID
32 DisassembleInstruction (
33 IN UINT8 **OpCodePtr,
34 IN BOOLEAN Thumb,
35 OUT CHAR8 *Buf,
36 OUT UINTN Size
37 );
38
39 #endif