scripts/symbolize.py: strip cwd from file paths by default
It is quite common to invoke symbolize.py from a top-level directory
which contains the source code of OP-TEE as well as of Trusted
Applications. In this case, it is convenient to strip the directory
from all the paths reported by the script.
Therefore, make this behavior the default. In other words, '-s $(pwd)'
is now implied. One can still obtain full paths by passing '-s' with no
argument.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
diff --git a/scripts/symbolize.py b/scripts/symbolize.py
index 5168203..5b136d0 100755
--- a/scripts/symbolize.py
+++ b/scripts/symbolize.py
@@ -61,8 +61,10 @@
'a TEE Core or pseudo-TA abort, while <TA_uuid>.elf is required '
'if a user-mode TA has crashed. For convenience, ELF files '
'may also be given.')
- parser.add_argument('-s', '--strip_path',
- help='Strip STRIP_PATH from file paths')
+ parser.add_argument('-s', '--strip_path', nargs='?',
+ help='Strip STRIP_PATH from file paths (default: current directory, '
+ 'use -s with no argument to show full paths)',
+ default=os.getcwd())
return parser.parse_args()