summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2018-12-14 11:08:38 +0000
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2019-01-25 12:47:58 +0000
commit3ec5afd8d2d5b9457820ef0725997bb40b701c7b (patch)
tree1fc5cfd1acaf3821fd6ba150efef11875c3b7942
parent48f38293c00e0b4e6b575a5cd5ce71cc076a60d5 (diff)
downloadgem5-3ec5afd8d2d5b9457820ef0725997bb40b701c7b.tar.xz
arch: Provide traceback when parsing ISA code
There is no line information When the ISA code is executed inside the isa_parser environment and an error is encountered. The build stops and reports the line of the let block containing the error. This patch is enhacing the error reporting by printing the traceback of the faulting ISA code. Change-Id: I3acd17f0d78b2feb8fe6e48808a094c5b81624e6 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15595 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
-rwxr-xr-xsrc/arch/isa_parser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py
index 9ac761279..bd46216de 100755
--- a/src/arch/isa_parser.py
+++ b/src/arch/isa_parser.py
@@ -1939,6 +1939,7 @@ del wrap
try:
exec split_setup+fixPythonIndentation(t[2]) in self.exportContext
except Exception, exc:
+ traceback.print_exc(file=sys.stdout)
if debug:
raise
error(t.lineno(1), 'In global let block: %s' % exc)