mit-pdos / xv6-riscv

Xv6 for RISC-V
Other
6.6k stars 2.38k forks source link

Additional steps required for using tui with gdb in Ubuntu 20.04 LTS for xv6-2021-labs #135

Open sudk1896 opened 1 year ago

sudk1896 commented 1 year ago

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 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.

nbosio1001 commented 1 year ago

Interesting. I am missing riscv64-unknown-linux-gnu-gdb on my system so I run gdb-multiarch. I followed the first two bullet-points.