From 77be16c8343330b509ba73acf1d2a92b93512310 Mon Sep 17 00:00:00 2001 From: Vasily Levchenko Date: Wed, 14 Nov 2018 12:41:05 +0300 Subject: [PATCH] [debugger][lldb] adds command 'print_this' to print '' w/o interacting with C-expression evaluator --- llvmDebugInfoC/src/scripts/konan_lldb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvmDebugInfoC/src/scripts/konan_lldb.py b/llvmDebugInfoC/src/scripts/konan_lldb.py index 445cbe148ed..faa8305b4ee 100644 --- a/llvmDebugInfoC/src/scripts/konan_lldb.py +++ b/llvmDebugInfoC/src/scripts/konan_lldb.py @@ -272,6 +272,9 @@ class KonanProxyTypeProvider: def __getattr__(self, item): return getattr(self._proxy, item) +def print_this_command(debugger, command, result, internal_dict): + pthis = lldb.frame.FindVariable('') + print pthis def __lldb_init_module(debugger, _): __FACTORY['object'] = lambda x: KonanObjectSyntheticProvider(x) @@ -292,3 +295,4 @@ def __lldb_init_module(debugger, _): --category Kotlin\ ') debugger.HandleCommand('type category enable Kotlin') + debugger.HandleCommand('command script add -f {}.print_this_command print_this'.format(__name__))