[lldb] [clang] [llvm] [clang-tools-extra] Add new API in SBTarget for loading core from SBFile (PR #71769)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 13:54:06 PST 2023
================
@@ -627,7 +628,7 @@ class Target : public std::enable_shared_from_this<Target>,
// used.
const lldb::ProcessSP &CreateProcess(lldb::ListenerSP listener_sp,
llvm::StringRef plugin_name,
- const FileSpec *crash_file,
+ lldb::FileSP crash_file,
bool can_connect);
----------------
GeorgeHuyubo wrote:
If we move the open file code into Target.cpp, it's hard to handle error. Now in these 4 locations we have slightly different ways to report the error when the file is failed to open.
```
if (!file) {
result.AppendErrorWithFormatv(
"Failed to open the core file '{0}': '{1}.'\n",
core_file.GetPath(), llvm::toString(file.takeError()));
}
```
https://github.com/llvm/llvm-project/pull/71769
More information about the llvm-commits
mailing list