--- /dev/null
+/** @file\r
+ Default exception handler\r
+\r
+ Copyright (c) 2014, ARM Limited. All rights reserved.\r
+\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD\r
+ License which accompanies this distribution. The full text of the license may\r
+ be found at http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include <Base.h>\r
+#include <Library/BaseLib.h>\r
+#include <Library/PrintLib.h>\r
+#include <Library/ArmDisassemblerLib.h>\r
+\r
+/**\r
+ Place a disassembly of of **OpCodePtr into buffer, and update OpCodePtr to\r
+ point to next instruction.\r
+\r
+ @param OpCodePtrPtr Pointer to pointer of instruction to disassemble.\r
+ @param Thumb TRUE for Thumb(2), FALSE for ARM instruction stream\r
+ @param Extended TRUE dump hex for instruction too.\r
+ @param ItBlock Size of IT Block\r
+ @param Buf Buffer to sprintf disassembly into.\r
+ @param Size Size of Buf in bytes.\r
+\r
+**/\r
+VOID\r
+DisassembleInstruction (\r
+ IN UINT8 **OpCodePtr,\r
+ IN BOOLEAN Thumb,\r
+ IN BOOLEAN Extended,\r
+ IN OUT UINT32 *ItBlock,\r
+ OUT CHAR8 *Buf,\r
+ OUT UINTN Size\r
+ )\r
+{\r
+ // Not yet supported for AArch64.\r
+ // Put error in the buffer as we have no return code and the buffer may be\r
+ // printed directly so needs a '\0'.\r
+ AsciiSPrint (Buf, Size, "AArch64 not supported");\r
+ return;\r
+}\r
#/** @file\r
-# Semihosting serail port lib\r
+# ARM Disassembler library\r
#\r
-# Copyright (c) 2008, Apple Inc. All rights reserved.<BR>\r
+# Copyright (c) 2008, Apple Inc. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
\r
[Defines]\r
INF_VERSION = 0x00010005\r
- BASE_NAME = SemiHostingSerialPortLib\r
+ BASE_NAME = ArmDisassemblerLib\r
FILE_GUID = 7ACEC173-F15D-426C-8F2F-BD86B4183EF1\r
MODULE_TYPE = BASE\r
VERSION_STRING = 1.0\r
LIBRARY_CLASS = ArmDisassemblerLib\r
\r
\r
-[Sources.common]\r
+[Sources.ARM]\r
ArmDisassembler.c\r
ThumbDisassembler.c\r
\r
+[Sources.AARCH64]\r
+ Aarch64Disassembler.c\r
+\r
[Packages]\r
MdePkg/MdePkg.dec\r
ArmPkg/ArmPkg.dec\r
PrintLib\r
DebugLib\r
PeCoffGetEntryPointLib\r
-\r
-\r