This is an archive of the discontinued LLVM Phabricator instance.

[lldb/Interpreter] Fix session-save-on-quit when using ^D
ClosedPublic

Authored by mib on Jun 28 2021, 8:55 AM.

Details

Summary

Previously, when interpreter.save-session-on-quit was enabled, lldb
would save the session transcript only when running the quit command.

This patch changes that so the transcripts are saved when the debugger
object is destroyed if the setting is enabled.

rdar://72902650

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

Diff Detail

Event Timeline

mib requested review of this revision.Jun 28 2021, 8:55 AM
mib created this revision.

Maybe a test?

JDevlieghere added inline comments.Jun 28 2021, 10:17 AM
lldb/source/Interpreter/CommandInterpreter.cpp
2977

Why eReturnStatusSuccessContinuingResult and not eReturnStatusSuccessFinishNoResult?

shafik added a subscriber: shafik.Jun 28 2021, 11:26 AM
shafik added inline comments.
lldb/source/Core/Debugger.cpp
611

/*colors=*/true

mib updated this revision to Diff 354962.Jun 28 2021, 11:42 AM
mib marked 2 inline comments as done.

Address @jingham, @JDevlieghere & @shafik comments.

jingham accepted this revision.Jun 28 2021, 11:57 AM

One nit about the handling of colors.

lldb/source/Core/Debugger.cpp
611

Maybe you should get the setting for colors here? If I turn off colors with the use-colors setting, I would be surprised to find them in the session save file.

This revision is now accepted and ready to land.Jun 28 2021, 11:57 AM
jingham requested changes to this revision.Jun 28 2021, 11:58 AM

Shouldn't have also said accepted yet...

This revision now requires changes to proceed.Jun 28 2021, 11:58 AM
mib updated this revision to Diff 354988.Jun 28 2021, 12:30 PM

Address @jingham comment.

jingham accepted this revision.Jun 28 2021, 2:47 PM

Excellent

This revision is now accepted and ready to land.Jun 28 2021, 2:47 PM
JDevlieghere accepted this revision.Jun 28 2021, 5:19 PM
This revision was landed with ongoing or failed builds.Jun 29 2021, 1:54 AM
This revision was automatically updated to reflect the committed changes.