Gerald Pfeifer : dbghelp: Make ehdr_addr in elf_enum_modules_internal dependent on AT_SYSINFO_EHDR.
Alexandre Julliard
julliard at winehq.org
Wed Dec 29 11:14:49 CST 2010
Module: wine
Branch: master
Commit: 8f7d06b69bd23c23e900980e464b0ec6c1d0dcf9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8f7d06b69bd23c23e900980e464b0ec6c1d0dcf9
Author: Gerald Pfeifer <gerald at pfeifer.com>
Date: Tue Dec 28 22:24:57 2010 +0100
dbghelp: Make ehdr_addr in elf_enum_modules_internal dependent on AT_SYSINFO_EHDR.
---
dlls/dbghelp/elf_module.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 2bfa2a4..ff8b9d2 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1404,7 +1404,6 @@ static BOOL elf_enum_modules_internal(const struct process* pcs,
struct link_map lm;
char bufstr[256];
WCHAR bufstrW[MAX_PATH];
- unsigned long ehdr_addr;
if (!pcs->dbg_hdr_addr ||
!ReadProcessMemory(pcs->handle, (void*)pcs->dbg_hdr_addr,
@@ -1431,11 +1430,17 @@ static BOOL elf_enum_modules_internal(const struct process* pcs,
if (!cb(bufstrW, (unsigned long)lm.l_addr, (unsigned long)lm.l_ld, FALSE, user)) break;
}
}
+
#ifdef AT_SYSINFO_EHDR
- if (!lm_addr && elf_search_auxv(pcs, AT_SYSINFO_EHDR, &ehdr_addr))
+ if (!lm_addr)
{
- static const WCHAR vdsoW[] = {'[','v','d','s','o',']','.','s','o',0};
- cb(vdsoW, ehdr_addr, 0, TRUE, user);
+ unsigned long ehdr_addr;
+
+ if (elf_search_auxv(pcs, AT_SYSINFO_EHDR, &ehdr_addr))
+ {
+ static const WCHAR vdsoW[] = {'[','v','d','s','o',']','.','s','o',0};
+ cb(vdsoW, ehdr_addr, 0, TRUE, user);
+ }
}
#endif
return TRUE;
More information about the wine-cvs
mailing list