Commit 5c397763 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

dbghelp: Add support for loading an external DWARF debug info file associated with a Mach-O module.

Such external debug info files are created by the dsymutil command. Usually, it creates a <name>.dSYM bundle directory but it can also produce a <name>.dwarf flat file. The code will find and use either. It first checks if such a bundle or file is adjacent to the module binary. If it's not, it uses Spotlight to search for a .dSYM bundle based on the binary's UUID, which is what gdb and lldb do, too. That way, it can find it anywhere on the system.
parent 70565f1b
......@@ -3,7 +3,7 @@ IMPORTLIB = dbghelp
EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DDLLPREFIX='"$(DLLPREFIX)"'
IMPORTS = psapi
DELAYIMPORTS = version
EXTRALIBS = $(Z_LIBS)
EXTRALIBS = $(Z_LIBS) $(CORESERVICES_LIBS) $(COREFOUNDATION_LIBS)
C_SRCS = \
coff.c \
......
......@@ -110,10 +110,12 @@ struct image_file_map
size_t segs_size;
size_t segs_start;
int fd;
struct image_file_map* dsym; /* the debug symbols file associated with this one */
#ifdef HAVE_MACH_O_LOADER_H
macho_mach_header mach_header;
const struct load_command* load_commands;
const struct uuid_command* uuid;
/* The offset in the file which is this architecture. mach_header was
* read from arch_offset. */
......
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