-
-
Save andrey-str/4b40e1b6a0e0fed34cdc 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
import lldb | |
def __lldb_init_module(debugger, internal_dict): | |
debugger.HandleCommand('type summary add QString -F lldb_qt.QString_summary') | |
debugger.HandleCommand('type summary add QUuid -F lldb_qt.QUuid_summary') | |
print 'lldb_qt.py has been loaded and is ready for use.' | |
def QString_summary(value, internal_dict): | |
name = value.GetName() | |
deref = '->' if value.TypeIsPointerType() else '.' | |
return value.frame.EvaluateExpression(name + deref + 'toStdString()').GetSummary() | |
def QUuid_summary(value, internal_dict): | |
name = value.GetName() | |
deref = '->' if value.TypeIsPointerType() else '.' | |
return value.frame.EvaluateExpression(name + deref + 'toString().toStdString()').GetSummary() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment