Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Having the position in the asm file where an error occurs, would help when debugging large files.

e.g.

thread 'main' panicked at src/vm.rs:593:13:
attempting to access data of type u64 at unaligned address

does not tell me where from the asm it failed and makes it hard to figure it out when the file has 12k+ lines :)

You must be logged in to vote

Replies: 1 comment · 1 reply

Comment options

Hi Pierre. I agree it would be useful to have better error messages. Did you write 12K lines of asm by hand? 😮

To know the line in the input where the error came from, we would need to keep a mapping from input files in the asm file to positions in executable memory (.code).

One thing that may be a little bit helpful in the mean time is that if you run UVM with RUST_BACKTRACE=1, e.g.

RUST_BACKTRACE=1 cargo run my_program.asm

You should at least be able to see which instruction is causing the error.

You must be logged in to vote
1 reply
@pierrec
Comment options

Ah no it was generated :)
Yes I can see what instruction caused it (a badly generated address that gets LOAD'ed) but unfortunately it does not happen all the time, so I need to dig into which LOAD is invalid. Will do that next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.