mipsy
mipsy copied to clipboard
Errors when multiple files loaded should print the file name not just the line number.
error: your program tried to read uninitialised memory
the instruction that failed was:
0x00400150 34 [0x03e00008] jr $ra # jr $ra
this happened because $ra was uninitialised.
>
| the instruction that caused $ra to become uninitialised was:
| 0x00400144 30 [0x8fbf0000] lw $ra, ($sp) # lw $ra, ($sp)
| where:
| $sp = 0x7ffffef8
hmmm... compiler errors should currently handle these well, but definitely not runtime errors. any thoughts on introducing this without adding too much bloat to the diagnostics output?
It definitely can't be inline as
0x00400150 file.s 34 [0x03e00008] jr $ra
Could get ludicrously long.
Possibly change the first line from
error: your program tried to read uninitialised memory
To
error:
in file.s:
your program tried to read uninitialised memory
And if this was caused by an instruction in another file
>
| in file.s:
| the instruction that caused $ra to become uninitialised was:
| 0x00400144 30 [0x8fbf0000] lw $ra, ($sp) # lw $ra, ($sp)
| where:
| $sp = 0x7ffffef8
But only of it's a different file to the one previously listed.