Skip to content
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

Com: Show line numbers in run-time exceptions #21

Open
stevewpalmer opened this issue Jan 5, 2025 · 1 comment
Open

Com: Show line numbers in run-time exceptions #21

stevewpalmer opened this issue Jan 5, 2025 · 1 comment

Comments

@stevewpalmer
Copy link
Owner

At present we don't show line numbers when a program crashes at run-time. However we persist line numbers in debug builds so it should be possible, in theory, to extract these from the stack trace and display in the error message.

@stevewpalmer
Copy link
Owner Author

There are some other issues we need to consider:

  1. --debug cannot be used with --run. The latter creates an in-memory dynamic module and debuggable is not a feature of dynamic modules. Instead we need to change the semantics of --run so it always saves and then it runs the generated executable directly from disk. Consequently we can drop support for dynamic modules in Fortran.

  2. The Comal interpreter, however, still requires dynamic modules. However because debugging cannot be added, any run-time exceptions will not have line numbers. One way around this would be for the interpreter to always generate a persistent assembly and run that instead. Interactive statements could be handled by appending to an internal array of lines and executing those lines in sequence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant