30 #define WIN32_NO_STATUS 36 #define WINE_MOUNTMGR_EXTENSIONS 132 #ifdef WORDS_BIGENDIAN 133 #define swap_ulong_be_to_host(n) (n) 135 #define swap_ulong_be_to_host(n) (RtlUlongByteSwap(n)) 148 #define MACHO_DYLD_IN_SHARED_CACHE 0x80000000 150 #define MACHO_FAT_MAGIC 0xcafebabe 151 #define MACHO_MH_MAGIC_32 0xfeedface 152 #define MACHO_MH_MAGIC_64 0xfeedfacf 154 #define MACHO_CPU_TYPE_X86 0x00000007 155 #define MACHO_CPU_TYPE_X86_64 0x01000007 157 #define MACHO_MH_EXECUTE 0x2 158 #define MACHO_MH_DYLIB 0x6 159 #define MACHO_MH_DYLINKER 0x7 160 #define MACHO_MH_BUNDLE 0x8 161 #define MACHO_MH_DSYM 0xa 163 #define MACHO_LC_SEGMENT 0x01 164 #define MACHO_LC_SYMTAB 0x02 165 #define MACHO_LC_SEGMENT_64 0x19 166 #define MACHO_LC_UUID 0x1b 168 #define MACHO_SECTION_TYPE 0x000000ff 169 #define MACHO_S_ATTR_PURE_INSTRUCTIONS 0x80000000 170 #define MACHO_S_ATTR_SOME_INSTRUCTIONS 0x00000400 172 #define UUID_STRING_LEN 37 189 #define MACHO_INFO_MODULE 0x0001 190 #define MACHO_INFO_NAME 0x0002 203 sprintf(
out,
"%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
225 file_offset = fmap->arch_offset +
offset;
226 misalign = file_offset & pagemask;
227 *out_aligned_offset = file_offset - misalign;
228 *out_aligned_end = file_offset +
len;
230 *out_misalign = misalign;
241 ULONG_PTR misalign, aligned_offset, aligned_map_end;
242 const void* aligned_ptr;
245 TRACE(
"(%p/%p, 0x%08lx, 0x%08lx)\n", fmap, fmap->handle,
offset,
len);
251 ERR(
"map creation %p failed %u size %lu\n", fmap->handle,
GetLastError(), aligned_map_end);
262 TRACE(
"Mapped (0x%08lx - 0x%08lx) to %p\n", aligned_offset, aligned_map_end, aligned_ptr);
266 return (
const char*)aligned_ptr + misalign;
277 TRACE(
"(%p, %p, %p/%p, 0x%08lx, 0x%08lx)\n",
base, mapped, fmap, fmap->handle,
offset,
len);
281 ULONG_PTR misalign, aligned_offset, aligned_map_end;
287 aligned_ptr = (
char*)*mapped - misalign;
289 aligned_ptr = (
void*)*
base;
291 WARN(
"Couldn't unmap the range\n");
309 const void** mapped1,
const void** mapped2)
311 ULONG_PTR aligned_offset1, aligned_map_end1;
312 ULONG_PTR aligned_offset2, aligned_map_end2;
314 TRACE(
"(%p/%p, 0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx, %p, %p)\n", fmap, fmap->handle,
315 offset1, len1, offset2, len2, mapped1, mapped2);
320 if (aligned_map_end1 < aligned_offset2 || aligned_map_end2 < aligned_offset1)
332 if (offset1 < offset2)
336 *mapped2 = (
const char*)*mapped1 + offset2 - offset1;
342 *mapped1 = (
const char*)*mapped2 + offset1 - offset2;
346 TRACE(
" => %p, %p\n", *mapped1, *mapped2);
361 const void** mapped1,
const void** mapped2)
363 ULONG_PTR aligned_offset1, aligned_map_end1;
364 ULONG_PTR aligned_offset2, aligned_map_end2;
366 TRACE(
"(%p/%p, 0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx, %p/%p, %p/%p)\n", fmap, fmap->handle,
367 offset1, len1, offset2, len2, mapped1, *mapped1, mapped2, *mapped2);
372 if (aligned_map_end1 < aligned_offset2 || aligned_map_end2 < aligned_offset1)
379 if (offset1 < offset2)
397 struct macho_file_map* fmap;
399 char tmp[
sizeof(fmap->sect[0].section.sectname)];
403 if (sectname[0] ==
'.')
406 lstrcpynA(tmp + 2, sectname + 1,
sizeof(tmp) - 2);
413 for (
i = 0;
i < fmap->num_sections;
i++)
415 if (!fmap->sect[
i].ignored &&
416 strcmp(fmap->sect[
i].section.sectname, sectname) == 0 &&
417 (!segname ||
strcmp(fmap->sect[
i].section.segname, segname) == 0))
442 struct macho_file_map* fmap = &ism->
fmap->u.macho;
445 if (ism->
sidx < 0 || ism->
sidx >= ism->
fmap->u.macho.num_sections || fmap->sect[ism->
sidx].ignored)
449 &fmap->sect[ism->
sidx].mapped);
457 struct macho_file_map* fmap = &ism->
fmap->u.macho;
462 fmap->sect[ism->
sidx].section.size);
471 if (ism->
sidx < 0 || ism->
sidx >= ism->
fmap->u.macho.num_sections ||
472 ism->
fmap->u.macho.sect[ism->
sidx].ignored)
474 return ism->
fmap->u.macho.sect[ism->
sidx].section.addr - ism->
fmap->u.macho.segs_start;
482 if (ism->
sidx < 0 || ism->
sidx >= ism->
fmap->u.macho.num_sections ||
483 ism->
fmap->u.macho.sect[ism->
sidx].ignored)
485 return ism->
fmap->u.macho.sect[ism->
sidx].section.size;
508 fmap, fmap->header_size, fmap->commands_size,
NULL);
509 TRACE(
"Mapped load commands: %p\n", fmap->load_commands);
512 return fmap->load_commands;
524 TRACE(
"Unmapping load commands: %p\n", fmap->load_commands);
526 fmap->header_size, fmap->commands_size);
555 struct macho_file_map* fmap = &ifm->
u.
macho;
560 TRACE(
"(%p/%p, %u, %p, %p)\n", fmap, fmap->handle,
cmd,
cb,
user);
564 TRACE(
"%u total commands\n", fmap->commands_count);
570 if (
cmd &&
cmd != lc->cmd)
continue;
574 TRACE(
"load_command[%d] (%p), cmd %u; callback => %d\n",
i, lc, lc->cmd,
result);
606 TRACE(
"(%p/%p, %p, %p) segment %s\n", ifm, ifm->
u.
macho.handle, lc,
user,
622 struct macho_file_map* fmap = &ifm->
u.
macho;
651 TRACE(
"(%p/%p, %p, %p) before: 0x%08lx - 0x%08lx\n", fmap, fmap->handle, lc,
user,
664 TRACE(
"Ignoring __PAGEZERO segment\n");
666 TRACE(
"Ignoring %s segment because image has split segments\n",
segname);
670 if (vmaddr < fmap->segs_start)
671 fmap->segs_start =
vmaddr;
675 if (fmap->segs_size < tmp) fmap->segs_size = tmp;
687 fmap->sect[
info->section_index].section.addr =
section->addr;
688 fmap->sect[
info->section_index].section.size =
section->size;
689 fmap->sect[
info->section_index].section.offset =
section->offset;
690 fmap->sect[
info->section_index].section.align =
section->align;
691 fmap->sect[
info->section_index].section.reloff =
section->reloff;
692 fmap->sect[
info->section_index].section.nreloc =
section->nreloc;
693 fmap->sect[
info->section_index].section.flags =
section->flags;
699 fmap->sect[
info->section_index].ignored =
ignore;
700 info->section_index++;
723 struct macho_file_map* fmap = &ifm->
u.
macho;
729 fmap->num_sections = 0;
741 struct macho_file_map* fmap = &ifm->
u.
macho;
778 if (!
ReadFile(fmap->handle, &fat_header,
sizeof(fat_header), &bytes_read,
NULL) || bytes_read !=
sizeof(fat_header))
783 TRACE(
"... got possible fat header\n");
789 for (
i = 0;
i < narch;
i++)
800 if (!
ReadFile(fmap->handle, &fat_arch,
sizeof(fat_arch), &bytes_read,
NULL) || bytes_read !=
sizeof(fat_arch))
808 if (
i >= narch)
goto done;
813 fmap->arch_offset = 0;
814 TRACE(
"... not a fat header\n");
819 if (!
ReadFile(fmap->handle, &mach_header, fmap->header_size, &bytes_read,
NULL)
820 || bytes_read != fmap->header_size)
822 TRACE(
"... got possible Mach header\n");
826 fmap->commands_count = mach_header.
ncmds;
839 TRACE(
"... verified Mach header\n");
841 fmap->num_sections = 0;
844 TRACE(
"%d sections\n", fmap->num_sections);
851 fmap->segs_start = ~0
L;
854 info.section_index = 0;
857 fmap->num_sections = 0;
861 fmap->segs_size -= fmap->segs_start;
862 TRACE(
"segs_start: 0x%08lx, segs_size: 0x%08lx\n", (
ULONG_PTR)fmap->segs_start,
873 TRACE(
"no UUID found\n");
933 if (!sectidx)
return FALSE;
936 if (sectidx >=
fmap->num_sections ||
fmap->sect[sectidx].ignored)
return FALSE;
970 BOOL is_public,
BOOL is_global,
unsigned char sectidx,
976 TRACE(
"(%p, 0x%08lx, %s, 0x%08lx, %d, %d, %u, %p, %p/%p/%p)\n",
module, load_offset,
1002 struct macho_file_map* fmap = &ifm->
u.
macho;
1005 const char* stabstr;
1010 TRACE(
"(%p/%p, %p, %p) %u syms at 0x%08x, strings 0x%08x - 0x%08x\n", fmap, fmap->handle, lc,
1014 sc->
stroff, sc->
strsize, (
const void**)&stab, (
const void**)&stabstr))
1018 mdi->
module->format_info[
DFI_MACHO]->u.macho_info->load_addr - fmap->segs_start,
1019 stab, sc->
nsyms, stabsize,
1024 sc->
stroff, sc->
strsize, (
const void**)&stab, (
const void**)&stabstr);
1062 switch (sym->
symt.tag)
1068 TRACE(
"Adjusting function %p/%s!%s from 0x%08lx to 0x%08lx\n",
func,
1085 TRACE(
"Adjusting data symbol %p/%s!%s from 0x%08lx to 0x%08lx\n",
1091 if (
data->u.var.offset == ste->
addr)
1096 if (
data->kind != new_kind)
1098 WARN(
"Changing kind for %p/%s!%s from %d to %d\n", sym,
1100 (
int)
data->kind, (
int)new_kind);
1101 data->kind = new_kind;
1111 TRACE(
"Ignoring tag %u\n", sym->
symt.tag);
1136 if (ste->
used)
continue;
1157 FIXME(
"Duplicate in %s: %s<%08lx> %s<%s-%s>\n",
1216 if (dsym_ifm.
u.
macho.uuid && !
memcmp(dsym_ifm.
u.
macho.uuid->uuid, fmap->uuid->uuid,
sizeof(fmap->uuid->uuid)))
1220 *fmap->dsym = dsym_ifm;
1224 TRACE(
"candidate debug symbol file at %s has wrong UUID %s; ignoring\n",
debugstr_w(
path),
1236 '\\',
'R',
'e',
's',
'o',
'u',
'r',
'c',
'e',
's',
1237 '\\',
'D',
'W',
'A',
'R',
'F',
'\\',0};
1290 static const WCHAR dot_dsym[] = {
'.',
'd',
'S',
'Y',
'M',0};
1291 static const WCHAR dot_dwarf[] = {
'.',
'd',
'w',
'a',
'r',
'f',0};
1369 struct macho_file_map *fmap;
1380 TRACE(
"(%p, %p/%p)\n",
module, fmap, fmap->handle);
1401 WARN(
"Couldn't correctly read stabs\n");
1405 mdi.
fmap = &fmap->dsym->u.macho;
1410 WARN(
"Couldn't correctly read stabs\n");
1478 if (!modfmt)
goto leave;
1554 static const WCHAR S_libstdcPPW[] = {
'l',
'i',
'b',
's',
't',
'd',
'c',
'+',
'+',
'\0'};
1587 fallback =
L"/usr/local/lib:/lib:/usr/lib";
1602 const WCHAR* main_name,
1626 image_infos.
infos64.infoArrayCount =
temp.infoArrayCount;
1629 if (!image_infos.
infos64.infoArray)
1642 TRACE(
"... read image infos\n");
1644 for (
i = 0;
i < image_infos.
infos64.infoArrayCount;
i++)
1655 if (
info.imageFilePath &&
1658 bufstr[
sizeof(bufstr) - 1] =
'\0';
1661 if (main_name && !bufstrW[0])
lstrcpyW(bufstrW, main_name);
1662 if (!
cb(bufstrW,
info.imageLoadAddress,
user))
break;
1798 if (
pcs->dbg_hdr_addr)
1848 image_infos.
infos64.infoArrayCount =
temp.infoArrayCount;
1852 if (image_infos.
infos64.infoArray && image_infos.
infos64.infoArrayCount &&
1858 image_info.
info64.imageLoadAddress =
temp.imageLoadAddress;
1859 image_info.
info64.imageFilePath =
temp.imageFilePath;
BOOL symt_get_address(const struct symt *type, ULONG64 *addr) DECLSPEC_HIDDEN
struct symt_function * symt_new_function(struct module *module, struct symt_compiland *parent, const char *name, ULONG_PTR addr, ULONG_PTR size, struct symt *type) DECLSPEC_HIDDEN
void module_set_module(struct module *module, const WCHAR *name) DECLSPEC_HIDDEN
struct hash_table_elt hash_elt
#define MACHO_S_ATTR_PURE_INSTRUCTIONS
static BOOL macho_load_file_cb(void *param, HANDLE handle, const WCHAR *filename)
static char * format_uuid(const UINT8 uuid[16], char out[UUID_STRING_LEN])
#define MACHO_S_ATTR_SOME_INSTRUCTIONS
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
DWORD dwAllocationGranularity
static struct module * macho_load_module(struct process *pcs, const WCHAR *name, ULONG_PTR addr)
static BOOL macho_load_debug_info(struct process *pcs, struct module *module)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
int ignore(int trapCode, ppc_trap_frame_t *trap)
GLuint GLuint GLsizei count
static const struct macho_load_command * macho_map_load_commands(struct macho_file_map *fmap)
struct hash_table ht_symbols
static void macho_unmap_range(const char **base, const void **mapped, const struct macho_file_map *fmap, ULONG_PTR offset, ULONG_PTR len)
void macho_unmap_section(struct image_section_map *ism)
static const WCHAR dsym_subpath[]
struct hash_table_elt ht_elt
struct image_file_map * fmap
BOOL search_dll_path(const struct process *process, const WCHAR *name, BOOL(*match)(void *, HANDLE, const WCHAR *), void *param) DECLSPEC_HIDDEN
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetLastError(VOID)
static const struct image_file_map_ops macho_file_map_ops
int align(int length, int align)
#define MACHO_MH_MAGIC_64
#define SYMOPT_DEFERRED_LOADS
struct dyld_image_info32 info32
static const WCHAR filenameW[]
#define sprintf(buf, format,...)
GLenum GLuint GLenum GLsizei const GLchar * buf
void * pool_alloc(struct pool *a, size_t len) DECLSPEC_HIDDEN
WCHAR LoadedImageName[256]
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
#define MACHO_DYLD_IN_SHARED_CACHE
struct section sections[2]
static BOOL macho_load_file(struct process *pcs, const WCHAR *filename, ULONG_PTR load_addr, struct macho_info *macho_info)
static BOOL macho_synchronize_module_list(struct process *pcs)
void hash_table_iter_init(const struct hash_table *ht, struct hash_table_iter *hti, const char *name) DECLSPEC_HIDDEN
struct dyld_all_image_infos32 infos32
#define MOUNTMGR_DOS_DEVICE_NAME
static BOOL macho_sect_is_code(struct macho_file_map *fmap, unsigned char sectidx)
static BOOL macho_enum_modules(struct process *process, enum_modules_cb cb, void *user)
static int macho_parse_symtab(struct image_file_map *ifm, const struct macho_load_command *lc, void *user)
unsigned int section_index
static int macho_enum_load_commands(struct image_file_map *ifm, unsigned cmd, int(*cb)(struct image_file_map *, const struct macho_load_command *, void *), void *user)
static const struct loader_ops macho_loader_ops
static WCHAR * query_dsym(const GUID *uuid, const WCHAR *filename)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
struct module * module_is_already_loaded(const struct process *pcs, const WCHAR *imgname) DECLSPEC_HIDDEN
static BOOL macho_enum_modules_internal(const struct process *pcs, const WCHAR *main_name, enum_modules_cb cb, void *user)
const WCHAR * process_getenv(const struct process *process, const WCHAR *name)
struct image_file_map * alternate
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
BOOL dwarf2_parse(struct module *module, ULONG_PTR load_offset, const struct elf_thunk_area *thunks, struct image_file_map *fmap) DECLSPEC_HIDDEN
const struct loader_ops * loader
#define MACHO_INFO_MODULE
static BOOL macho_search_and_load_file(struct process *pcs, const WCHAR *filename, ULONG_PTR load_addr, struct macho_info *macho_info)
#define CreateFileMappingW(a, b, c, d, e, f)
static void macho_calc_range(const struct macho_file_map *fmap, ULONG_PTR offset, ULONG_PTR len, ULONG_PTR *out_aligned_offset, ULONG_PTR *out_aligned_end, ULONG_PTR *out_misalign)
BOOL macho_read_wine_loader_dbg_info(struct process *pcs, ULONG_PTR addr)
static BOOL macho_find_section(struct image_file_map *ifm, const char *sectname, struct image_section_map *ism)
#define MACHO_MH_MAGIC_32
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
GLenum GLenum GLenum GLenum mapping
BOOL search_unix_path(const WCHAR *name, const WCHAR *path, BOOL(*match)(void *, HANDLE, const WCHAR *), void *param) DECLSPEC_HIDDEN
struct macho_info macho_info
static BOOL macho_fetch_file_info(struct process *process, const WCHAR *name, ULONG_PTR load_addr, DWORD_PTR *base, DWORD *size, DWORD *checksum)
void hash_table_add(struct hash_table *ht, struct hash_table_elt *elt) DECLSPEC_HIDDEN
struct hash_table ht_symtab
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define MACHO_CPU_TYPE_X86
static void macho_stabs_def_cb(struct module *module, ULONG_PTR load_offset, const char *name, ULONG_PTR offset, BOOL is_public, BOOL is_global, unsigned char sectidx, struct symt_compiland *compiland, void *user)
void pool_init(struct pool *a, size_t arena_size) DECLSPEC_HIDDEN
GLenum const GLvoid * addr
static __inline const char * debugstr_an(const char *s, int n)
struct symt_public * symt_new_public(struct module *module, struct symt_compiland *parent, const char *typename, BOOL is_function, ULONG_PTR address, unsigned size) DECLSPEC_HIDDEN
#define memcpy(s1, s2, n)
void * hash_table_iter_up(struct hash_table_iter *hti) DECLSPEC_HIDDEN
static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum)
static void macho_unmap_load_commands(struct macho_file_map *fmap)
char * pool_strdup(struct pool *a, const char *str) DECLSPEC_HIDDEN
static BOOL macho_enum_sync_cb(const WCHAR *name, ULONG_PTR addr, void *user)
static UINT_PTR page_mask
WCHAR * get_wine_loader_name(struct process *pcs) DECLSPEC_HIDDEN
const struct image_file_map_ops * ops
#define MACHO_MH_DYLINKER
static const struct macho_load_command * macho_next_load_command(const struct macho_load_command *lc)
#define MACHO_CPU_TYPE_X86_64
static int macho_count_sections(struct image_file_map *ifm, const struct macho_load_command *lc, void *user)
static void find_and_map_dsym(struct process *pcs, struct module *module)
static unsigned __int64 next
BOOL symt_get_info(struct module *module, const struct symt *type, IMAGEHLP_SYMBOL_TYPE_INFO req, void *pInfo) DECLSPEC_HIDDEN
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
void pool_destroy(struct pool *a) DECLSPEC_HIDDEN
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static void macho_module_remove(struct process *pcs, struct module_format *modfmt)
struct image_file_map::@377::macho_file_map macho
static int macho_load_section_info(struct image_file_map *ifm, const struct macho_load_command *lc, void *user)
unsigned macho_get_map_size(const struct image_section_map *ism)
static const char * macho_map_range(const struct macho_file_map *fmap, ULONG_PTR offset, ULONG_PTR len, const char **base)
const WCHAR S_WineLoaderW[]
unsigned short is_virtual
DWORD_PTR macho_get_map_rva(const struct image_section_map *ism)
#define FIELD_OFFSET(t, f)
static int find_uuid(struct image_file_map *ifm, const struct macho_load_command *lc, void *user)
struct macho_file_map * fmap
#define ReadFile(a, b, c, d, e)
DWORD calc_crc32(HANDLE handle)
static BOOL macho_map_ranges(const struct macho_file_map *fmap, ULONG_PTR offset1, ULONG_PTR len1, ULONG_PTR offset2, ULONG_PTR len2, const void **mapped1, const void **mapped2)
BOOL module_remove(struct process *pcs, struct module *module) DECLSPEC_HIDDEN
struct hash_table_elt hash_elt
struct macho_info macho_info
#define MultiByteToWideChar
void hash_table_init(struct pool *pool, struct hash_table *ht, unsigned num_buckets) DECLSPEC_HIDDEN
static HMODULE MODULEINFO DWORD cb
static void reset_file_map(struct image_file_map *ifm)
const WCHAR * module_name
BOOL stabs_parse(struct module *module, ULONG_PTR load_offset, const char *stabs, size_t nstab, size_t stabsize, const char *strs, int strtablen, stabs_def_cb callback, void *user) DECLSPEC_HIDDEN
struct symt_data * symt_new_global_variable(struct module *module, struct symt_compiland *parent, const char *name, unsigned is_static, struct location loc, ULONG_PTR size, struct symt *type) DECLSPEC_HIDDEN
#define SYMOPT_PUBLICS_ONLY
#define swap_ulong_be_to_host(n)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
int strcmp(const char *String1, const char *String2)
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_macho)
struct module * module_new(struct process *pcs, const WCHAR *name, enum module_type type, BOOL virtual, DWORD64 addr, DWORD64 size, ULONG_PTR stamp, ULONG_PTR checksum) DECLSPEC_HIDDEN
WCHAR * get_dos_file_name(const WCHAR *filename) DECLSPEC_HIDDEN
struct dyld_image_info64 info64
static void macho_unmap_file(struct image_file_map *fmap)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define MACHO_SECTION_TYPE
static void macho_finish_stabs(struct module *module, struct hash_table *ht_symtab)
#define SYMOPT_NO_PUBLICS
unsigned long long UINT64
static BOOL try_dsym(struct process *pcs, const WCHAR *path, struct macho_file_map *fmap)
union image_file_map::@377 u
struct dyld_all_image_infos64 infos64
IMAGEHLP_MODULEW64 module
struct module_format * format_info[DFI_LAST]
struct macho_info * macho_info
static BOOL read_process_memory(const struct process *process, UINT64 addr, void *buf, size_t size)
void user(int argc, const char *argv[])
static void macho_unmap_ranges(const struct macho_file_map *fmap, ULONG_PTR offset1, ULONG_PTR len1, ULONG_PTR offset2, ULONG_PTR len2, const void **mapped1, const void **mapped2)
#define HeapFree(x, y, z)
const char * macho_map_section(struct image_section_map *ism)
static BOOL image_uses_split_segs(struct process *process, ULONG_PTR load_addr)
static BOOL macho_load_cb(const WCHAR *name, ULONG_PTR addr, void *user)
struct image_file_map * dsym
struct symt_compiland * compiland
struct image_file_map file_map
static BOOL macho_find_segment_section(struct image_file_map *ifm, const char *segname, const char *sectname, struct image_section_map *ism)
static BOOL macho_search_loader(struct process *pcs, struct macho_info *macho_info)
static BOOL macho_map_file(struct process *pcs, const WCHAR *filenameW, BOOL split_segs, struct image_file_map *ifm)
struct symt_ht * symt_find_nearest(struct module *module, DWORD_PTR addr) DECLSPEC_HIDDEN
static BOOL heap_free(void *mem)
BOOL(* enum_modules_cb)(const WCHAR *, ULONG_PTR addr, void *user)
#define MACHO_LC_SEGMENT_64
GLuint const GLchar * name