Home | History | Annotate | Download | only in ArmDisassemblerLib
      1 /** @file
      2   Default exception handler
      3 
      4   Copyright (c) 2014, ARM Limited. All rights reserved.
      5 
      6   This program and the accompanying materials
      7   are licensed and made available under the terms and conditions of the BSD
      8   License which accompanies this distribution.  The full text of the license may
      9   be found at http://opensource.org/licenses/bsd-license.php
     10 
     11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     13 
     14 **/
     15 
     16 #include <Base.h>
     17 #include <Library/BaseLib.h>
     18 #include <Library/PrintLib.h>
     19 #include <Library/ArmDisassemblerLib.h>
     20 
     21 /**
     22   Place a disassembly of of **OpCodePtr into buffer, and update OpCodePtr to
     23   point to next instruction.
     24 
     25   @param  OpCodePtrPtr  Pointer to pointer of instruction to disassemble.
     26   @param  Thumb         TRUE for Thumb(2), FALSE for ARM instruction stream
     27   @param  Extended      TRUE dump hex for instruction too.
     28   @param  ItBlock       Size of IT Block
     29   @param  Buf           Buffer to sprintf disassembly into.
     30   @param  Size          Size of Buf in bytes.
     31 
     32 **/
     33 VOID
     34 DisassembleInstruction (
     35   IN  UINT8     **OpCodePtr,
     36   IN  BOOLEAN   Thumb,
     37   IN  BOOLEAN   Extended,
     38   IN OUT UINT32 *ItBlock,
     39   OUT CHAR8     *Buf,
     40   OUT UINTN     Size
     41   )
     42 {
     43   // Not yet supported for AArch64.
     44   // Put error in the buffer as we have no return code and the buffer may be
     45   // printed directly so needs a '\0'.
     46   AsciiSPrint (Buf, Size, "AArch64 not supported");
     47   return;
     48 }
     49