riscv: gdb cannot connect to rtems runnin in qemu

Joel Sherrill joel at rtems.org
Fri Jan 29 13:49:01 UTC 2021

On Fri, Jan 29, 2021 at 7:20 AM <Jan.Sommer at dlr.de> wrote:

> Hello
> I just tried to debug a riscv test program running in qemu.
> However, gdb could not establish a connection to qemu and produced the
> following error:
> /tmp/rtems/riscv❯ riscv-rtems6-gdb ticker.exe
> GNU gdb (GDB)
> [..]
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from
> /tools/modulesystem/tools/rtems/rtems6/install/bsps/riscv-rtems6/grv32imafdc-smp/testsuites/samples/ticker.exe...
> (gdb) target remote :1234
> Remote debugging using :1234
> bfd requires flen 8, but target has flen 4

griscv are Jiri's BSPs and should run on sis and be able to be debugged
that way.

He should know if they worked on qemu and he was able to connect gdb.

Otherwise, this looks like a potential mismatch of 32 and 64 bit stuff like
wasn't built with both 32 and 64 bit riscv support. Which seems odd to me
because it lives in the same repo as binutils and should have a comparable
build of binutils.

> The tools and rtems are built from master a couple of days ago.
> I used the following command line for qemu (v. 4.2.0):
> qemu-system-riscv32 -nographic -machine virt -m 2G -nographic -net none
> -serial mon:stdio -bios /tmp/riscv/ticker.exe -s -S
> Does anyone have a hint if the problem is with qemu, gdb or rtems?
> Without gdb the program runs normally in qemu.
> Best regards,
>     Jan
> Deutsches Zentrum für Luft- und Raumfahrt e. V. (DLR)
> German Aerospace Center
> Institute for Software Technology | Software for Space Systems and
> Interactive Visualization | Lilienthalplatz 7 | 38108 Braunschweig | Germany
> Jan Sommer
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20210129/b9cfcebe/attachment.html>

More information about the users mailing list