[Lldb-commits] [PATCH] D137137: [lldb/Interpreter] Open saved transcript in GUI Editor
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 31 16:57:15 PDT 2022
mib created this revision.
mib added reviewers: JDevlieghere, kastiglione.
mib added a project: LLDB.
Herald added a project: All.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.
This patch will automatically open LLDB's saved transcript file on the
graphical editor if lldb is running under an interactive graphical session.
rdar://92692106
Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137137
Files:
lldb/source/Interpreter/CommandInterpreter.cpp
Index: lldb/source/Interpreter/CommandInterpreter.cpp
===================================================================
--- lldb/source/Interpreter/CommandInterpreter.cpp
+++ lldb/source/Interpreter/CommandInterpreter.cpp
@@ -3224,6 +3224,14 @@
result.AppendMessageWithFormat("Session's transcripts saved to %s\n",
output_file->c_str());
+ if (Host::IsInteractiveGraphicSession()) {
+ const FileSpec file_spec;
+ error = file->GetFileSpec(const_cast<FileSpec &>(file_spec));
+ if (error.Success())
+ if (!Host::OpenFileInExternalEditor(file_spec, 1))
+ result.AppendMessage("Unable to open file in external editor\n");
+ }
+
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137137.472186.patch
Type: text/x-patch
Size: 710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221031/df817fa7/attachment.bin>
More information about the lldb-commits
mailing list