Skip to content

Copy python-gdb.py to /usr/lib/debug to enable use with gdb - #251

Closed
pbabics wants to merge 1 commit into
docker-library:masterfrom
pbabics:feature/python-gdb
Closed

pbabics wants to merge 1 commit into
docker-library:masterfrom
pbabics:feature/python-gdb

Conversation

@pbabics

@pbabics pbabics commented Dec 19, 2017 •

Copy link
Copy Markdown

This is PR for #89

When you want to use GDB with python docker images you have to create your own, because official does not have/support python-gdb script, it is removed during build time of image.

This PR proproses to copy it to /usr/lib/debug/... which is in auto-load safe path. This enables to use commands like py-bt and others in GDB.

Note that to use GDB with attach you have to add SYS_PTRACE capability to container and even compile your own GDB against python source / library.

Closes #89

@pbabics
pbabics force-pushed the feature/python-gdb branch from 0a95f5c to e33e671 Compare January 11, 2018 08:46
@tianon

tianon commented Apr 24, 2018

Copy link
Copy Markdown
Member

Sorry for the delay.

Are there other paths besides /usr/lib/debug that this file could be installed to?

When you say "and even compile your own GDB" -- is that required for this to work? Does Debian's GDB not do the right thing?

@pbabics

pbabics commented Apr 26, 2018

Copy link
Copy Markdown
Author

There are more paths besides /usr/lib/debug but it may vary depending on base system.

GDB may not work when installed from debian package, because it is compiled against python from debian packages. But compiling GDB is pretty simple, so I would leave this for people who need it.

@tianon

tianon commented Jun 23, 2020

Copy link
Copy Markdown
Member

Given that this is very complicated for us to get right, I'm going to (finally 🙇) close this for now, but I'll leave #89 open so that if/when we find a reasonable solution, this can be revisited. ❤️

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

Successfully merging this pull request may close these issues.

include python-gdb.py in base containers

2 participants