Skip to content

Commit 29a5758

Browse files
committed
[lldb] Force override when adding crashlog command
When using interactive crashlog from an IDE, it can happen that the user already have the `command script import lldb.macosx.crashlog` command on their `lldbinit` file. That leads to showing some message: ``` error: cannot add command: user command exists and force replace not set error: cannot add command: user command exists and force replace not set ``` This leads to confusion because the crashlog symbolication continues and succeeds even after these errors. To address that, the crashlog commands get overridden everytime the script get re-imported. rdar://103403943 Differential Revision: https://reviews.llvm.org/D140113 Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent f6e6fc3 commit 29a5758

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/examples/python/crashlog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,8 +1344,8 @@ def should_run_in_interactive_mode(options, ci):
13441344

13451345
def __lldb_init_module(debugger, internal_dict):
13461346
debugger.HandleCommand(
1347-
'command script add -c lldb.macosx.crashlog.Symbolicate crashlog')
1347+
'command script add -o -c lldb.macosx.crashlog.Symbolicate crashlog')
13481348
debugger.HandleCommand(
1349-
'command script add -f lldb.macosx.crashlog.save_crashlog save_crashlog')
1349+
'command script add -o -f lldb.macosx.crashlog.save_crashlog save_crashlog')
13501350
print('"crashlog" and "save_crashlog" commands have been installed, use '
13511351
'the "--help" options on these commands for detailed help.')

0 commit comments

Comments
 (0)