riscvarchive / riscv-fesvr

RISC-V Frontend Server
Other
62 stars 83 forks source link

ignore arguments that start with + #41

Open colinschmidt opened 6 years ago

colinschmidt commented 6 years ago

This causes htif to skip unknown arguments that start with +.

Other arguments that start with - will still issue stderr messages but not stop option parsing.

This is an improvement on current handling where htif will silently treat unknown arguments that start with + as target arguments.

Open to suggestions but this is a strawman for handling https://github.com/freechipsproject/rocket-chip/issues/1194

mwachs5 commented 6 years ago

@seldridge does this make sense with https://github.com/freechipsproject/rocket-chip/pull/1192?

seldridge commented 6 years ago

Yes, they should be mutually exclusive as HTIF argument parsing happens after emulator.cc argument parsing. The PlusArg PR (freechipsproject/rocket-chip#1192) effectively only generates your plusarg struct and the help text based on Chisel code. So, if this PR works with rocket-chip master then the freechipsproject/rocket-chip#1192 shouldn't be an incompatible approach.

Famous last words, however, as I keep delaying testing this with VCS (it's a pain for a variety of reasons...) and there are no regressions that bang on these specific plus args...