Created
May 18, 2016 12:16
-
-
Save rolfbjarne/45ce9d7ca0773784f45bc773e74cda23 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/python | |
import lldb | |
def monobt(debugger, command, result, dict): | |
target = debugger.GetSelectedTarget() | |
process = target.GetProcess() | |
thread = process.GetSelectedThread() | |
for frame in thread: | |
pc = str(frame.GetPCAddress()) | |
if pc[0] == '0': | |
try: | |
print 'frame #' + str(frame.GetFrameID()) + ': ' + pc + frame.EvaluateExpression('(char*)mono_pmip((void*)' + pc + ')').GetSummary()[1:-1] | |
except: | |
print frame | |
else: | |
print frame | |
return None | |
def __lldb_init_module (debugger, dict): | |
# This initializer is being run from LLDB in the embedded command interpreter | |
# Add any commands contained in this module to LLDB | |
debugger.HandleCommand('command script add -f monobt.monobt monobt') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment