Skip to content

gdb macros for interacting with liballocs #142

@stephenrkell

Description

@stephenrkell

I often use liballocs from the debugger to debug issues (... issues with liballocs, normally, but hopefully it generalises).

I can do this because I understand liballocs's data structures. It would be nice to have some gdb macros that make this friendlier. E.g. perhaps the macros could be something like this:

  • whatis x: prints uniqtype information for x
  • whereis x: prints allocation containment information for x, from memory mappings down
  • whyis x: summarise allocation site / callchain of x (we currently don't keep callchains, but might)
  • others?

... all have the ambiguity that x might be a pointer or an lvalue, i.e. it's not clear whether to strip a level of indirection from x. Probably, for uniformity, x should be an lvalue and any liballocs query we issue would be on the pointer &x.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions