================
@@ -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:

Here's an example:
```
(lldb) settings set interpreter.save-transcript true
(lldb) p 1
(int) 1
(lldb) hello
error: 'hello' is not a valid command.
(lldb) settings set interpreter.save-transcript false
(lldb) p 2
(int) 2
(lldb) session save
Session's transcripts saved to 
/var/folders/dh/nv6c_38j4tq3crp6r6f69sdc0000gn/T/lldb/lldb_session_2024-09-20_17-46-03.936239000.log
error: Note: the setting interpreter.save-transcript is set to false, so the 
transcript might not have been recorded.
```

In this case, the text in between the two `interpreter.save-transcript` 
settings will be saved, including the actual command to disable it. So here's 
what's saved:
```
(lldb) settings set interpreter.save-transcript true
(lldb) p 1
(int) 1
(lldb) hello
error: 'hello' is not a valid command.
(lldb) settings set interpreter.save-transcript false
```

This is why I worded it like this. `session save` *will* save whatever's found 
in the transcript buffer, but what was actually saved in the transcript buffer 
depends if users did something like this.

https://github.com/llvm/llvm-project/pull/109020
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to