This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Commit 90af06793e breaks RISC-V native target


Hi, 

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() {
        printf("Test\n");
        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
(gdb)

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
GDB?

Best, Jan



[1] https://github.com/janvrany/riscv-linux/tree/users/jv/riscv-linux-4.15


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]