This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add debugger.external-editor setting
ClosedPublic

Authored by JDevlieghere on Apr 30 2023, 7:31 PM.

Details

Summary

Add a setting (debugger.external-editor) to specify an external editor instead of having to rely on the LLDB_EXTERNAL_EDITOR environment variable.

Diff Detail

Event Timeline

JDevlieghere created this revision.Apr 30 2023, 7:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2023, 7:31 PM
JDevlieghere requested review of this revision.Apr 30 2023, 7:31 PM
mib added inline comments.Apr 30 2023, 7:42 PM
lldb/include/lldb/Core/Debugger.h
298

newline

lldb/source/Host/macosx/objcxx/Host.mm
395–396

Should we even check for the env variable is the user set the editor setting ?

JDevlieghere marked 2 inline comments as done.Apr 30 2023, 7:45 PM
JDevlieghere added inline comments.
lldb/include/lldb/Core/Debugger.h
298

This was intentional but I'll back it out of this patch and clean up everything in a separate commit.

lldb/source/Host/macosx/objcxx/Host.mm
395–396

I asked that question in D149472 and this was Jim's suggestion: https://reviews.llvm.org/D149472#inline-1443754

mib accepted this revision.Apr 30 2023, 8:07 PM

LGTM!

This revision is now accepted and ready to land.Apr 30 2023, 8:07 PM
bulbazord requested changes to this revision.May 1 2023, 1:26 PM
bulbazord added inline comments.
lldb/source/Host/macosx/objcxx/Host.mm
395–396

This is a hard error and not a warning, which I don't think is a good idea. I think the point of a setting here is to be able to change behavior during a debugging session instead of needing to start over. If these 2 values conflict, I would have to restart my session to unset LLDB_EXTERNAL_EDITOR to actually get the desired behavior.

This revision now requires changes to proceed.May 1 2023, 1:26 PM
JDevlieghere marked 2 inline comments as done.

Make external-editor setting take precedence over LLDB_EXTRENAL_EDITOR

bulbazord accepted this revision.May 1 2023, 2:07 PM

LGTM!

This revision is now accepted and ready to land.May 1 2023, 2:07 PM
This revision was landed with ongoing or failed builds.May 1 2023, 2:11 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2023, 2:11 PM