ghidra
ghidra copied to clipboard
Improve sleigh error reporting
This improves error reporting from the sleigh
language parser.
- making the
calc_mask()
size
parameter unsigned prevents sleigh from just crashing with
terminate called after throwing an instance of 'std::out_of_range'
what(): map::at
Aborted (core dumped)
- the other commit adds location information to sleigh error messages, improving the above error to
vax.slaspec:379 - ERROR Error: Pattern size cannot vary (missing '...'?): for table "instruction" constructor starting at line 373
No output produced
Thanks for submitting this, I'll take a look.
One thing to note is that there is also a java sleigh compiler ghidra.pcodeCPort.slgh_compile.SleighCompile
which should also have the new error messages.
If java's not your thing I can add them myself.
Oh, two sleigh compiler implementations 🙈 Time to drop one ? 🤔 I'll see what I can do but I'm not a Java programmer.