-
Notifications
You must be signed in to change notification settings - Fork 29
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
Improved stack trace in Pallene using Pallene Tracer #597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to looked at the debug_traceback implementation, but might only be able to do so tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, the overall idea looks pretty good to me.
Some minor feedback.
I have committed another change which fixes/enhances to the code in matter. One problem I think we got, is the Pallene tracer line number is not quite correct. Any insights on this? @hugomg @srijan-paul |
fprintf(stderr, "Runtime error: %s\nStack traceback: \n", message); | ||
|
||
/* Lua: 1, Pallene: 0 */ | ||
int context = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can structure our traversal as two nested loops and get rid of the context flag and some of the gotos.
for each frame in the Lua stack
if this frame is linked to the Pallene stack
for each frame in the Pallene stack block
print C frame
else
print Lua frame
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doable.
Changes were addressed / srijan is on sick leave
Initial commits on Pallene Tracer implementation in Pallene compiler for improved stack-traces using a separate debug traceback function
pallene_tracer_debug_traceback
.The Pallene Tracer initial design specification can be found here: The Pallene Tracer
Resolves #565