Giacomo Travaglini has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/15595 )
Change subject: arch: Provide traceback when parsing ISA code
......................................................................
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 <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/15595
Maintainer: Jason Lowe-Power <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
---
M src/arch/isa_parser.py
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks
good to me, approved
Andreas Sandberg: Looks good to me, approved
diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py
index 9ac7612..bd46216 100755
--- a/src/arch/isa_parser.py
+++ b/src/arch/isa_parser.py
@@ -1939,6 +1939,7 @@
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)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15595
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I3acd17f0d78b2feb8fe6e48808a094c5b81624e6
Gerrit-Change-Number: 15595
Gerrit-PatchSet: 3
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Anthony Gutierrez <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev