From 92d6635c4e5025cea0c65a99129bebfadcb9b3af Mon Sep 17 00:00:00 2001 From: x1nixmzeng Date: Thu, 4 Jan 2018 23:21:27 +0000 Subject: [PATCH] Fixed alignment errors when casting debug info types --- .../Win32/Debugging/CREATE_PROCESS_DEBUG_INFO.cs | 3 ++- .../Win32/Debugging/CREATE_THREAD_DEBUG_INFO.cs | 3 ++- .../Win32/Debugging/PTHREAD_START_ROUTINE.cs | 9 --------- 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 src/CxbxDebugger/Win32/Debugging/PTHREAD_START_ROUTINE.cs diff --git a/src/CxbxDebugger/Win32/Debugging/CREATE_PROCESS_DEBUG_INFO.cs b/src/CxbxDebugger/Win32/Debugging/CREATE_PROCESS_DEBUG_INFO.cs index ed585675c..e3bc97b75 100644 --- a/src/CxbxDebugger/Win32/Debugging/CREATE_PROCESS_DEBUG_INFO.cs +++ b/src/CxbxDebugger/Win32/Debugging/CREATE_PROCESS_DEBUG_INFO.cs @@ -11,7 +11,8 @@ namespace VsChromium.Core.Win32.Debugging { public uint dwDebugInfoFileOffset; public uint nDebugInfoSize; public IntPtr lpThreadLocalBase; - public PTHREAD_START_ROUTINE lpStartAddress; + // x1nix: Alignment fix, as PTHREAD_START_ROUTINE is failing to Marshal + public IntPtr lpStartAddress; public IntPtr lpImageName; public ushort fUnicode; } diff --git a/src/CxbxDebugger/Win32/Debugging/CREATE_THREAD_DEBUG_INFO.cs b/src/CxbxDebugger/Win32/Debugging/CREATE_THREAD_DEBUG_INFO.cs index e1a95908d..2f0acf4cf 100644 --- a/src/CxbxDebugger/Win32/Debugging/CREATE_THREAD_DEBUG_INFO.cs +++ b/src/CxbxDebugger/Win32/Debugging/CREATE_THREAD_DEBUG_INFO.cs @@ -6,6 +6,7 @@ namespace VsChromium.Core.Win32.Debugging { public struct CREATE_THREAD_DEBUG_INFO { public IntPtr hThread; public IntPtr lpThreadLocalBase; - public PTHREAD_START_ROUTINE lpStartAddress; + // x1nix: Alignment fix, as PTHREAD_START_ROUTINE is failing to Marshal + public IntPtr lpStartAddress; } } \ No newline at end of file diff --git a/src/CxbxDebugger/Win32/Debugging/PTHREAD_START_ROUTINE.cs b/src/CxbxDebugger/Win32/Debugging/PTHREAD_START_ROUTINE.cs deleted file mode 100644 index f4f20e1c6..000000000 --- a/src/CxbxDebugger/Win32/Debugging/PTHREAD_START_ROUTINE.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -using System; - -namespace VsChromium.Core.Win32.Debugging { - public delegate uint PTHREAD_START_ROUTINE(IntPtr lpThreadParameter); -}