Skip to content

Commit 89826f0

Browse files
authored
[lldb] Fix compilation errors from #138896 (#139711)
- s/size_t/SIZE_T to match the windows API - case HANDLE to int64_t to avoid cast-to-int-of-different-size errors/warnings
1 parent 4ee6f74 commit 89826f0

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lldb/source/Host/windows/ProcessLauncherWindows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ ProcessLauncherWindows::LaunchProcess(const ProcessLaunchInfo &launch_info,
9999
if (startupinfo.hStdOutput)
100100
inherited_handles.push_back(startupinfo.hStdOutput);
101101

102-
size_t attributelist_size = 0;
102+
SIZE_T attributelist_size = 0;
103103
InitializeProcThreadAttributeList(/*lpAttributeList=*/nullptr,
104104
/*dwAttributeCount=*/1, /*dwFlags=*/0,
105105
&attributelist_size);

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,8 @@ Status GDBRemoteCommunication::StartDebugserverProcess(
924924
debugserver_args.AppendArgument(fd_arg.GetString());
925925
// Send "pass_comm_fd" down to the inferior so it can use it to
926926
// communicate back with this process. Ignored on Windows.
927-
launch_info.AppendDuplicateFileAction((int)pass_comm_fd, (int)pass_comm_fd);
927+
launch_info.AppendDuplicateFileAction((int64_t)pass_comm_fd,
928+
(int64_t)pass_comm_fd);
928929
}
929930

930931
// use native registers, not the GDB registers

lldb/tools/lldb-server/lldb-platform.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ static Status spawn_process(const char *progname, const FileSpec &prog,
274274
self_args.AppendArgument(llvm::StringRef("platform"));
275275
self_args.AppendArgument(llvm::StringRef("--child-platform-fd"));
276276
self_args.AppendArgument(llvm::to_string(shared_socket.GetSendableFD()));
277-
launch_info.AppendDuplicateFileAction((int)shared_socket.GetSendableFD(),
278-
(int)shared_socket.GetSendableFD());
277+
launch_info.AppendDuplicateFileAction((int64_t)shared_socket.GetSendableFD(),
278+
(int64_t)shared_socket.GetSendableFD());
279279
if (gdb_port) {
280280
self_args.AppendArgument(llvm::StringRef("--gdbserver-port"));
281281
self_args.AppendArgument(llvm::to_string(gdb_port));

0 commit comments

Comments
 (0)