Commit Graph

144 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 83c1255f66 dbghelp: Fix mapping of DWARF register numbers on x86 OS X.
For backward compatibility with old, buggy GCC, Apple uses a different register
numbering scheme for the eh_frame section.

See, for reference, the comments near the top of this file from LLDB's source:
https://github.com/llvm-mirror/lldb/blob/release_36/source/Plugins/Process/Utility/RegisterContext_x86.h
2015-06-29 19:07:51 +09:00
Ken Thomases dcbec3bf6a dbghelp: Use existing IMAGE_NO_MAP constant instead of redundant MACHO_NO_MAP. 2015-06-25 14:02:00 +09:00
Ken Thomases 8430ebc6b5 dbghelp: Eliminate an unnecessary parameter from macho_load_debug_info().
From outside of macho_module.c, it's only called with NULL.  When it's
called with a non-NULL parameter, it's just a thin wrapper around
macho_load_debug_info_from_map(), so the code can just call that
directly.
2015-06-25 14:01:26 +09:00
Francois Gouget ed82981ae0 dbghelp: Mark internal symbols with hidden visibility. 2015-03-16 15:06:29 +09:00
Francois Gouget ba6e4ff66e dbghelp: pe_unmap_directory() is unused so remove it. 2015-03-16 15:03:31 +09:00
Frédéric Delanoy 1d65efe50b dbghelp: Use BOOL type where appropriate. 2013-11-12 12:58:03 +01:00
Alexandre Julliard 836b682ed3 dbghelp: Remove a useless DllMain, msvcrt can't be unloaded. 2013-11-11 11:49:18 +01:00
Eric Pouech a672a51cbf dbghelp: Allow each CPU backend to save CPU specific memory ranges in minidump.
Used this feature to add x86_64 unwind information.
2012-01-24 18:10:32 +01:00
Eric Pouech 1c5450f91f dbghelp: Allow CPU backends to add specific information into a minidump.
Use it to add a 256 byte block around current program counter.
2012-01-24 18:10:32 +01:00
Eric Pouech 026ec7f690 dbghelp: Do all module and symbol names matching using unicode string (and new regular expression matcher). 2012-01-23 16:07:39 +01:00
Eric Pouech 82d961e382 dbghelp: Always ensure that 64bit module functions use real 64bit addresses. 2012-01-23 15:59:59 +01:00
Frédéric Delanoy f932abf326 dlls: Assorted spelling fixes. 2011-08-01 18:26:27 +02:00
Andrew Nguyen 6ee16099a3 dbghelp: Implement SymEnumSourceFilesW. 2011-06-01 17:59:17 +02:00
Marcus Meissner b858b53991 dbghelp: Mark internal symbols as hidden. 2011-04-28 18:13:56 +02:00
Eric Pouech 9c09f14270 dbghelp: Extended CPU structure by adding a default register number for frame. 2011-04-12 12:49:53 +02:00
Eric Pouech dca2d350ad dbghelp: Add helper to get global address out of symt, instead of going though symt_get_info. 2011-03-09 13:52:41 +01:00
Eric Pouech 031cce8e77 dbghelp: Added support for variables in thread storage. 2011-01-31 14:30:13 +01:00
Alexandre Julliard 3bae7d0383 dbghelp: Add a helper function to determine the name of the wine loader. 2011-01-28 11:41:14 +01:00
Alexandre Julliard cf1cd33570 dbghelp: Support pointer types of various sizes. 2011-01-13 20:09:49 +01:00
Eric Pouech c7c8c0dea7 dbghelp: Speed up source string creation (by using rb trees). 2011-01-10 13:03:52 +01:00
Eric Pouech 99439e7589 dbghelp: Added preliminary extended FPO information out of PDB files. 2011-01-10 12:52:18 +01:00
Eric Pouech 0693572e4c dbghelp: Use new file/debug format framework to allow keeping pdb files opened. 2011-01-10 12:52:01 +01:00
Eric Pouech 1acbb1c0ed dbghelp: Restructure internal PDB information. 2011-01-10 12:51:39 +01:00
Eric Pouech 2a87a89680 dbghelp: Only map an ELF file once. 2010-10-11 17:11:17 +02:00
Eric Pouech 229d753bc9 dbghelp: Some more 64bit base address fixes. 2010-10-11 17:07:57 +02:00
Eric Pouech 1e141eee4f dbghelp: Allow loading PE module with 64bit addresses. 2010-10-11 12:54:18 +02:00
Eric Pouech 1e0af22ad2 dbghelp: dwarf debug info: a few more fixes to dwarf parsing. 2010-08-26 12:42:15 +02:00
Eric Pouech 083eca072d dbghelp: Properly manage in dbghelp interfaces local variables and parameters that are constant. 2010-06-08 12:59:26 +02:00
Eric Pouech 34ef8d2113 dbghelp: Store delta used for re-locating a module. 2010-04-02 10:34:37 +02:00
Eric Pouech 036392c5d1 dbghelp: Added preliminary CFA management. 2010-03-29 11:38:17 +02:00
Eric Pouech 1d60aa6000 dbghelp: Extend the CPU object in order to manipulate context's registers (getting context's content & register names). 2010-03-29 11:37:39 +02:00
Eric Pouech e2b62c91d5 dbghelp: Created a CPU method to map dwarf register number to codeview register number. 2010-03-25 09:45:32 +01:00
Eric Pouech 51e9951a5f dbghelp: Enhanced x86_64 stack unwinding with PE's function table data. 2010-03-25 09:45:11 +01:00
Eric Pouech bf97b03db5 dbghelp: Implemented SymFunctionTableAccess. 2010-03-22 11:27:36 +01:00
Eric Pouech 2ed8b9f6b6 dbghelp: Added helper to image_file_map to map also directory out of PE executables. 2010-03-22 11:27:32 +01:00
Eric Pouech cecb80a4e8 dbghelp: Move the mach-o information into the modfmt structure. 2010-03-19 12:23:36 +01:00
Eric Pouech fe2ae803ee dbghelp: Moved the ELF's module information into the new scheme. 2010-03-19 12:08:46 +01:00
Eric Pouech cd92e3d147 dbghelp: Move the PE debug info to the newly define scheme. 2010-03-19 12:08:37 +01:00
Eric Pouech 73f79e7fad dbghelp: Create new infrastructure to hold specific information for multiple file/debug formats in a single module, and use it to store dwarf2 stuff. 2010-03-19 12:08:27 +01:00
Eric Pouech 2d8c788353 dbghelp: Let dwarf_parse decide on which sections it needs to map. 2010-03-19 12:08:03 +01:00
Eric Pouech a2e65f1311 dbghelp: Keep the file map around for every PE module, so that we can access image whenever we like to. 2010-03-19 12:07:27 +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 770f0d834f dbghelp: Make the ELF mapping code easier to use. 2010-03-19 12:03:57 +01:00
Eric Pouech 9d7b6b65ef dbghelp: Added helper to free module's specific data (ELF, MSC...) upon removal. 2010-03-16 13:30:46 +01:00
Eric Pouech 181de55619 dbghelp: Removed some unused fields for public symbol description. 2010-01-25 12:52:46 +01:00
Eric Pouech ed96e740e9 dbghelp: Add a couple of helpers to struct cpu to help adding the stack to minidump. 2009-12-23 14:27:29 +01:00
Eric Pouech 7230659ce9 dbghelp: Create a cpu backend to store CPU dependent code, and use it for the i386 stack implementation. 2009-12-23 14:27:29 +01:00
Eric Pouech 2d85d5c235 dbghelp: Generalize helper to get a string from an ADDRESS64. 2009-12-22 15:39:20 +01:00
Eric Pouech 9500df82f1 dbghelp: Move the core of some line related functions to 64bit interface. 2009-12-15 11:58:39 +01:00