[PATCH 1/1] riscv: Add missing disassembler option `max`

Jan Beulich jbeulich@suse.com
Tue Mar 25 14:37:26 GMT 2025


On 25.03.2025 15:21, Marek Pikula wrote:
> On 25.03.2025 15:07, Jan Beulich wrote:
>> Before something like this is exposed, shouldn't it first be defined what
>> "maximum" here actually means? Even standard extensions already overlap,
>> so there isn't an obvious "disassemble everything we know of".
> As far as I understand the current behaviour, the disassembler uses the 
> first match it can find, so in a way it'sa best effort mode.

The first match it can find that also satisfies the presently enabled ISA
extensions, aiui. That extra constraint is what I understand you want to
suppress with the "max" option. Am I somehow mistaken there?

> Maybe 
> providing this information in the `riscv_options` description would be 
> enough?
>> Furthermore I think such an addition would want to come with a doc
>> adjustment as well. Sadly RISC-V's -M options look to be entirely
>> undocumented at this point. Yet as per above clarifying to the user what
>> to expect is quite relevant here.
> For me, in terms of documentation, it's enough to see the descriptions 
> present in `riscv_options` (and thus with `show disassembler-options` 
> GDB command), but indeed it was hard to find at first. I don't think 
> that extending documentation is in scope of this patch, but if you wish, 
> I could work on extending the documentation if you point me where such a 
> change should happen.

That's binutils/doc/binutils.texi. Adding documentation is always in scope
of adding a new command line (sub)option. What's not in scope here is the
previously missing documentation on pre-existing -M options. That's perhaps
more of a request to the RISC-V maintainers (who sadly you didn't even Cc;
no added).

Jan


More information about the Binutils mailing list