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 module to activate frames #113

Open
vinipsmaker opened this issue Aug 6, 2019 · 3 comments
Open

GDB module to activate frames #113

vinipsmaker opened this issue Aug 6, 2019 · 3 comments

Comments

@vinipsmaker
Copy link

Folly's fibers (based on Boost.Context) have a GDB script to debug fibers. The script only has a few helpers to list fibers and inspect a fiber.

Once we find a valid pointer to a boost::context::fiber in the debugging session, it'd be useful to have two simple GDB commands to inspect its call stack. The lines related to this feature in the Facebook script are: https://github.com/facebook/folly/blob/85465c8ef64be895bd15a0a315f3698fb5dc685f/folly/fibers/scripts/gdb.py#L191-L247 (supporting documentation)

@olk
Copy link
Member

olk commented Apr 24, 2020

I'm not familiar with GDB scipts...
you are welcome to provide a patch that supports GDB scripts

@vinipsmaker
Copy link
Author

[patches welcome]

Good. Would x86-only support be okay for the scripts?

@lenerd
Copy link

lenerd commented Apr 24, 2020

Hi,

for debugging of some code using Boost.Fiber, I wrote some custom GDB commands for e.g. finding the scheduler object, listing the running worker fibers and their backtraces, as well as switching the context to a fiber.

The code is available at here, but so far it has not been documented nor tested much (besides my own debugging sessions). Feel free to take a look. So far it requires Boost compiled in debug mode and is specific to x86-64.

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

3 participants