The instructions mentioned here are not enough to enable gdb with tui on Ubuntu 20.04 LTS.
The steps need to be updated. Here is what I had to do,
I had to install libncurses5-dev first. This isn't pre-installed on Ubuntu 20.04 LTS.
Then build riscv-gnu-toolchain from source -> here
After that I had to use riscv64-unknown-linux-gnu-gdb -tui, then I could debug with TUI option.
I also had to make changes to the CFLAGS option and had to add -gdwarf-2 option because on inspecting the local variables in gdb with info locals command, it was giving CORRUPTED DWARF EXPRESSION error.
IMO, the instructions in the tools page need to be updated with the above instructions.
Thanks.
The instructions mentioned here are not enough to enable
gdb
withtui
on Ubuntu 20.04 LTS. The steps need to be updated. Here is what I had to do,libncurses5-dev
first. This isn't pre-installed on Ubuntu 20.04 LTS.riscv-gnu-toolchain
from source -> hereriscv64-unknown-linux-gnu-gdb -tui
, then I could debug with TUI option.I also had to make changes to the
CFLAGS
option and had to add-gdwarf-2
option because on inspecting the local variables in gdb withinfo locals
command, it was givingCORRUPTED DWARF EXPRESSION
error.IMO, the instructions in the
tools
page need to be updated with the above instructions. Thanks.