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

enable Python support in GDB #5

Open
slightlyunconventional opened this Issue Jul 13, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@slightlyunconventional
Copy link

slightlyunconventional commented Jul 13, 2017

The aarch64--glibc--stable gdb says:

(gdb) python
>end
Scripting in the "Python" language is not supported in this copy of GDB.

There are some pretty important tools distributed as GDB Python scripts, such as Linux's gdb scripts (including dmesg dumper), and this one-off debug a relocated executable script.

Please enable Python support in GDB. Thanks!

@slightlyunconventional

This comment has been minimized.

Copy link

slightlyunconventional commented Feb 21, 2018

This change works for me:

--- aarch64--glibc--bleeding-edge-2017.11-1.defconfig.orig      2018-02-20 17:28:52.567018000 -0800
+++ aarch64--glibc--bleeding-edge-2017.11-1.defconfig   2018-02-20 17:28:56.780343000 -0800
@@ -8,6 +8,7 @@
 BR2_GCC_VERSION_7_X=y
 BR2_TOOLCHAIN_BUILDROOT_CXX=y
 BR2_PACKAGE_HOST_GDB=y
+BR2_PACKAGE_HOST_GDB_PYTHON=y
 BR2_GDB_VERSION_8_0=y
 BR2_INIT_NONE=y
 # BR2_PACKAGE_BUSYBOX is not set

The same config option can be enabled for the "stable" (2017.05) toolchain, but I can understand if you only want to enable new features in a future release.

@slightlyunconventional

This comment has been minimized.

Copy link

slightlyunconventional commented Jul 5, 2018

Patch for toolchains-builder.git:

config: enable host-gdb's Python interpreter

There are some pretty important tools distributed as GDB Python scripts, such
as Linux's gdb scripts (including dmesg dumper).

Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>

diff --git a/configs/optionals/*.config b/configs/optionals/*.config
--- a/configs/optionals/*.config
+++ b/configs/optionals/*.config
@@ -1,2 +1,3 @@
 BR2_PACKAGE_HOST_GDB=y
+BR2_PACKAGE_HOST_GDB_PYTHON=y
 BR2_PACKAGE_GDB=y

@tpetazzoni, would you apply it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment