From 1e6f2ea0d22f38fa1e96af0659786cfcbdfb5d31 Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Wed, 27 Jun 2018 09:29:24 +0200 Subject: [PATCH] scripts/symbolize.py: remove spurious output '(out/arm/core/tee.elf)' When a TA dump is processed, there is a list of ELF files just before the call stack. However, when analyzing a TEE core dump, there is no such list. Make sure this situation is properly handled to avoid displaying a spurious message. This means fixing incorrect indentation in a conditional. Signed-off-by: Jerome Forissier Acked-by: Jens Wiklander --- scripts/symbolize.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/symbolize.py b/scripts/symbolize.py index abed7ba6f58..1eecf758d3d 100755 --- a/scripts/symbolize.py +++ b/scripts/symbolize.py @@ -394,13 +394,14 @@ def write(self, line): for k in self._elfs: e = self._elfs[k] if (len(e) >= 3): + # TA executable or library self._out.write(e[2].strip()) - elf = self.get_elf(e[0]) - if elf: - rpath = os.path.realpath(elf) - path = self.pretty_print_path(rpath) - self._out.write(' (' + path + ')') - self._out.write('\n') + elf = self.get_elf(e[0]) + if elf: + rpath = os.path.realpath(elf) + path = self.pretty_print_path(rpath) + self._out.write(' (' + path + ')') + self._out.write('\n') # Here is a good place to resolve the abort address because we # have all the information we need if self._saved_abort_line: