[Lldb-commits] [lldb] Add warning message to `session save` when transcript isn't saved. (PR #109020)
Tom Yang via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 20 18:39:08 PDT 2024
================
@@ -3306,6 +3306,8 @@ bool CommandInterpreter::SaveTranscript(
result.SetStatus(eReturnStatusSuccessFinishNoResult);
result.AppendMessageWithFormat("Session's transcripts saved to %s\n",
output_file->c_str());
+ if (!GetSaveTranscript())
+ result.AppendError("Note: the setting interpreter.save-transcript is set to false, so the transcript might not have been recorded.");
----------------
zhyty wrote:
See my [comment above](https://github.com/llvm/llvm-project/pull/109020#discussion_r1769375600).
I hate to be so pedantic about it, but I would be worried if users used this flow of
```
(lldb) settings set interpreter.save-transcript true
... do various things they want to save ...
(lldb) settings set interpreter.save-transcript false
... do various things they don't want to save ...
(lldb) session save
```
This wouldn't work anymore if we early returned.
To your point though, I guess they could always re-toggle it before that last session save, and maybe it would be better for the average user.
Anyway, that's why I decided to make this commit so conservative.
https://github.com/llvm/llvm-project/pull/109020
More information about the lldb-commits
mailing list