mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[WINESYNC] dbghelp: Always build all loader backends.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 131fb79535c74e8011ac82c279f6f4a9d971e1af by Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
833e54f874
commit
b991284341
7 changed files with 18 additions and 52 deletions
|
@ -55,9 +55,9 @@ else()
|
||||||
cpu_x86_64.c
|
cpu_x86_64.c
|
||||||
dbghelp.c
|
dbghelp.c
|
||||||
dwarf.c
|
dwarf.c
|
||||||
elf_module.c
|
# elf_module.c
|
||||||
image.c
|
image.c
|
||||||
macho_module.c
|
# macho_module.c
|
||||||
minidump.c
|
minidump.c
|
||||||
module.c
|
module.c
|
||||||
msc.c
|
msc.c
|
||||||
|
|
|
@ -73,13 +73,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
|
||||||
|
|
||||||
unsigned dbghelp_options = SYMOPT_UNDNAME;
|
unsigned dbghelp_options = SYMOPT_UNDNAME;
|
||||||
BOOL dbghelp_opt_native = FALSE;
|
BOOL dbghelp_opt_native = FALSE;
|
||||||
#ifndef __REACTOS__
|
#ifndef DBGHELP_STATIC_LIB
|
||||||
SYSTEM_INFO sysinfo;
|
SYSTEM_INFO sysinfo;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct process* process_first /* = NULL */;
|
static struct process* process_first /* = NULL */;
|
||||||
|
|
||||||
#ifndef __REACTOS__
|
#ifndef DBGHELP_STATIC_LIB
|
||||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
||||||
{
|
{
|
||||||
switch (reason)
|
switch (reason)
|
||||||
|
@ -266,6 +266,7 @@ BOOL WINAPI SymGetSearchPath(HANDLE hProcess, PSTR szSearchPath,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DBGHELP_STATIC_LIB
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* invade_process
|
* invade_process
|
||||||
*
|
*
|
||||||
|
@ -284,7 +285,6 @@ static BOOL WINAPI process_invade_cb(PCWSTR name, ULONG64 base, ULONG size, PVOI
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DBGHELP_STATIC_LIB
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* check_live_target
|
* check_live_target
|
||||||
*
|
*
|
||||||
|
@ -313,10 +313,12 @@ static BOOL check_live_target(struct process* pcs)
|
||||||
/* Wine store their loader base address in peb.reserved[0] and load its symbol from there.
|
/* Wine store their loader base address in peb.reserved[0] and load its symbol from there.
|
||||||
* ReactOS does not care about it */
|
* ReactOS does not care about it */
|
||||||
if (!base) return FALSE;
|
if (!base) return FALSE;
|
||||||
#endif
|
|
||||||
|
|
||||||
TRACE("got debug info address %#lx from PEB %p\n", base, pbi.PebBaseAddress);
|
TRACE("got debug info address %#lx from PEB %p\n", base, pbi.PebBaseAddress);
|
||||||
return elf_read_wine_loader_dbg_info(pcs, base) || macho_read_wine_loader_dbg_info(pcs, base);
|
return elf_read_wine_loader_dbg_info(pcs, base) || macho_read_wine_loader_dbg_info(pcs, base);
|
||||||
|
#else
|
||||||
|
return TRUE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -423,12 +425,14 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP
|
||||||
pcs->loader->synchronize_module_list(pcs);
|
pcs->loader->synchronize_module_list(pcs);
|
||||||
}
|
}
|
||||||
else if (fInvadeProcess)
|
else if (fInvadeProcess)
|
||||||
|
#else
|
||||||
|
if (fInvadeProcess)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
SymCleanup(hProcess);
|
SymCleanup(hProcess);
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ void* hash_table_iter_up(struct hash_table_iter* hti) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
extern unsigned dbghelp_options DECLSPEC_HIDDEN;
|
extern unsigned dbghelp_options DECLSPEC_HIDDEN;
|
||||||
extern BOOL dbghelp_opt_native DECLSPEC_HIDDEN;
|
extern BOOL dbghelp_opt_native DECLSPEC_HIDDEN;
|
||||||
#ifndef __REACTOS__
|
#ifndef DBGHELP_STATIC_LIB
|
||||||
extern SYSTEM_INFO sysinfo DECLSPEC_HIDDEN;
|
extern SYSTEM_INFO sysinfo DECLSPEC_HIDDEN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -635,6 +635,7 @@ extern const char* wine_dbgstr_addr(const ADDRESS64* addr) DECLSPEC_HIDDEN;
|
||||||
extern struct cpu* cpu_find(DWORD) DECLSPEC_HIDDEN;
|
extern struct cpu* cpu_find(DWORD) DECLSPEC_HIDDEN;
|
||||||
extern DWORD calc_crc32(HANDLE handle) DECLSPEC_HIDDEN;
|
extern DWORD calc_crc32(HANDLE handle) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
/* elf_module.c */
|
/* elf_module.c */
|
||||||
extern BOOL elf_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr) DECLSPEC_HIDDEN;
|
extern BOOL elf_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr) DECLSPEC_HIDDEN;
|
||||||
struct elf_thunk_area;
|
struct elf_thunk_area;
|
||||||
|
@ -642,6 +643,9 @@ extern int elf_is_in_thunk_area(ULONG_PTR addr, const struct elf_thunk_
|
||||||
|
|
||||||
/* macho_module.c */
|
/* macho_module.c */
|
||||||
extern BOOL macho_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr) DECLSPEC_HIDDEN;
|
extern BOOL macho_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr) DECLSPEC_HIDDEN;
|
||||||
|
#else
|
||||||
|
struct elf_thunk_area;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* minidump.c */
|
/* minidump.c */
|
||||||
void minidump_add_memory_block(struct dump_context* dc, ULONG64 base, ULONG size, ULONG rva) DECLSPEC_HIDDEN;
|
void minidump_add_memory_block(struct dump_context* dc, ULONG64 base, ULONG size, ULONG rva) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -1950,7 +1950,7 @@ static struct symt* dwarf2_parse_subprogram(dwarf2_parse_context_t* ctx,
|
||||||
* (not the case for stabs), we just drop Wine's thunks here...
|
* (not the case for stabs), we just drop Wine's thunks here...
|
||||||
* Actual thunks will be created in elf_module from the symbol table
|
* Actual thunks will be created in elf_module from the symbol table
|
||||||
*/
|
*/
|
||||||
#ifndef DBGHELP_STATIC_LIB
|
#ifndef __REACTOS__
|
||||||
if (elf_is_in_thunk_area(ctx->load_offset + low_pc, ctx->thunks) >= 0)
|
if (elf_is_in_thunk_area(ctx->load_offset + low_pc, ctx->thunks) >= 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,13 +19,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#if defined(__svr4__) || defined(__sun)
|
|
||||||
#define __ELF__ 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -37,8 +30,6 @@
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
|
|
||||||
#ifdef __ELF__
|
|
||||||
|
|
||||||
#define ELF_INFO_DEBUG_HEADER 0x0001
|
#define ELF_INFO_DEBUG_HEADER 0x0001
|
||||||
#define ELF_INFO_MODULE 0x0002
|
#define ELF_INFO_MODULE 0x0002
|
||||||
#define ELF_INFO_NAME 0x0004
|
#define ELF_INFO_NAME 0x0004
|
||||||
|
@ -1778,22 +1769,3 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr)
|
||||||
pcs->loader = &elf_loader_ops;
|
pcs->loader = &elf_loader_ops;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !__ELF__ */
|
|
||||||
|
|
||||||
BOOL elf_map_handle(HANDLE handle, struct image_file_map* fmap)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL elf_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int elf_is_in_thunk_area(ULONG_PTR addr,
|
|
||||||
const struct elf_thunk_area* thunks)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif /* __ELF__ */
|
|
||||||
|
|
|
@ -21,9 +21,6 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -42,8 +39,6 @@
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
|
|
||||||
#ifdef HAVE_MACH_O_LOADER_H
|
|
||||||
|
|
||||||
struct dyld_image_info32
|
struct dyld_image_info32
|
||||||
{
|
{
|
||||||
UINT32 imageLoadAddress; /* const struct mach_header* */
|
UINT32 imageLoadAddress; /* const struct mach_header* */
|
||||||
|
@ -1933,12 +1928,3 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr)
|
||||||
TRACE("Found macho debug header %#lx\n", pcs->dbg_hdr_addr);
|
TRACE("Found macho debug header %#lx\n", pcs->dbg_hdr_addr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* HAVE_MACH_O_LOADER_H */
|
|
||||||
|
|
||||||
BOOL macho_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* HAVE_MACH_O_LOADER_H */
|
|
||||||
|
|
|
@ -4,4 +4,4 @@ files:
|
||||||
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
||||||
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
||||||
tags:
|
tags:
|
||||||
wine: 9896f1ce33561771989d3117c1536fb472df8558
|
wine: 131fb79535c74e8011ac82c279f6f4a9d971e1af
|
||||||
|
|
Loading…
Reference in a new issue