summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Scripts/Ds5/system_table.py
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-25 12:14:09 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-25 12:14:09 +0000
commit72efe0271fa61bd4ab89995c9f6ef29be51ed20c (patch)
treed7d378efb278af7835f712118c71e1cb6dba6481 /ArmPlatformPkg/Scripts/Ds5/system_table.py
parent111339d2a29309bee03f9028f264654e0e1d4ddd (diff)
downloadedk2-72efe0271fa61bd4ab89995c9f6ef29be51ed20c.tar.gz
edk2-72efe0271fa61bd4ab89995c9f6ef29be51ed20c.tar.bz2
edk2-72efe0271fa61bd4ab89995c9f6ef29be51ed20c.zip
ArmPlatformPkg/Scripts: Added '--verbose' support to DS-5 scripts
Verbose mode can also be enabled by the shorter argument '-v' Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14100 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Scripts/Ds5/system_table.py')
-rw-r--r--ArmPlatformPkg/Scripts/Ds5/system_table.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/ArmPlatformPkg/Scripts/Ds5/system_table.py b/ArmPlatformPkg/Scripts/Ds5/system_table.py
index 8dec591e63..3e7f6ab015 100644
--- a/ArmPlatformPkg/Scripts/Ds5/system_table.py
+++ b/ArmPlatformPkg/Scripts/Ds5/system_table.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+# Copyright (c) 2011-2013, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -48,7 +48,7 @@ class DebugInfoTable:
self.DebugInfos.append((image_base,image_size))
# Return (base, size)
- def load_symbols_at(self, addr):
+ def load_symbols_at(self, addr, verbose = False):
if self.DebugInfos == []:
self.get_debug_info()
@@ -57,7 +57,12 @@ class DebugInfoTable:
if (addr >= debug_info[0]) and (addr < debug_info[0] + debug_info[1]):
section = firmware_volume.EfiSectionPE32(self.ec, debug_info[0])
- edk2_debugger.load_symbol_from_file(self.ec, section.get_debug_filepath(), section.get_debug_elfbase())
+ try:
+ edk2_debugger.load_symbol_from_file(self.ec, section.get_debug_filepath(), section.get_debug_elfbase(), verbose)
+ except Exception, (ErrorClass, ErrorMessage):
+ if verbose:
+ print "Error while loading a symbol file (%s: %s)" % (ErrorClass, ErrorMessage)
+ pass
found = True
return debug_info
@@ -65,14 +70,19 @@ class DebugInfoTable:
if found == False:
raise Exception('DebugInfoTable','No symbol found at 0x%x' % addr)
- def load_all_symbols(self):
+ def load_all_symbols(self, verbose = False):
if self.DebugInfos == []:
self.get_debug_info()
for debug_info in self.DebugInfos:
section = firmware_volume.EfiSectionPE32(self.ec, debug_info[0])
- edk2_debugger.load_symbol_from_file(self.ec, section.get_debug_filepath(), section.get_debug_elfbase())
+ try:
+ edk2_debugger.load_symbol_from_file(self.ec, section.get_debug_filepath(), section.get_debug_elfbase(), verbose)
+ except Exception, (ErrorClass, ErrorMessage):
+ if verbose:
+ print "Error while loading a symbol file (%s: %s)" % (ErrorClass, ErrorMessage)
+ pass
def dump(self):
self.get_debug_info()