]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Scripts/Ds5/edk2_debugger.py
ArmPlatformPkg/Ds5: Added Aarch64 support
[mirror_edk2.git] / ArmPlatformPkg / Scripts / Ds5 / edk2_debugger.py
index 4867af1938d703a1dfc5ff1c2931b0be07642cd5..b6108d6a19454ecd71458a4d164461864fdb5fa1 100644 (file)
@@ -66,7 +66,15 @@ def load_symbol_from_file(ec, filename, address, verbose = False):
             ec.getImageService().addSymbols(filename, address)\r
         except:\r
             print "Warning: not possible to load symbols from %s at 0x%x" % (filename, address)\r
-            pass\r
+\r
+def is_aarch64(ec):\r
+    success = True\r
+    try:\r
+        # Try to access a Aarch64 specific register\r
+        ec.getRegisterService().getValue('X0')\r
+    except:\r
+        success = False\r
+    return success\r
 \r
 class ArmPlatform:\r
     def __init__(self, sysmembase=None, sysmemsize=None, fvs={}):\r
@@ -189,8 +197,11 @@ class ArmPlatformDebugger:
                     if (pc >= debug_info[0]) and (pc < debug_info[0] + debug_info[1]):\r
                         found = True\r
                 if found == False:\r
-                    info = self.debug_info_table.load_symbols_at(pc)\r
-                    debug_infos.append(info)\r
+                    try:\r
+                        info = self.debug_info_table.load_symbols_at(pc)\r
+                        debug_infos.append(info)\r
+                    except:\r
+                        pass\r
                 \r
             #self.debug_info_table.load_symbols_at(pc)\r
         else:\r
@@ -218,4 +229,3 @@ class ArmPlatformDebugger:
         except:\r
             # Debugger exception could be excepted if DRAM has not been initialized or if we have not started to run from DRAM yet\r
             print "Note: no symbols have been found in System Memory (possible cause: the UEFI permanent memory has been installed yet)"\r
-            pass\r