[Lldb-commits] [lldb] 8b94997 - [lldb][windows] fix invalid corefile error message (#170471)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 3 04:53:21 PST 2025
Author: Charles Zablit
Date: 2025-12-03T12:53:17Z
New Revision: 8b94997a475192d0e519d03cf009f5c51d6a389e
URL: https://github.com/llvm/llvm-project/commit/8b94997a475192d0e519d03cf009f5c51d6a389e
DIFF: https://github.com/llvm/llvm-project/commit/8b94997a475192d0e519d03cf009f5c51d6a389e.diff
LOG: [lldb][windows] fix invalid corefile error message (#170471)
Added:
Modified:
lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
index 0fecefe23b88e..870a0511b7926 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -79,8 +79,10 @@ namespace lldb_private {
ProcessSP ProcessWindows::CreateInstance(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
- const FileSpec *,
+ const FileSpec *crash_file_path,
bool can_connect) {
+ if (crash_file_path)
+ return nullptr; // Cannot create a Windows process from a crash_file
return ProcessSP(new ProcessWindows(target_sp, listener_sp));
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 3c4d9a1f1ad37..83e358677467b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -210,11 +210,9 @@ void ProcessGDBRemote::Terminate() {
lldb::ProcessSP ProcessGDBRemote::CreateInstance(
lldb::TargetSP target_sp, ListenerSP listener_sp,
const FileSpec *crash_file_path, bool can_connect) {
- lldb::ProcessSP process_sp;
- if (crash_file_path == nullptr)
- process_sp = std::shared_ptr<ProcessGDBRemote>(
- new ProcessGDBRemote(target_sp, listener_sp));
- return process_sp;
+ if (crash_file_path)
+ return nullptr; // Cannot create a GDBRemote process from a crash_file
+ return lldb::ProcessSP(new ProcessGDBRemote(target_sp, listener_sp));
}
void ProcessGDBRemote::DumpPluginHistory(Stream &s) {
More information about the lldb-commits
mailing list