https://git.reactos.org/?p=reactos.git;a=commitdiff;h=13d60fef36e09b84008de…
commit 13d60fef36e09b84008de8ec239e4fd72729cba6
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Fri Sep 11 19:00:43 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Wed Sep 16 10:35:55 2020 +0200
[WINESYNC] dbghelp: Get rid of get_dyld_image_info_address.
We should get the address from PEB anyway.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id f2b8af7e7e159a5259aaab42169c4f8220b121eb by Jacek Caban
<jacek(a)codeweavers.com>
---
dll/win32/dbghelp/macho_module.c | 45 +---------------------------------------
sdk/tools/winesync/dbghelp.cfg | 2 +-
2 files changed, 2 insertions(+), 45 deletions(-)
diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c
index 795b8500d9d..8aa232e1ed2 100644
--- a/dll/win32/dbghelp/macho_module.c
+++ b/dll/win32/dbghelp/macho_module.c
@@ -37,12 +37,6 @@
#include <assert.h>
#include <stdarg.h>
#include <errno.h>
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef HAVE_SYS_MMAN_H
-# include <sys/mman.h>
-#endif
#include "ntstatus.h"
#define WIN32_NO_STATUS
@@ -54,8 +48,6 @@
#ifdef HAVE_MACH_O_LOADER_H
-#include <mach-o/nlist.h>
-
struct dyld_image_info32
{
UINT32 imageLoadAddress; /* const struct mach_header* */
@@ -1455,41 +1447,6 @@ static void macho_module_remove(struct process* pcs, struct
module_format* modfm
HeapFree(GetProcessHeap(), 0, modfmt);
}
-/******************************************************************
- * get_dyld_image_info_address
- */
-static ULONG_PTR get_dyld_image_info_address(struct process* pcs)
-{
- ULONG_PTR dyld_image_info_address = 0;
-
-#ifndef __LP64__ /* No reading the symtab with nlist(3) in LP64 */
- if (!dyld_image_info_address)
- {
- static void* dyld_all_image_infos_addr;
-
- /* Our next best guess is that dyld was loaded at its base address
- and we can find the dyld image infos address by looking up its symbol. */
- if (!dyld_all_image_infos_addr)
- {
- struct nlist nl[2];
- memset(nl, 0, sizeof(nl));
- nl[0].n_un.n_name = (char*)"_dyld_all_image_infos";
- if (!nlist("/usr/lib/dyld", nl))
- dyld_all_image_infos_addr = (void*)nl[0].n_value;
- }
-
- if (dyld_all_image_infos_addr)
- {
- TRACE("got dyld_image_info_address %p from /usr/lib/dyld symbol
table\n",
- dyld_all_image_infos_addr);
- dyld_image_info_address = (ULONG_PTR)dyld_all_image_infos_addr;
- }
- }
-#endif
-
- return dyld_image_info_address;
-}
-
/******************************************************************
* macho_load_file
*
@@ -1964,7 +1921,7 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR
addr)
struct macho_info macho_info;
TRACE("(%p/%p)\n", pcs, pcs->handle);
- pcs->dbg_hdr_addr = addr ? addr : get_dyld_image_info_address(pcs);
+ pcs->dbg_hdr_addr = addr;
macho_info.flags = MACHO_INFO_MODULE;
if (!macho_search_loader(pcs, &macho_info)) return FALSE;
macho_info.module->format_info[DFI_MACHO]->u.macho_info->is_loader = 1;
diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg
index 93502e635a9..4b2aa38d50d 100644
--- a/sdk/tools/winesync/dbghelp.cfg
+++ b/sdk/tools/winesync/dbghelp.cfg
@@ -4,4 +4,4 @@ files:
include/dbghelp.h: sdk/include/psdk/dbghelp.h
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
tags:
- wine: dab78486d3d0063e32e99fb795311b74eb632d3a
+ wine: f2b8af7e7e159a5259aaab42169c4f8220b121eb