[Lldb-commits] [lldb] 307f395 - [lldb] Allow flexible importing of in_call_stack

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 11 14:28:51 PST 2022


Author: Dave Lee
Date: 2022-11-11T14:28:40-08:00
New Revision: 307f395d4ffee839dd0bd88c879539428cc31693

URL: https://github.com/llvm/llvm-project/commit/307f395d4ffee839dd0bd88c879539428cc31693
DIFF: https://github.com/llvm/llvm-project/commit/307f395d4ffee839dd0bd88c879539428cc31693.diff

LOG: [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

Added: 
    

Modified: 
    lldb/examples/python/in_call_stack.py

Removed: 
    


################################################################################
diff  --git a/lldb/examples/python/in_call_stack.py b/lldb/examples/python/in_call_stack.py
index 0647f2ca3425..9fd32c0e211d 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'
   )
 
 


        


More information about the lldb-commits mailing list