Commit Graph

13 Commits

Author SHA1 Message Date
Ken Thomases 49f0bf6f0b dbghelp: Ignore Mach-O segments other than __TEXT for images in dyld's shared cache.
Images in the shared cache have their segments mapped non-contiguously.  We
don't know how to find where the non-__TEXT segments actually are.  Also, the
code assumes that the image is mapped contiguously in various places.  So, we
just ignore those segments.

Treating the non-contiguous segments as though they were contiguous caused
their apparent memory ranges to overlap, leading to addresses being attributed
to the wrong module, let alone symbol.
2015-08-04 12:21:58 +02:00
Ken Thomases 5c39776327 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.
2015-06-29 19:07:52 +09:00
Ken Thomases 0bfa11455c dbghelp: Implement the image_private.h functions for Mach-O modules. 2015-06-25 14:29:38 +09:00
Ken Thomases e15e9331cb dbghelp: Move the macho_file_map structure into image_file_map. 2015-06-25 14:02:12 +09:00
Eric Pouech 8328606141 dbghelp: Store the 32/64 bitness in the image structure. 2012-02-14 12:31:48 +01:00
Marcus Meissner b858b53991 dbghelp: Mark internal symbols as hidden. 2011-04-28 18:13:56 +02:00
Eric Pouech 1966ba8b7f dbghelp: For targets on Linux, report the VDSO system page as a known ELF module. 2010-12-28 11:18:33 +01:00
Eric Pouech 749dafd987 dbghelp: Extend elf_map_file so that it can also handle ELF maps directly from debuggee address space. 2010-12-28 11:16:07 +01:00
Andrew Talbot 4e4948cfbf dbghelp: Constify some variables. 2010-08-30 15:38:56 +02:00
Eric Pouech c9bac2efd2 dbghelp: Extend the image (ELF/PE) scheme to get the RVA out of a section. 2010-03-19 12:07:45 +01:00
Eric Pouech cbff4f063f dbghelp: Create the notion of image (PE, ELF modules) to uniformize some handlings. 2010-03-19 12:05:59 +01:00
Eric Pouech fb169502a5 dbghelp: Extend the ELF image management to PE modules so we get a rather uniform interface to image manipulation. 2010-03-19 12:04:19 +01:00
Eric Pouech 770f0d834f dbghelp: Make the ELF mapping code easier to use. 2010-03-19 12:03:57 +01:00