Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/symbolize.py: accept -d <ELF_file> in addition to -d <dir> #1766

Merged
merged 1 commit into from
Sep 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/symbolize.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import argparse
import glob
import os
import re
import subprocess
import sys
Expand Down Expand Up @@ -75,7 +76,8 @@ def get_args():
parser.add_argument('-d', '--dir', action='append', nargs='+',
help='Search for ELF file in DIR. tee.elf is needed to decode '
'a TEE Core or pseudo-TA abort, while <TA_uuid>.elf is required '
'if a user-mode TA has crashed.')
'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')

Expand All @@ -94,6 +96,8 @@ def get_elf(self, elf_or_uuid):
if not elf_or_uuid.endswith('.elf'):
elf_or_uuid += '.elf'
for d in self._dirs:
if d.endswith(elf_or_uuid) and os.path.isfile(d):
return d
elf = glob.glob(d + '/' + elf_or_uuid)
if elf:
return elf[0]
Expand Down