riscv-software-src / homebrew-riscv

homebrew (macOS) packages for RISC-V toolchain
https://riscv.org
310 stars 50 forks source link

installed gdb doesn't work #26

Closed shruthb closed 4 years ago

shruthb commented 5 years ago

I get the following output when I run the gdb installed and none of the gdb commands succeed. Also tried searching for the directory that this outputs /usr/local/Cellar/riscv-gnu-toolchain/gnu/share/gdb/python but this really doesn't exist.

c4b301bae501:xv6-19au shruthb$ /usr/local/opt/riscv-gnu-toolchain/bin/riscv64-unknown-elf-gdb                                                                    
Python Exception <type 'exceptions.ImportError'> No module named gdb: 
/usr/local/opt/riscv-gnu-toolchain/bin/riscv64-unknown-elf-gdb: warning: 
Could not load the Python gdb module from `/usr/local/Cellar/riscv-gnu-toolchain/gnu/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.

GNU gdb (GDB) 8.3.0.20190516-git
Copyright (C) 2019 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-apple-darwin17.7.0 --target=riscv64-unknown-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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".
The target architecture is assumed to be riscv:rv64

OS details: mac OS High Sierra 10.13.6

sbeamer commented 4 years ago

More work will be required to make riscv-gdb work with the host Python. We welcome any contributions to help with this.