Commit 31fd8dd7 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

dbghelp: Include Mach-O modules in minidumps.

parent 3a96219d
...@@ -316,6 +316,27 @@ static BOOL fetch_elf_module_info_cb(const WCHAR* name, unsigned long base, ...@@ -316,6 +316,27 @@ static BOOL fetch_elf_module_info_cb(const WCHAR* name, unsigned long base,
return TRUE; return TRUE;
} }
/******************************************************************
* fetch_macho_module_info_cb
*
* Callback for accumulating in dump_context a Mach-O modules set
*/
static BOOL fetch_macho_module_info_cb(const WCHAR* name, unsigned long base,
void* user)
{
struct dump_context* dc = (struct dump_context*)user;
DWORD rbase, size, checksum;
/* FIXME: there's no relevant timestamp on Mach-O modules */
/* NB: if we have a non-null base from the live-target use it. If we have
* a null base, then grab its base address from Mach-O file.
*/
if (!macho_fetch_file_info(name, &rbase, &size, &checksum))
size = checksum = 0;
add_module(dc, name, base ? base : rbase, size, 0 /* FIXME */, checksum, TRUE);
return TRUE;
}
static void fetch_modules_info(struct dump_context* dc) static void fetch_modules_info(struct dump_context* dc)
{ {
EnumerateLoadedModulesW64(dc->hProcess, fetch_pe_module_info_cb, dc); EnumerateLoadedModulesW64(dc->hProcess, fetch_pe_module_info_cb, dc);
...@@ -325,6 +346,7 @@ static void fetch_modules_info(struct dump_context* dc) ...@@ -325,6 +346,7 @@ static void fetch_modules_info(struct dump_context* dc)
* a given application in a post mortem debugging condition. * a given application in a post mortem debugging condition.
*/ */
elf_enum_modules(dc->hProcess, fetch_elf_module_info_cb, dc); elf_enum_modules(dc->hProcess, fetch_elf_module_info_cb, dc);
macho_enum_modules(dc->hProcess, fetch_macho_module_info_cb, dc);
} }
static void fetch_module_versioninfo(LPCWSTR filename, VS_FIXEDFILEINFO* ffi) static void fetch_module_versioninfo(LPCWSTR filename, VS_FIXEDFILEINFO* ffi)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment