ArmDisassemblerLib.h 1.4 KB

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