Created
February 20, 2012 21:39
-
-
Save jfirebaugh/1871632 to your computer and use it in GitHub Desktop.
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 lldb | |
def ruby_value(val, dict): | |
return 'ruby' | |
def __lldb_init_module(debugger, dict): | |
print 'ready!' |
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
~ ♢ lldb ruby | |
Current executable set to 'ruby' (x86_64). | |
(lldb) version | |
LLDB-112 | |
(lldb) type summary add -P VALUE | |
Enter your Python command(s). Type 'DONE' to end. | |
def function (valobj,dict): | |
return 'ruby' | |
DONE | |
Segmentation fault: 11 | |
~ ♢ lldb ruby | |
Current executable set to 'ruby' (x86_64). | |
(lldb) command script import ~/ruby.py | |
ready! | |
(lldb) type summary add -F ruby_value VALUE | |
(lldb) p (VALUE)0 | |
(VALUE) $0 = 0 | |
(lldb) type summary add --python-script "return 'ruby'" VALUE | |
(lldb) p (VALUE)0 | |
(VALUE) $1 = 0 ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment