logic / sh2dis

An SH2-compatible (Renesas SuperH) disassembler.
http://code.logic.net/sh2dis/
23 stars 4 forks source link

Should be optional warnings for common issues #5

Open logic opened 6 years ago

logic commented 6 years ago

A common problem is branch instructions with ambiguous targets (JSR is register-relative, and we don't always have strict confidence about the value of a register). It would be useful to have a CLI argument that calls out issues like this, where we know something isn't right but don't know what to do about it, so that the user might be able to figure something out.

Something like --warn is probably good enough to start with (we could add levels if we start winding up with more warning conditions, but if this is all we have off the bat, no sense making it complicated right off the bat).

Alternatively, we could just output warnings to stderr by default, and not worry about a CLI flag at all.