scripts/symbolize.py: reset state when a (new) abort message is found
The symbolize script may not process correctly several dumps in a row.
For instance, if you pipe a TA abort followed by a TEE core abort, the
later is not decoded properly because the script still uses the TA
binary to interpret the core stack. Fix this by resetting the state of
the decoder each time an abort line is encountered.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/scripts/symbolize.py b/scripts/symbolize.py
index 772ba2e..89538f7 100755
--- a/scripts/symbolize.py
+++ b/scripts/symbolize.py
@@ -281,6 +281,7 @@
self._arch = None
self._saved_abort_line = ''
self._sections = []
+ self._bin = "tee.elf"
def write(self, line):
if self._call_stack_found:
@@ -322,6 +323,7 @@
self._load_addr = match.group('load_addr')
match = re.search(ABORT_ADDR_RE, line)
if match:
+ self.reset()
# At this point the arch and TA load address are unknown.
# Save the line so We can translate the abort address later.
self._saved_abort_line = line