[debugger][lldb] adds command 'print_this' to print '<this>' w/o interacting with C-expression evaluator
This commit is contained in:
@@ -272,6 +272,9 @@ class KonanProxyTypeProvider:
|
|||||||
def __getattr__(self, item):
|
def __getattr__(self, item):
|
||||||
return getattr(self._proxy, item)
|
return getattr(self._proxy, item)
|
||||||
|
|
||||||
|
def print_this_command(debugger, command, result, internal_dict):
|
||||||
|
pthis = lldb.frame.FindVariable('<this>')
|
||||||
|
print pthis
|
||||||
|
|
||||||
def __lldb_init_module(debugger, _):
|
def __lldb_init_module(debugger, _):
|
||||||
__FACTORY['object'] = lambda x: KonanObjectSyntheticProvider(x)
|
__FACTORY['object'] = lambda x: KonanObjectSyntheticProvider(x)
|
||||||
@@ -292,3 +295,4 @@ def __lldb_init_module(debugger, _):
|
|||||||
--category Kotlin\
|
--category Kotlin\
|
||||||
')
|
')
|
||||||
debugger.HandleCommand('type category enable Kotlin')
|
debugger.HandleCommand('type category enable Kotlin')
|
||||||
|
debugger.HandleCommand('command script add -f {}.print_this_command print_this'.format(__name__))
|
||||||
|
|||||||
Reference in New Issue
Block a user