Commit Graph

843 Commits

Author SHA1 Message Date
Nikolay Sivov ab27cb48fc dbghelp: Support CIE version 4 in parse_cie_details().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-07 10:41:07 +09:00
Jacek Caban b15cccd2dc dbghelp: Removed no longer needed wine_rb_destroy call.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-06 11:28:39 +09:00
Jacek Caban acc0bb0521 rbtree.h: Pass compare function instead of wine_rb_functions to wine_rb_init.
Also change return type to void since the function can no longer fail.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-02 23:30:29 +09:00
Nikolay Sivov 99f56bf78d dbghelp: Recognize DW_FORM_flag_present.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-26 10:53:11 +09:00
Austin English 6e0366fd5e dbghelp: Add forwards for EnumerateLoadedModulesEx/EnumerateLoadedModulesExW.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-18 21:18:33 +09:00
Andrey Gusev b3c254cd75 dbghelp: Fix a typo in comment.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-05 01:27:51 +09:00
Thomas Faber e91c06b068 dbghelp: Use documented member name in SYMBOL_INFO structure.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 12:20:58 +09:00
Michael Stefaniuc c8ab4004ad dbghelp: Use CONTAINING_RECORD instead of reimplementing it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-08 21:29:15 +09:00
André Hentschel d8a39d40d8 dbghelp: Add even more symbol types.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-11 19:39:22 +09:00
Ralf Habacker 6018064d59 dbghelp: Fix crash in module_find_cb on trying to parse non image files.
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-11 16:43:21 +09:00
Austin English 4f3f8a8cb7 dbghelp: Version to 6.1.7601.17514.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-10 18:35:36 +09:00
Alexandre Julliard 1fa7710ff9 makefiles: Get rid of the DLLPREFIX variable.
Android libraries will be handled differently.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-09 12:12:58 +09:00
André Hentschel ee88d4ed99 dbghelp: Initialize more basic types.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-13 22:21:13 +09:00
Qian Hong fd9d4b6232 dbghelp: Parse DW_TAG_const_type inside dwarf2_parse_subprogram.
Signed-off-by: Qian Hong <qhong@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-12 23:34:57 +09:00
Qian Hong 62d6a09085 dbghelp: Parse DW_TAG_const_type inside dwarf2_parse_subprogram_block.
Signed-off-by: Qian Hong <qhong@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-12 23:34:57 +09:00
Ken Thomases d5739561d8 dbghelp: Provide a default value for DYLD_FALLBACK_LIBRARY_PATH, which is closer to how dyld behaves. 2015-09-18 14:59:01 +02:00
Ken Thomases 8d6b349409 dbghelp: Fix a comment to reflect what the code's actually doing. 2015-09-18 14:58:58 +02:00
Ken Thomases f458cd844a dbghelp: On Mac, get the wineloader path from the target or our own process before resorting to guessing.
This makes backtraces more reliably complete when WINELOADER isn't set
and the loader isn't in a typical location.
2015-09-18 14:58:55 +02:00
Francois Gouget f8a7d6ed74 Assorted spelling fixes. 2015-08-07 23:50:48 +09:00
Sebastian Lackner fa4dfa4325 dbghelp: Implement UnDecorateSymbolNameW.
Also fixes a bug in UnDecorateSymbolName when undecorated_length == 0.
2015-08-06 23:36:02 +09:00
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 be68890cac dbghelp: Fix a copy-paste error in comparing Mach-O segment names. 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 70565f1b8b dbghelp: Don't parse the DWARF info from Mach-O files if we were requested to only provide public symbols.
This now works more like how the ELF and PE support works.
2015-06-29 19:07:52 +09: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 3a9698f4af dbghelp: Parse the DWARF information in Mach-O modules.
At this point, this is just the .eh_frame information used for walking the stack.
2015-06-25 14:29:38 +09:00
Ken Thomases 500df92108 dbghelp: Add partial support for version 3 of DWARF CIEs which are generated by Clang/LLVM. 2015-06-25 14:29:38 +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 729b53fb9e dbghelp: For Mach-O, keep the module file mapped for as long as the module is tracked. 2015-06-25 14:02:17 +09:00
Ken Thomases e15e9331cb dbghelp: Move the macho_file_map structure into image_file_map. 2015-06-25 14:02:12 +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 41d741761f dbghelp: Remove the unused arch_size field of struct macho_file_map.
It was set, but never read.
2015-06-25 14:01:54 +09:00
Ken Thomases 4923f9afd5 dbghelp: Enable enumerating and loading 64-bit Mach-O modules. 2015-06-25 14:01:49 +09:00
Ken Thomases 378d557d77 dbghelp: Fix a leak of the Mach-O module structure by adding a module_remove callback. 2015-06-25 14:01:32 +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
Ken Thomases 604ce29cb3 dbghelp: Fix STABS support for 64-bit on OS X.
OS X uses a struct nlist_64 for 64-bit images, where the n_value field is a
64-bit unsigned integer.
2015-06-25 14:01:10 +09:00
André Hentschel bd1f7ef186 include: Rename 64-bit PState to 32-bit Cpsr on ARM64. 2015-06-15 14:51:33 +09:00
André Hentschel 8e0164bd26 include: Add more ARM64 CV constants. 2015-05-28 14:20:55 +09:00
André Hentschel 0d68edf03e dbghelp: Fix typo in trace output. 2015-05-20 22:10:19 +09:00
Austin English f832f85c80 dbghelp: Ignore some more symbol ids.
These are from MSVC 2013.
2015-05-20 17:32:49 +09:00
Grazvydas Ignotas 2fee06de49 dbghelp: Detect if return address information is missing. 2015-04-07 15:08:44 +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
Francois Gouget 654657b715 dbghelp: Remove an unneeded NONAMELESSSTRUCT directive. 2015-03-10 15:18:25 +09:00
Michael Stefaniuc 1328ec4854 dbghelp: Remove no-op additions with 0 (PVS-Studio). 2015-03-09 22:06:39 +09:00
Francois Gouget 11f985541a dbghelp: Fix compilation on systems that don't support nameless unions. 2015-03-02 13:49:02 +09:00
David Heidelberg e6e50f6c47 dbghelp: Implement DW_TAG_unspecified_type. 2015-02-13 00:45:25 +09:00
Charles Davis b3232e7c9d dbghelp: Support 64-bit dyld_all_image_infos structures, too. 2015-02-06 22:35:23 +09:00
Sebastian Lackner c6fcb427a2 dbghelp: Don't fill KdHelp structure for usermode applications. 2015-02-03 14:40:50 +09:00
André Hentschel b2f967e086 dbghelp: Fix compiler warnings with flag -Wunused-macros. 2014-12-10 13:31:05 +01:00