Created
August 16, 2017 02:02
-
-
Save ibigbug/de987e6845cbb7cbf8be2fc0c46d66b1 to your computer and use it in GitHub Desktop.
gdb python extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gdb | |
class HeapdumpCmd(gdb.Command): | |
"""Do a heap dump""" | |
def __init__(self): | |
gdb.Command.__init__(self, "mdump", gdb.COMMAND_STACK, gdb.COMPLETE_NONE) | |
def invoke(self, _arg, _from_tty): | |
v = gdb.parse_and_eval("'runtime.mbuckets'") | |
print(v.address.cast) | |
HeapdumpCmd() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment