Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDB and Python #68

Closed
ThorKn opened this issue Jan 28, 2021 · 2 comments
Closed

GDB and Python #68

ThorKn opened this issue Jan 28, 2021 · 2 comments
Milestone

Comments

@ThorKn
Copy link
Collaborator

ThorKn commented Jan 28, 2021

Today i tried to extend the functionality for the (riscv-)GDB with the following project:
https://github.com/cyrus-and/gdb-dashboard
For running this dashboard, the GDB must have Python support enabled (done while compiling the GDB).

Issue:
The actual (riscv-)GDB build does not support Python.

Reproduce:
start (riscv-)GDB and try to run Python.

$ riscv64-unknown-elf-gdb
(gdb) py print("hello")
Python scripting is not supported in this copy of GDB.

Possible hint:
riscv-collab/riscv-gnu-toolchain#722

@ThorKn
Copy link
Collaborator Author

ThorKn commented Jan 28, 2021

Further comments:

I see this not as an high priority error in the VM. It is a "nice to have" for development in C. And it's kind of standard to have Python scripting enabled in GDB.

It might become important during the QuantumRisc project to "pimp" the GDB. Maybe for measuring or counting cycles and instructions or such.

The gdb-dashboard does not have to be part of the VM. Developers should only be able to install it themself.

@sea212
Copy link
Owner

sea212 commented Feb 4, 2021

This can be worked around by installing the apt package python-is-python3. The package is installed automatically since commit 07acf2c03d3c96f0ba85c9aaf206f43fb76611a9. To take effect during the build of riscv-gdb, the operator must execute build_tools/install_build_essentials.sh before building gdb. To reduce the margin of error, I'm going to add python-is-python3 to build_tools/riscv_tools/install_riscv_essentials.sh

@sea212 sea212 added this to the 2.0.0 milestone Feb 4, 2021
@sea212 sea212 closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants