'Running gdb on xv6-riscv-fall19
So I follow the commands on the website.
I open one windows and I used the command: sudo make qemu-gdb
. And it asked me to use another terminal to start gdb.
When I used the gdb provided by the Linux system. It shows this error message:
.gdbinit:2: Error in sourced command file:
Undefined item: "riscv:rv64".
What should I do to fix the issue?
Solution 1:[1]
You need to use riscv64-unknown-elf-gdb instead of gdb. It would be installed in your system when you install riscv-gnu-toolchain specified in xv6 site.
Solution 2:[2]
use /usr/bin/gdb-multiarch
instead
Solution 3:[3]
Your gdb version should be 8.3 and later
Solution 4:[4]
Replace all gdb
with riscv64-unknown-elf-gdb
when you are following the textbook and you should be good to go.
You can also run
riscv64-unknown-elf-gdb --version
to check the availability of this command. If something is not right, see this page to re-install the toolchain. (Remember to make clean
before re-making to clean the temporary files.)
Solution 5:[5]
riscv64-unknown-elf-gdb didn't come with the riscv-gnu-toolchain for me. Using gdb-multiarch in ubuntu 18 works for me.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | KSSS |
Solution 2 | tempUser |
Solution 3 | zhou zhou |
Solution 4 | XH L |
Solution 5 | vincent317 |