This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Force override when adding crashlog command
ClosedPublic

Authored by mib on Dec 15 2022, 8:38 AM.

Details

Summary

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

Diff Detail

Event Timeline

mib created this revision.Dec 15 2022, 8:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2022, 8:38 AM
mib requested review of this revision.Dec 15 2022, 8:38 AM
bulbazord accepted this revision.Dec 16 2022, 11:09 AM

Do we want to do this for all the modules in examples/python that do something to this effect? e.g. memory.py as well.

It also might be worth changing some of those messages from errors to warnings, since that's what they actually are.

This revision is now accepted and ready to land.Dec 16 2022, 11:09 AM
This revision was automatically updated to reflect the committed changes.