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 <[email protected]>
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;
}
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;
}
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits