Skip to content

[lldb][Windows] Fixed Host::Kill() #99721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lldb/source/Host/windows/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ lldb::thread_t Host::GetCurrentThread() {
}

void Host::Kill(lldb::pid_t pid, int signo) {
TerminateProcess((HANDLE)pid, 1);
AutoHandle handle(::OpenProcess(PROCESS_TERMINATE, FALSE, pid), nullptr);
if (handle.IsValid())
::TerminateProcess(handle.get(), 1);
}

const char *Host::GetSignalAsCString(int signo) { return NULL; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class TestPlatformKill(GDBRemoteTestBase):
@skipIfRemote
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr52451")
def test_kill_different_platform(self):
"""Test connecting to a remote linux platform"""

Expand Down
Loading