Commit 90af06793e breaks RISC-V native target

Jan Vrany
Tue Jan 8 10:26:00 GMT 2019


I realized that commit 

0af06793e gdb/riscv: Improve logic for when h/w float abi should be used

broke GDB on RISC-V using native target (at least for me):

#include <stdio.h>
int main() {
        return 0;

./gdb ~/tmp/test
Reading symbols from /home/jv/tmp/test...
(gdb) b main
Breakpoint 1 at 0x5fe: file test.c, line 4.
(gdb) r
Starting program: /home/jv/tmp/test
[1]+  Stopped                 ./gdb/gdb ~/tmp/test
bfd requires flen 8, but target has flen 0

This is in Debian RISC-V using 4.15 kernel (commit c9dc587367 from [1] which 
is essentially SiFive's 4.15 kernel used on Unleashed plus few patches apparently
needed to make GDB native target working). 

I've got the same error when running under QEMU and on SiFive's Unleashed board. 
Previous commit - 13f2ed32e1 - works fine for me. 

I assume things are working for RISC-V guys, so likely I'm missing some bits.
Do I need to apply more kernel patches (if so, which ones?) Anything else to 
patch or update in order to make native RISC-V target working again with recent

Best, Jan


More information about the Gdb mailing list