From: Amine Khaldi Date: Sun, 4 Mar 2018 22:54:20 +0000 (+0100) Subject: [DBGHELP] Sync with Wine Staging 3.3. CORE-14434 X-Git-Tag: 0.4.9-RC~680 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=8d51a38cbcd0d1ed738a09170007f2fd628bd06a [DBGHELP] Sync with Wine Staging 3.3. CORE-14434 --- diff --git a/dll/win32/dbghelp/CMakeLists.txt b/dll/win32/dbghelp/CMakeLists.txt index 7b0c3843ac9..66229f410a8 100644 --- a/dll/win32/dbghelp/CMakeLists.txt +++ b/dll/win32/dbghelp/CMakeLists.txt @@ -70,7 +70,7 @@ else() storage.c symbol.c type.c - dbghelp_private.h + precomp.h ${CMAKE_CURRENT_BINARY_DIR}/dbghelp_stubs.c) add_library(dbghelp SHARED @@ -82,7 +82,7 @@ else() target_link_libraries(dbghelp wine ${PSEH_LIB} oldnames zlib) add_delay_importlibs(dbghelp version) add_importlibs(dbghelp psapi msvcrt kernel32 ntdll) - add_pch(dbghelp dbghelp_private.h SOURCE) + add_pch(dbghelp precomp.h SOURCE) add_cd_file(TARGET dbghelp DESTINATION reactos/system32 FOR all) endif() diff --git a/dll/win32/dbghelp/coff.c b/dll/win32/dbghelp/coff.c index a9d983eb928..01c5826c7ff 100644 --- a/dll/win32/dbghelp/coff.c +++ b/dll/win32/dbghelp/coff.c @@ -32,7 +32,26 @@ * Add symbol size to internal symbol table. */ +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include "windef.h" +#include "winbase.h" +#include "winternl.h" + +#include "wine/exception.h" +#include "wine/debug.h" #include "dbghelp_private.h" +#include "wine/mscvpdb.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_coff); diff --git a/dll/win32/dbghelp/cpu_arm.c b/dll/win32/dbghelp/cpu_arm.c index 5aae67d34c4..52461606a8b 100644 --- a/dll/win32/dbghelp/cpu_arm.c +++ b/dll/win32/dbghelp/cpu_arm.c @@ -19,7 +19,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/cpu_arm64.c b/dll/win32/dbghelp/cpu_arm64.c index a2a0bb4df92..dd2ccfb8838 100644 --- a/dll/win32/dbghelp/cpu_arm64.c +++ b/dll/win32/dbghelp/cpu_arm64.c @@ -19,7 +19,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/cpu_i386.c b/dll/win32/dbghelp/cpu_i386.c index c713049cf29..592f56edde7 100644 --- a/dll/win32/dbghelp/cpu_i386.c +++ b/dll/win32/dbghelp/cpu_i386.c @@ -18,10 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#include +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "dbghelp_private.h" #ifndef DBGHELP_STATIC_LIB -#include +#include "wine/winbase16.h" +#include "winternl.h" +#include "wine/debug.h" #endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -215,16 +220,16 @@ static BOOL i386_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, CO /* Init done */ set_curr_mode((frame->AddrPC.Mode == AddrModeFlat) ? stm_32bit : stm_16bit); - /* cur_switch holds address of WOW32Reserved field in TEB in debuggee + /* cur_switch holds address of SystemReserved1[0] field in TEB in debuggee * address space */ if (NtQueryInformationThread(csw->hThread, ThreadBasicInformation, &info, sizeof(info), NULL) == STATUS_SUCCESS) { - curr_switch = (DWORD_PTR)info.TebBaseAddress + FIELD_OFFSET(TEB, WOW32Reserved); + curr_switch = (DWORD_PTR)info.TebBaseAddress + FIELD_OFFSET(TEB, SystemReserved1[0]); if (!sw_read_mem(csw, curr_switch, &p, sizeof(p))) { - WARN("Can't read TEB:WOW32Reserved\n"); + WARN("Can't read TEB:SystemReserved1[0]\n"); goto done_err; } next_switch = p; diff --git a/dll/win32/dbghelp/cpu_ppc.c b/dll/win32/dbghelp/cpu_ppc.c index 6c382451a98..a48168594ef 100644 --- a/dll/win32/dbghelp/cpu_ppc.c +++ b/dll/win32/dbghelp/cpu_ppc.c @@ -18,7 +18,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/cpu_x86_64.c b/dll/win32/dbghelp/cpu_x86_64.c index 5beb6dfab8f..aa659fafe01 100644 --- a/dll/win32/dbghelp/cpu_x86_64.c +++ b/dll/win32/dbghelp/cpu_x86_64.c @@ -19,7 +19,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -702,6 +710,7 @@ static void* x86_64_find_runtime_function(struct module* module, DWORD64 addr while (rtf->UnwindData & 1) /* follow chained entry */ { FIXME("RunTime_Function outside IMAGE_DIRECTORY_ENTRY_EXCEPTION unimplemented yet!\n"); + return NULL; /* we need to read into the other process */ /* rtf = (RUNTIME_FUNCTION*)(module->module.BaseOfImage + (rtf->UnwindData & ~1)); */ } diff --git a/dll/win32/dbghelp/crc32.c b/dll/win32/dbghelp/crc32.c index 64901338bc6..73042fefbcd 100644 --- a/dll/win32/dbghelp/crc32.c +++ b/dll/win32/dbghelp/crc32.c @@ -19,6 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/port.h" + +#include + #include "dbghelp_private.h" /* Copyright (C) 1986 Gary S. Brown diff --git a/dll/win32/dbghelp/dbghelp.c b/dll/win32/dbghelp/dbghelp.c index 3fa5765a32f..6779e9ae98e 100644 --- a/dll/win32/dbghelp/dbghelp.c +++ b/dll/win32/dbghelp/dbghelp.c @@ -18,9 +18,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "config.h" +#include "dbghelp_private.h" +#include "winerror.h" +#include "psapi.h" +#include "wine/debug.h" +#include "wdbgexts.h" +#include "winnls.h" +#else +#include "dbghelp_private.h" #include "wdbgexts.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -355,7 +365,7 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP pcs->dbg_hdr_addr = 0; pcs->next = process_first; process_first = pcs; - + #ifndef DBGHELP_STATIC_LIB if (check_live_target(pcs)) { diff --git a/dll/win32/dbghelp/dbghelp_private.h b/dll/win32/dbghelp/dbghelp_private.h index d6b2bbe075e..9848acb1104 100644 --- a/dll/win32/dbghelp/dbghelp_private.h +++ b/dll/win32/dbghelp/dbghelp_private.h @@ -21,58 +21,32 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef _DBGHELP_PRIVATE_H_ -#define _DBGHELP_PRIVATE_H_ +#pragma once -#include - -#include -#include - -#ifdef HAVE_SYS_MMAN_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif - -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT +#include #ifndef DBGHELP_STATIC_LIB -#include +#include "windef.h" +#include "winbase.h" +#include "winver.h" +#include "dbghelp.h" +#include "objbase.h" +#include "oaidl.h" +#include "winnls.h" +#include "wine/list.h" +#include "wine/unicode.h" +#include "wine/rbtree.h" -#include -#define WIN32_NO_STATUS -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include +#include "cvconst.h" #else /* DBGHELP_STATIC_LIB */ #include #include "compat.h" - -#endif /* DBGHELP_STATIC_LIB */ - #include #include +#endif /* DBGHELP_STATIC_LIB */ /* #define USE_STATS */ @@ -401,6 +375,7 @@ struct module { struct process* process; IMAGEHLP_MODULEW64 module; + WCHAR modulename[64]; /* used for enumeration */ struct module* next; enum module_type type : 16; unsigned short is_virtual : 1; @@ -844,7 +819,3 @@ extern struct symt_pointer* extern struct symt_typedef* symt_new_typedef(struct module* module, struct symt* ref, const char* name) DECLSPEC_HIDDEN; - -#include "image_private.h" - -#endif /* _DBGHELP_PRIVATE_H_ */ diff --git a/dll/win32/dbghelp/dwarf.c b/dll/win32/dbghelp/dwarf.c index 7b338d17509..0d517929186 100644 --- a/dll/win32/dbghelp/dwarf.c +++ b/dll/win32/dbghelp/dwarf.c @@ -20,12 +20,51 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB + +#define NONAMELESSUNION + +#include "config.h" + +#include +#include +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_SYS_MMAN_H +#include +#endif +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#include +#include #ifdef HAVE_ZLIB #include #endif +#include "windef.h" +#include "winternl.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "oleauto.h" + +#include "dbghelp_private.h" +#include "image_private.h" + +#include "wine/debug.h" + +#else +#include "dbghelp_private.h" +#include "image_private.h" +#endif /* !DBGHELP_STATIC_LIB */ + WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_dwarf); /* FIXME: diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index 2edab86b704..066c2f5166d 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -19,7 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#include "config.h" +#include "wine/port.h" #if defined(__svr4__) || defined(__sun) #define __ELF__ 1 @@ -28,10 +29,27 @@ #define _FILE_OFFSET_BITS 32 #endif +#include +#include #include +#ifdef HAVE_SYS_STAT_H +# include +#endif #include +#ifdef HAVE_SYS_MMAN_H +#include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif + +#include "dbghelp_private.h" +#include "winternl.h" + +#include "image_private.h" -#include +#include "wine/library.h" +#include "wine/debug.h" #ifdef __ELF__ @@ -1471,9 +1489,11 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename, if (!ret && !strchrW(filename, '/')) { ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr, - getenv("PATH"), elf_info) || - elf_load_file_from_path(pcs, filename, load_offset, dyn_addr, - getenv("LD_LIBRARY_PATH"), elf_info); + getenv("PATH"), elf_info); + if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr, + getenv("LD_LIBRARY_PATH"), elf_info); + if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr, + BINDIR, elf_info); if (!ret) ret = elf_load_file_from_dll_path(pcs, filename, load_offset, dyn_addr, elf_info); } diff --git a/dll/win32/dbghelp/image.c b/dll/win32/dbghelp/image.c index 3420caa9612..ef94ef66386 100644 --- a/dll/win32/dbghelp/image.c +++ b/dll/win32/dbghelp/image.c @@ -18,7 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include +#include +#include + #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c index cc991a7610e..01fa300eff7 100644 --- a/dll/win32/dbghelp/macho_module.c +++ b/dll/win32/dbghelp/macho_module.c @@ -21,7 +21,37 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/port.h" + +#ifdef HAVE_MACH_O_LOADER_H +#include +#define LoadResource mac_LoadResource +#define GetCurrentThread mac_GetCurrentThread +#include +#undef LoadResource +#undef GetCurrentThread +#undef DPRINTF +#endif + +#include +#include +#include +#include +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_SYS_MMAN_H +# include +#endif + +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/library.h" +#include "wine/debug.h" +#include "image_private.h" #ifdef HAVE_MACH_O_LOADER_H @@ -48,10 +78,6 @@ struct dyld_all_image_infos { }; #endif -#include "winternl.h" -#include "wine/library.h" -#include "wine/debug.h" - #ifdef WORDS_BIGENDIAN #define swap_ulong_be_to_host(n) (n) #else diff --git a/dll/win32/dbghelp/minidump.c b/dll/win32/dbghelp/minidump.c index e861ccabda1..4dead52b92e 100644 --- a/dll/win32/dbghelp/minidump.c +++ b/dll/win32/dbghelp/minidump.c @@ -18,10 +18,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" - #include +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "dbghelp_private.h" +#include "winternl.h" +#include "psapi.h" +#include "wine/debug.h" + WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); /****************************************************************** diff --git a/dll/win32/dbghelp/module.c b/dll/win32/dbghelp/module.c index c0084ec1c0c..0173469bd6e 100644 --- a/dll/win32/dbghelp/module.c +++ b/dll/win32/dbghelp/module.c @@ -19,7 +19,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include +#include +#include +#include + #include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "psapi.h" +#include "winternl.h" +#include "wine/debug.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -91,7 +102,9 @@ static void module_fill_module(const WCHAR* in, WCHAR* out, size_t size) void module_set_module(struct module* module, const WCHAR* name) { - module_fill_module(name, module->module.ModuleName, sizeof(module->module.ModuleName)); + module_fill_module(name, module->module.ModuleName, + sizeof(module->module.ModuleName) / sizeof(module->module.ModuleName[0])); + module_fill_module(name, module->modulename, sizeof(module->modulename) / sizeof(module->modulename[0])); } const WCHAR *get_wine_loader_name(void) @@ -815,7 +828,7 @@ BOOL WINAPI SymEnumerateModulesW64(HANDLE hProcess, if (!(dbghelp_options & SYMOPT_WINE_WITH_NATIVE_MODULES) && (module->type == DMT_ELF || module->type == DMT_MACHO)) continue; - if (!EnumModulesCallback(module->module.ModuleName, + if (!EnumModulesCallback(module->modulename, module->module.BaseOfImage, UserContext)) break; } @@ -915,7 +928,7 @@ BOOL WINAPI EnumerateLoadedModulesW64(HANDLE hProcess, if (!GetModuleInformation(hProcess, hMods[i], &mi, sizeof(mi)) || !GetModuleBaseNameW(hProcess, hMods[i], baseW, sizeof(baseW) / sizeof(WCHAR))) continue; - module_fill_module(baseW, modW, sizeof(modW) / sizeof(CHAR)); + module_fill_module(baseW, modW, sizeof(modW) / sizeof(modW[0])); EnumLoadedModulesCallback(modW, (DWORD_PTR)mi.lpBaseOfDll, mi.SizeOfImage, UserContext); } @@ -926,6 +939,12 @@ BOOL WINAPI EnumerateLoadedModulesW64(HANDLE hProcess, #endif /* DBGHELP_STATIC_LIB */ +static void dbghelp_str_WtoA(const WCHAR *src, char *dst, int dst_len) +{ + WideCharToMultiByte(CP_ACP, 0, src, -1, dst, dst_len - 1, NULL, NULL); + dst[dst_len - 1] = 0; +} + /****************************************************************** * SymGetModuleInfo (DBGHELP.@) * @@ -941,19 +960,16 @@ BOOL WINAPI SymGetModuleInfo(HANDLE hProcess, DWORD dwAddr, miw64.SizeOfStruct = sizeof(miw64); if (!SymGetModuleInfoW64(hProcess, dwAddr, &miw64)) return FALSE; - mi.SizeOfStruct = miw64.SizeOfStruct; + mi.SizeOfStruct = ModuleInfo->SizeOfStruct; mi.BaseOfImage = miw64.BaseOfImage; mi.ImageSize = miw64.ImageSize; mi.TimeDateStamp = miw64.TimeDateStamp; mi.CheckSum = miw64.CheckSum; mi.NumSyms = miw64.NumSyms; mi.SymType = miw64.SymType; - WideCharToMultiByte(CP_ACP, 0, miw64.ModuleName, -1, - mi.ModuleName, sizeof(mi.ModuleName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.ImageName, -1, - mi.ImageName, sizeof(mi.ImageName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.LoadedImageName, -1, - mi.LoadedImageName, sizeof(mi.LoadedImageName), NULL, NULL); + dbghelp_str_WtoA(miw64.ModuleName, mi.ModuleName, sizeof(mi.ModuleName)); + dbghelp_str_WtoA(miw64.ImageName, mi.ImageName, sizeof(mi.ImageName)); + dbghelp_str_WtoA(miw64.LoadedImageName, mi.LoadedImageName, sizeof(mi.LoadedImageName)); memcpy(ModuleInfo, &mi, ModuleInfo->SizeOfStruct); @@ -975,7 +991,7 @@ BOOL WINAPI SymGetModuleInfoW(HANDLE hProcess, DWORD dwAddr, miw64.SizeOfStruct = sizeof(miw64); if (!SymGetModuleInfoW64(hProcess, dwAddr, &miw64)) return FALSE; - miw.SizeOfStruct = miw64.SizeOfStruct; + miw.SizeOfStruct = ModuleInfo->SizeOfStruct; miw.BaseOfImage = miw64.BaseOfImage; miw.ImageSize = miw64.ImageSize; miw.TimeDateStamp = miw64.TimeDateStamp; @@ -1010,25 +1026,20 @@ BOOL WINAPI SymGetModuleInfo64(HANDLE hProcess, DWORD64 dwAddr, miw64.SizeOfStruct = sizeof(miw64); if (!SymGetModuleInfoW64(hProcess, dwAddr, &miw64)) return FALSE; - mi64.SizeOfStruct = miw64.SizeOfStruct; + mi64.SizeOfStruct = ModuleInfo->SizeOfStruct; mi64.BaseOfImage = miw64.BaseOfImage; mi64.ImageSize = miw64.ImageSize; mi64.TimeDateStamp = miw64.TimeDateStamp; mi64.CheckSum = miw64.CheckSum; mi64.NumSyms = miw64.NumSyms; mi64.SymType = miw64.SymType; - WideCharToMultiByte(CP_ACP, 0, miw64.ModuleName, -1, - mi64.ModuleName, sizeof(mi64.ModuleName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.ImageName, -1, - mi64.ImageName, sizeof(mi64.ImageName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.LoadedImageName, -1, - mi64.LoadedImageName, sizeof(mi64.LoadedImageName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.LoadedPdbName, -1, - mi64.LoadedPdbName, sizeof(mi64.LoadedPdbName), NULL, NULL); + dbghelp_str_WtoA(miw64.ModuleName, mi64.ModuleName, sizeof(mi64.ModuleName)); + dbghelp_str_WtoA(miw64.ImageName, mi64.ImageName, sizeof(mi64.ImageName)); + dbghelp_str_WtoA(miw64.LoadedImageName, mi64.LoadedImageName, sizeof(mi64.LoadedImageName)); + dbghelp_str_WtoA(miw64.LoadedPdbName, mi64.LoadedPdbName, sizeof(mi64.LoadedPdbName)); mi64.CVSig = miw64.CVSig; - WideCharToMultiByte(CP_ACP, 0, miw64.CVData, -1, - mi64.CVData, sizeof(mi64.CVData), NULL, NULL); + dbghelp_str_WtoA(miw64.CVData, mi64.CVData, sizeof(mi64.CVData)); mi64.PdbSig = miw64.PdbSig; mi64.PdbSig70 = miw64.PdbSig70; mi64.PdbAge = miw64.PdbAge; diff --git a/dll/win32/dbghelp/msc.c b/dll/win32/dbghelp/msc.c index 8fe509b59a6..eba26498cb0 100644 --- a/dll/win32/dbghelp/msc.c +++ b/dll/win32/dbghelp/msc.c @@ -32,9 +32,29 @@ * Add symbol size to internal symbol table. */ -#include "dbghelp_private.h" +#define NONAMELESSUNION + +#include "config.h" +#include "wine/port.h" -#include +#include +#include +#include + +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +#include +#include "windef.h" +#include "winbase.h" +#include "winternl.h" + +#include "wine/exception.h" +#include "wine/debug.h" +#include "dbghelp_private.h" +#include "wine/mscvpdb.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_msc); diff --git a/dll/win32/dbghelp/path.c b/dll/win32/dbghelp/path.c index bd4893b6d37..8c74426eec3 100644 --- a/dll/win32/dbghelp/path.c +++ b/dll/win32/dbghelp/path.c @@ -18,7 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include +#include +#include + #include "dbghelp_private.h" +#include "winnls.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/pe_module.c b/dll/win32/dbghelp/pe_module.c index dac94bb9071..b629213d769 100644 --- a/dll/win32/dbghelp/pe_module.c +++ b/dll/win32/dbghelp/pe_module.c @@ -21,7 +21,20 @@ * */ +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include + #include "dbghelp_private.h" +#include "image_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "winternl.h" +#include "wine/debug.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/precomp.h b/dll/win32/dbghelp/precomp.h new file mode 100644 index 00000000000..e359f21aca8 --- /dev/null +++ b/dll/win32/dbghelp/precomp.h @@ -0,0 +1,39 @@ + +#ifndef _DBGHELP_PRECOMP_H_ +#define _DBGHELP_PRECOMP_H_ + +#include +#include + +#include +#include + +#ifdef HAVE_SYS_MMAN_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif + +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include +#define WIN32_NO_STATUS + +#include "dbghelp_private.h" + +#include +#include +#include +#include + +#include "image_private.h" + +#endif /* !_DBGHELP_PRECOMP_H_ */ diff --git a/dll/win32/dbghelp/rosstubs.c b/dll/win32/dbghelp/rosstubs.c index 85bd67ff73d..7ac6026aea3 100644 --- a/dll/win32/dbghelp/rosstubs.c +++ b/dll/win32/dbghelp/rosstubs.c @@ -18,8 +18,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + #include "dbghelp_private.h" +#include "image_private.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); #define PDBGHELP_CREATE_USER_DUMP_CALLBACK PVOID diff --git a/dll/win32/dbghelp/rsym.c b/dll/win32/dbghelp/rsym.c index 05c27250e07..9b7bf4ee1d7 100644 --- a/dll/win32/dbghelp/rsym.c +++ b/dll/win32/dbghelp/rsym.c @@ -8,6 +8,7 @@ #include "dbghelp_private.h" #include +#include WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_rsym); diff --git a/dll/win32/dbghelp/source.c b/dll/win32/dbghelp/source.c index 29123e1280e..e98f780b16f 100644 --- a/dll/win32/dbghelp/source.c +++ b/dll/win32/dbghelp/source.c @@ -18,8 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * */ +#include "config.h" +#include +#include +#include +#include #include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "wine/debug.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/stabs.c b/dll/win32/dbghelp/stabs.c index faa9f47985f..1ec0065bb71 100644 --- a/dll/win32/dbghelp/stabs.c +++ b/dll/win32/dbghelp/stabs.c @@ -29,12 +29,43 @@ * available (hopefully) from http://sources.redhat.com/gdb/onlinedocs */ -#include "dbghelp_private.h" +#include "config.h" +#include "wine/port.h" + +#include +#include +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_SYS_MMAN_H +#include +#endif +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#include +#include #ifdef HAVE_MACH_O_NLIST_H # include #endif +#ifndef DBGHELP_STATIC_LIB +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#endif + +#include "dbghelp_private.h" + +#ifndef DBGHELP_STATIC_LIB +#include "wine/debug.h" +#endif + WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_stabs); #ifndef DBGHELP_STATIC_LIB diff --git a/dll/win32/dbghelp/stack.c b/dll/win32/dbghelp/stack.c index ffb4b318581..21412f6051f 100644 --- a/dll/win32/dbghelp/stack.c +++ b/dll/win32/dbghelp/stack.c @@ -21,7 +21,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include +#include +#include +#include + #include "dbghelp_private.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/storage.c b/dll/win32/dbghelp/storage.c index 32e80d46ef9..7750ce64673 100644 --- a/dll/win32/dbghelp/storage.c +++ b/dll/win32/dbghelp/storage.c @@ -19,8 +19,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#include "config.h" +#include +#include +#ifndef DBGHELP_STATIC_LIB +#include "wine/debug.h" +#endif + +#include "dbghelp_private.h" #ifdef USE_STATS #include #endif diff --git a/dll/win32/dbghelp/symbol.c b/dll/win32/dbghelp/symbol.c index 9efb474e429..633aa45d31e 100644 --- a/dll/win32/dbghelp/symbol.c +++ b/dll/win32/dbghelp/symbol.c @@ -19,7 +19,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define NONAMELESSUNION + +#include "config.h" + +#include +#include +#include +#include +#include +#include +#ifndef DBGHELP_STATIC_LIB +#include "wine/debug.h" +#endif #include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "winnls.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); WINE_DECLARE_DEBUG_CHANNEL(dbghelp_symt); diff --git a/dll/win32/dbghelp/type.c b/dll/win32/dbghelp/type.c index d55332ebf2e..e069231b282 100644 --- a/dll/win32/dbghelp/type.c +++ b/dll/win32/dbghelp/type.c @@ -22,6 +22,19 @@ * upon which full support for datatype handling will eventually be built. */ +#define NONAMELESSUNION + +#include "config.h" +#include +#include +#include + +#ifndef DBGHELP_STATIC_LIB +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "wine/debug.h" +#endif #include "dbghelp_private.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index ef3c0456d44..24c72fb7030 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -63,7 +63,7 @@ reactos/dll/win32/cryptdlg # Synced to WineStaging-2.9 reactos/dll/win32/cryptdll # Synced to WineStaging-2.9 reactos/dll/win32/cryptnet # Synced to WineStaging-2.9 reactos/dll/win32/cryptui # Synced to WineStaging-2.16 -reactos/dll/win32/dbghelp # Synced to Wine-3.0 +reactos/dll/win32/dbghelp # Synced to WineStaging-3.3 reactos/dll/win32/dciman32 # Synced to WineStaging-2.9 reactos/dll/win32/faultrep # Synced to WineStaging-2.9 reactos/dll/win32/fontsub # Synced to WineStaging-2.9 diff --git a/sdk/include/reactos/wine/mscvpdb.h b/sdk/include/reactos/wine/mscvpdb.h index 2f0b47998fa..744c17faba4 100644 --- a/sdk/include/reactos/wine/mscvpdb.h +++ b/sdk/include/reactos/wine/mscvpdb.h @@ -96,6 +96,8 @@ * types, they are not completely linked together. */ +#pragma once + #include "pshpack1.h" /* ======================================== *