From 307f395d4ffee839dd0bd88c879539428cc31693 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Fri, 11 Nov 2022 12:18:37 -0800 Subject: [PATCH] [lldb] Allow flexible importing of in_call_stack Allow `in_call_stack` to be imported in either of the following ways: ``` command script import path/to/in_call_stack.py command script import lldb.utils.in_call_stack ``` rdar://102249295 Differential Revision: https://reviews.llvm.org/D137860 --- lldb/examples/python/in_call_stack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/examples/python/in_call_stack.py b/lldb/examples/python/in_call_stack.py index 0647f2ca34258..9fd32c0e211d2 100755 --- a/lldb/examples/python/in_call_stack.py +++ b/lldb/examples/python/in_call_stack.py @@ -3,7 +3,7 @@ def __lldb_init_module(debugger, internal_dict): debugger.HandleCommand( - 'command alias in_call_stack breakpoint command add --python-function in_call_stack.in_call_stack -k name -v %1' + f'command alias in_call_stack breakpoint command add --python-function {__name__}.in_call_stack -k name -v %1' )