[Lldb-commits] [PATCH] D117165: [lldb] Add long help to `crashlog`

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 12 17:28:47 PST 2022


kastiglione added inline comments.


================
Comment at: lldb/examples/python/crashlog.py:1236-1240
+def __lldb_init_module(debugger, internal_dict):
+    debugger.HandleCommand(
+        'command script add -c lldb.macosx.crashlog.Symbolicate crashlog')
+    debugger.HandleCommand(
         'command script add -f lldb.macosx.crashlog.save_crashlog save_crashlog')
----------------
Note that I introduced `__lldb_init_module` here because there's some bug when registering a command class using `lldb.debugger`. In other words, this failed:

```
lldb.debugger.HandleCommand('command script add -c mod.Command cmd')
```

and this succeeds:

```
def __lldb_init_module(debugger, _):
    debugger.HandleCommand('command script add -c mod.Command cmd')    
```

When using the first form, an error would happen when running the command. The error message is "no function to execute".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117165/new/

https://reviews.llvm.org/D117165



More information about the lldb-commits mailing list