[PATCH] RISC-V: Fix gdbserver problem with handling arch strings.
Palmer Dabbelt via binutils
binutils@sourceware.org
Thu Jan 30 15:41:00 GMT 2020
On Fri, 24 Jan 2020 13:32:13 GMT (+0000), macro@wdc.com wrote:
> On Thu, 23 Jan 2020, Jim Wilson wrote:
>
>> Maciej reported a problem found by his RISC-V gdbserver port.
>> warning: while parsing target description (at line 4): Target description specified unknown architecture "riscv:rv64id"
>> warning: Could not load XML target description; ignoring
>>
>> We only have two arches defined, riscv:rv32 and riscv:rv64. Both bfd and
>> gdb are creating arch strings that have extension letters added to the base
>> architecture. The bfd_default_scan function requires an exact match, so
>> these strings fail to map to a bfd_arch. I think we should ignore the
>> extension letters in a RISC-V specific scan function.
>
> I think it's an acceptable solution short-term; after all it's not going
> to regress functionality. However ultimately I think we ought to actually
> interpret these suffix letters and arm the disassembler accordingly.
>
>> Tested with riscv{32,64}-{elf,linux} cross build and test with no regressions.
>
> I'll push it through GDB testing with `gdbserver' yet, once my current
> native testing has completed (which BTW will take till the end of today
> only as it seems to run ~4 times faster now; presumably some test cases do
> not time out anymore).
>
>> Not committed yet in case anyone wanted to comment on it before I check it in.
>
> I'd suggest naming the new function `riscv_scan' or suchlike, even though
> it's static, so as not to pollute the generic namespace. We even have a
> precedent already with `riscv_compatible' nearby.
>
> Thanks for the quick fix!
Yep, feel free to commit it -- I still don't have my SSH key set up over here
yet...
Thanks!
>
> Maciej
More information about the Binutils
mailing list