mtkcpu icon indicating copy to clipboard operation
mtkcpu copied to clipboard

GDB version that we ship segfaults.

Open bieganski opened this issue 1 year ago • 1 comments

Description

mateusz@test:~/tb/github/mtkcpu$ riscv-none-elf-gdb  -x board/breakpoint_example.gdb  sw/uart_tx/build/uart_tx.elf 
GNU gdb (xPack GNU RISC-V Embedded GCC x86_64) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=riscv-none-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from sw/uart_tx/build/uart_tx.elf...
I'm sorry, Dave, I can't do that.  Symbol format `elf32-littleriscv' unknown.
The target architecture is set to "riscv:rv32".
warning: platform-specific solib_create_inferior_hook did not load initial shared libraries.


Fatal signal: Segmentation fault
----- Backtrace -----
Segmentation fault (core dumped)
mateusz@test:~/tb/github/mtkcpu$ riscv-none-elf-gdb  --version
GNU gdb (xPack GNU RISC-V Embedded GCC x86_64) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Workaround

The workaround is to use gdb-multiarch (apt-get install gdb-multiarch).

mateusz@test:~$ gdb-multiarch --version
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

bieganski avatar Aug 05 '24 11:08 bieganski

cc @baiobelfer

bieganski avatar Aug 05 '24 11:08 bieganski