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
This commit is contained in:
oliviermartin
2013-01-25 12:14:09 +00:00
parent 111339d2a2
commit 72efe0271f
4 changed files with 52 additions and 25 deletions

View File

@@ -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
@@ -269,7 +269,7 @@ class FirmwareVolume:
section = ffs.get_next_section(section)
ffs = self.get_next_ffs(ffs)
def load_symbols_at(self, addr):
def load_symbols_at(self, addr, verbose = False):
if self.DebugInfos == []:
self.get_debug_info()
@@ -282,11 +282,16 @@ class FirmwareVolume:
else:
raise Exception('FirmwareVolume','Section Type not supported')
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
return debug_info
def load_all_symbols(self):
def load_all_symbols(self, verbose = False):
if self.DebugInfos == []:
self.get_debug_info()
@@ -298,4 +303,10 @@ class FirmwareVolume:
else:
continue
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