Commit Graph

1262 Commits

Author SHA1 Message Date
Jacek Caban 6b1bc0beac dbghelp: Get rid of no longer needed HAVE_ZLIB checks.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 09:13:51 +02:00
Jacek Caban cf6bbb96d0 dbghelp: Build with ucrtbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Jacek Caban 5bc58410f2 dbghelp: Don't use PATH to search for libraries.
It should be used only for the main executable, for which we get full
path anyway.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Jacek Caban ceae3f0207 dbghelp: Remove unneeded includes.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Jacek Caban d483eb21cf dbghelp: Import zlib inflate code.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Jacek Caban 131fb79535 dbghelp: Always build all loader backends.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Jacek Caban 9896f1ce33 dbghelp: Fix GCC warnings in macho_module.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Jacek Caban 26f5bfdd4d dbghelp: Introduce read_process_memory helper.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Chip Davis 53b5c3b6c6 dbghelp: Ignore N_INDR symbols.
These are aliases for another symbol. They are often seen on Mac OS when
a dylib reexports some symbols defined in another dylib.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:41 +02:00
Jacek Caban 88edff8467 dbghelp: Use mount manager to lookup dsym by uuid.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 17:02:35 +02:00
Jacek Caban c3c2cda9d2 dbghelp: Factor out query_dsym.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 17:02:32 +02:00
Jacek Caban 3047385437 dbghelp: Don't bother trying to initialize loader backend if we can't get debug base address from PEB.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 20:49:33 +02:00
Jacek Caban f2b8af7e7e dbghelp: Get rid of get_dyld_image_info_address.
We should get the address from PEB anyway.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 20:49:20 +02:00
Jacek Caban dab78486d3 dbghelp: Don't use _NSGetExecutablePath in macho_search_loader.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 20:48:49 +02:00
Jacek Caban e341bd7fe4 dbghelp: Use local constants definitions instead of mach-o/loader.h.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 20:48:43 +02:00
Jacek Caban 1420e64e5f dbghelp: Don't use stdint.h types.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 20:48:36 +02:00
Jacek Caban 0c56a8f87b dbghelp.c: Use local mach header declaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 20:48:29 +02:00
Jacek Caban 7b2e53f5b5 dbghelp: Use local symtab and segment commands declarations.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 22:13:07 +02:00
Jacek Caban 8230889f1f dbghelp: Use local fat header declaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 21:17:24 +02:00
Jacek Caban 64341284c5 dbghelp: Use local macho section declaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 21:17:24 +02:00
Jacek Caban c695e7e99e dbghelp: Use local macho load command declaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 21:17:24 +02:00
Jacek Caban 7254579417 dbghelp: Don't store entire mach header in image_file_map.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 21:17:24 +02:00
Jacek Caban b664ae8e60 dbghelp: Don't use system headers for ELF declarations.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:16:00 +02:00
Jacek Caban 56f2b950c3 dbghelp: Use local ELF constants definitions.
Based on glibc.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:15:29 +02:00
Jacek Caban 6fde25300d dbghelp: Don't use ELF32_ST_BIND and ELF32_ST_TYPE macros.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:15:21 +02:00
Jacek Caban 66ab2c503d dbghelp: Inline ELF magic constants.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:15:14 +02:00
Jacek Caban 7b12b1849c dbghelp: Use local symbol table entry declaration.
Based on glibc.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:15:05 +02:00
Jacek Caban 849cf6ed51 dbghelp: Use local dynamic section entry declaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:14:44 +02:00
Jacek Caban 186d610442 dbghelp: Use local ELF program segment header declaration.
Based on glibc.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:14:39 +02:00
Jacek Caban a6f0fe8d1c dbghelp: Use local elf_section_header declaration.
Based on glibc.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:14:34 +02:00
Jacek Caban 78845911da dbghelp: Use local elf_header declaration.
Based on glibc.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:14:25 +02:00
Jacek Caban 11ea231501 dbghelp: Use local declarations of r_debug and link_map structs.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:14:16 +02:00
Jacek Caban 620019fd71 dbghelp: Use local AT_SYSINFO_EHDR definition.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:14:06 +02:00
Jacek Caban ee34cf365d dbghelp: Don't use *_NULL constants.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:13:56 +02:00
Jacek Caban 2534c2a2d2 dbghelp: Use local NOTE_GNU_BUILD_ID declaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 22:13:49 +02:00
Jacek Caban 94ad6bd2e6 dbghelp: Fix misleading indentation warning.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:10 +02:00
Jacek Caban 9c2cedabc7 dbghelp: Pass stab size to stabs_parse.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:10 +02:00
Jacek Caban f48f8cc399 dbghelp: Use local declaration for 64-bit macho nlist.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:10 +02:00
Jacek Caban 061146c2ab dbghelp: Use local stab_nlist declaration in macho_module.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Jacek Caban 47f1c5a993 dbghelp: Clear N_PEXT flag of stab type in macho files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Jacek Caban 208719a750 dbghelp: Provide N_PEXT and N_SECT defines when not available.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Jacek Caban 3b6c268380 dbghelp: Use DWARF registry mapping quirk only for actual macho modules.
Fixes handling DWARF in PE on macOS.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Jacek Caban 5d8067c608 dbghelp: Pass module to map_dwarf_register.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Gerald Pfeifer f7a091af48 dbghelp: Define NT_GNU_BUILD_ID regardless of whether __ELF__ is defined.
Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Jacek Caban f803da493a dbghelp: Use LONG_PTR instead of long type.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 18:34:50 +01:00
Jacek Caban 8d702a3aa5 dbghelp: Remove unused code in module_find_cb.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 18:34:50 +01:00
Jacek Caban e3354e44f1 dbghelp: Move reading debug base address from PEB to check_live_target.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 19:30:30 +01:00
Jacek Caban 635506921a dbghelp: Use PE type for virtual modules.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 19:30:23 +01:00
Jacek Caban c8b5a3be55 dbghelp: Explicitly pass file type to path_find_symbol_file.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 19:30:14 +01:00
Jacek Caban a676c5785e dbghelp: Use loader_ops for load_debug_info.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 19:30:09 +01:00
Jacek Caban 5ae3f969d4 dbghelp: Use loader_ops for load_module.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 19:30:04 +01:00
Jacek Caban 16a3481bd2 dbghelp: Use loader_ops for enum_modules.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 19:29:50 +01:00
Jacek Caban 2a5160c4f2 dbghelp: Pass process struct to image_uses_split_segs.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01:00
Jacek Caban 1bbd54409a dbghelp: Use loader_ops for fetch_file_info.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01:00
Jacek Caban adecdb1d01 dbghelp: Don't use elf_fetch_file_info and macho_fetch_file_info in module_find_cb.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01:00
Jacek Caban fec0157585 dbghelp: Introduce loader_ops to abstract platform-specific loader and use it to synchronize module list.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01:00
Jacek Caban f30fdd1822 dbghelp: Move loader search functions to the end of module files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01:00
Jacek Caban 724f433f39 dbghelp: Pass process struct to elf_enum_modules and macho_enum_modules.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01:00
Jacek Caban 6b3018d03d dbghelp: Store process struct pointer in dump context.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01:00
Jacek Caban be9072ec74 dbghelp: Use search_dll_path to load seach macho files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 20:59:03 +01:00
Jacek Caban c3bb866bfc dbghelp: Use search_unix_path to load seach macho files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 20:59:01 +01:00
Jacek Caban ca49552f64 dbghelp: Introduce search_unix_path helper and use it in elf_search_and_load_file.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 20:58:59 +01:00
Jacek Caban ee5d29b7aa dbghelp: Use search_dll_path in elf_search_and_load_file.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 20:58:57 +01:00
Jacek Caban 21af2e1947 dbghelp: Make dll builtin PE path search helper more generic.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 20:58:54 +01:00
Jacek Caban 77e880e6d2 dbghelp: Use file_name helper in more places.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 20:58:52 +01:00
Jacek Caban 63d41a41f2 dbghelp: Rename helpers to make unicode variants default.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 20:58:50 +01:00
Jacek Caban 1ece841d93 dbghelp: Use page size from sysinfo.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 19:32:33 +01:00
Jacek Caban 7544b9f6fb dbghelp: Call GetSystemInfo in DllMain.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 19:32:31 +01:00
Jacek Caban ebf57f01f4 dbghelp: Use Windows API to map macho files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 20:32:38 +01:00
Jacek Caban 838de56e0a dbghelp: Lookup real image paths in image_locate_debug_link.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 20:27:10 +01:00
Jacek Caban 2642f43eab dbghelp: Support PE debug link files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 20:27:08 +01:00
Jacek Caban 0dd4958688 dbghelp: Support GNU debug link and build id in PE files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 20:27:06 +01:00
Jacek Caban 4694801e4f dbghelp: Move elf_check_alternate implementation to module.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 20:27:02 +01:00
Jacek Caban d386823979 dbghelp: Move get_dos_file_name to path.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 20:26:52 +01:00
Jacek Caban 171c6fadab dbghelp: Use elf_check_debug_link in elf_locate_build_id_target.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 20:26:50 +01:00
Jacek Caban c1d867fa87 dbghelp: Check checksum before mapping elf file.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 20:26:47 +01:00
Jacek Caban 5ba1c5960e dbghelp: Pass module struct to elf_locate_debug_link.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:39:04 +01:00
Jacek Caban e1b28a9c98 dbghelp: Support Windows paths in elf_locate_debug_link.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:39:00 +01:00
Jacek Caban a5a6b0dcb6 dbghelp: Move HANDLE-based crc32 helper to dbghelp.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:38:56 +01:00
Jacek Caban 1d96af3627 dbghelp: Introduce generic image_unmap_file.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:38:52 +01:00
Jacek Caban 95a5f82961 dbghelp: Use vtbl to handle different image_file_map types.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:38:47 +01:00
Jacek Caban 02dfd959ca dbghelp: Move alternate file map pointer to generic image_file_map.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:38:41 +01:00
Jacek Caban a3e1c7fa02 dbghelp: Use generic image_find_section in elf_check_alternate.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:38:34 +01:00
Jacek Caban a60b3985bf dbghelp: Use Windows API to map ELF files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:19 +01:00
Jacek Caban d731208602 dbghelp: Search also real path location in path_find_symbol_file.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 20:13:10 +01:00
Jacek Caban e21b61392c dbghelp: Try loading builtin modules from unix installation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 20:13:08 +01:00
Piotr Caban 7e16acf380 dbghelp: Use RtlImageDirectoryEntryToData in pe_load_msc_debug_info.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-18 20:32:54 +01:00
Piotr Caban ab4c64a409 dbghelp: Support 32 and 64-bit binaries in ImageDirectoryEntryToDataEx.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-18 20:30:44 +01:00
Chip Davis 8000b5415d dbghelp: Look for .eh_fram if no .eh_frame is found.
lld produces these, because '.eh_frame' misses the eight-character limit
by one character, but '.eh_fram' does not. This allows it to avoid
producing a string table for this common section.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-13 15:59:55 +01:00
André Hentschel 7a567d1bb0 dbghelp: Fix MiniDumpWriteDump spec file entry.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:57:15 +01:00
Ken Thomases 4b9defe09a dbghelp: Fix reading the target's dyld image info, based on its CPU architecture.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:55:33 +01:00
Ken Thomases 28a25b052d dbghelp: Fix reading the address of the target's dyld image info from its PEB.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:55:29 +01:00
Alex Henrie ae6e401754 dbghelp: Avoid dead assignment (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 10:14:27 +02:00
Rémi Bernon d263ba97fb dbghelp: Prevent an invalid memory access when the search path element is empty.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-29 20:08:14 +02:00
Conor McCarthy 9d3687ad32 dbghelp: Return NULL instead of IMAGE_NO_MAP when PE file mapping fails.
A NULL test is always applied to the return value from pe_map_full(), but
IMAGE_NO_MAP is not NULL, it is ((void*)-1).

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 10:52:03 +02:00
Zebediah Figura a91b0faefd dbghelp: Use RtlComputeCrc32().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 10:52:03 +02:00
Alistair Leslie-Hughes 4aa7fbe056 dbghelp: Return a dos path from SymGetLineFromAddr.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34687
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 22:45:03 +02:00
Alistair Leslie-Hughes 101820d01a dbghelp: Use internal flag for loading native files.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 12:29:30 +02:00
Alistair Leslie-Hughes fa5e5df71d dbghelp: SymSet/GetExtendedOption support a WINE only option.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 12:29:26 +02:00
Alistair Leslie-Hughes 3fed878725 dbghelp: Add SymGetExtendedOption/SymSetExtendedOption stubs.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 12:29:21 +02:00
Alistair Leslie-Hughes 48a74277f5 dbghelp: Support S_HEAPALLOCSITE entry.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 19:01:27 +02:00
Michael Stefaniuc 594a5878d0 dbghelp: Fix the spelling of a parameter.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-04 23:06:03 +02:00
Alexandre Julliard 7ac6cdfa00 configure: Use pkg-config to check for zlib.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-04 19:23:11 +02:00
Alexandre Julliard d5a372abbb include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Piotr Caban 061f65f9aa dbghelp: Don't use strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:50:40 +02:00
Alexandre Julliard 3d6febc997 include: Get rid of the DPRINTF() macro.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:34:44 +02:00
Francois Gouget 5651c9dd28 dbghelp: Make minidump_add_memory64_block() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 10:11:53 +01:00
Francois Gouget ab71398eb0 dbghelp: Spelling fixes in a couple of comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 16:11:53 +01:00
Eric Bissonnette b90bbcbe75 dbghelp: Support full memory dumps.
Add support of flag MinidumpWithFullMemory in function
MinidumpWriteDump. A Memory64ListStream is added to the minidump
streams and all memory regions of the process with MEM_COMMIT state
are written to the last part of the minidump file.

Signed-off-by: Eric Bissonnette <ebisso.dev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 19:40:11 +01:00
Francois Gouget edcff4046c dbghelp: Make symt_get_best_at() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-10 15:51:18 +01:00
Zebediah Figura 797f93be65 dbghelp: Avoid using inline assembly in have_x86cpuid().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 10:43:37 +01:00
Zebediah Figura b7f3e6ba31 dbghelp: Avoid using inline assembly in do_x86cpuid().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 10:43:37 +01:00
Huw Davies 74f425e70d dbghelp: Fix build failure on macOS.
This was caused by commit 8d096fb5e2.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-27 19:32:15 +01:00
Andreas Maier d614ac4671 dbghelp: SymFromAddr: Handle 2 or more symbols at the same address correct.
Signed-off-by: Andreas Maier <staubim@quantentunnel.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:29:37 +01:00
Andreas Maier 6c3418914d dbghelp: Set last error for SymGetModuleBase-calls to ERROR_MOD_NOT_FOUND.
Signed-off-by: Andreas Maier <staubim@quantentunnel.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:29:29 +01:00
Andreas Maier 8d096fb5e2 dbghelp: Set correct values in symt_fill_sym_info (SYMBOL_INFO).
Signed-off-by: Andreas Maier <staubim@quantentunnel.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:29:26 +01:00
Andreas Maier dbcf9728fa dbghelp: Use correct record in codeview_snarf_public.
Use public_vx iststead of data_vx for public symbols.

Signed-off-by: Andreas Maier <staubim@quantentunnel.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 12:29:20 +01:00
Zebediah Figura 63ef9854fb dbghelp: Only check process architecture if we are actually given a process.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45407
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Alexandre Julliard 3e1a562901 dbghelp: Return a Unicode path in path_find_symbol_file().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-15 14:24:58 +01:00
Andreas Maier 6030ee5f6f dbghelp: Search for debug files in module path too.
Signed-off-by: Andreas Maier <andy1.m@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-15 14:15:51 +01:00
Alex Henrie f333c4a210 dbghelp: Turn variable 'code' into a static constant.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-12 10:21:52 +01:00
Zebediah Figura 86805c3d4b dbghelp/dwarf: Use debugstr_a() to trace external strings.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 10:24:18 +02:00
Józef Kucia b3717a92d1 dbghelp: Fix memory leak in SymInitializeW() (Coverity).
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-19 19:22:02 +02:00
Francois Gouget 44598d335e dbghelp/tests: Make stack_walk_thread() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 20:01:56 +02:00
Zebediah Figura ca9b1d0077 dbghelp/msc: Use the word size of the target process.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 13:55:55 +02:00
Zebediah Figura b7defd2946 dbghelp: Correctly determine the dyld image info address.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 13:55:55 +02:00
Zebediah Figura 42745c068f dbghelp/dwarf: Use the word size of the target process.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45490
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 13:55:55 +02:00
Zebediah Figura 3507615f35 dbghelp/dwarf: Allow get_context_reg() to handle different register sizes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 13:55:55 +02:00
Zebediah Figura 9ae588a96e dbghelp/dwarf: Use the correct backend CPU in dwarf2_virtual_unwind().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 13:55:55 +02:00
Zebediah Figura 3ce304e601 dbghelp: Use WOW64_CONTEXT instead of CONTEXT for i386 backend.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 13:55:55 +02:00
Ken Thomases 3ff8fa7ed1 dbghelp: Fix loading of Mach-O load commands for 64-bit binaries.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-17 08:41:22 +02:00
Michael Stefaniuc 053a7e225c dbghelp: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-13 00:18:02 +02:00
Zebediah Figura 8dc0d36717 dbghelp/tests: Add a simple test for StackWalk64().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-05 19:57:16 +02:00
André Hentschel 3d482d3f9f dbghelp: Recompute location after fixing it.
Fix a assertion raised by every exception with newer clang versions (>3.7) at least on ARM64:
../../../dlls/dbghelp/dwarf.c:1641: void dwarf2_parse_variable(dwarf2_subprogram_t *, struct symt_block *, dwarf2_debug_info_t *): Assertion `subpgm->func' failed.

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-03 11:12:43 +02:00
André Hentschel 86864486be dbghelp: Map SIMD dwarf registers on ARM64.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-28 22:51:12 +02:00
Zebediah Figura 7d441808ac dbghelp: Read the stabs nlist entry corresponding to the target's architecture.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-15 12:56:48 +02:00
Zebediah Figura 1dc9bb70cd dbghelp: Translate the 32-bit Mach-O section header to the 64-bit one.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-15 12:56:48 +02:00
Zebediah Figura 0fc3c33637 dbghelp: Read the Mach-O segment command corresponding to the target's architecture.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-15 12:56:48 +02:00
Zebediah Figura bf7681cb2f dbghelp: Pass an image_file_map to macho_enum_load_commands().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-15 12:56:48 +02:00
Zebediah Figura f2e38e1795 dbghelp: Read the 32-bit Mach-O header.
It is identical to the 64-bit header, except for the "reserved" field.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-15 12:56:48 +02:00
Zebediah Figura f0ee3471f3 dbghelp: Determine the target Mach-O architecture from the process's architecture.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-15 12:56:48 +02:00
Zebediah Figura 99e818154a dbghelp: Read the r_debug and link_map structs corresponding to the target's architecture.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-05 09:21:59 +02:00
Zebediah Figura 7e4fd17d5b dbghelp: Translate the 32-bit ELF symbol struct to the 64-bit one.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-05 09:21:49 +02:00
Zebediah Figura 51ada19ac2 dbghelp: Read the Elf_auxv_t struct corresponding to the target's architecture.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-05 09:21:38 +02:00
Zebediah Figura bb53152faa dbghelp: Read the Elf_Dyn struct corresponding to the target's architecture.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-05 09:21:34 +02:00
Zebediah Figura bd620ffb44 dbghelp: Read the ELF program header corresponding to the target's architecture.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-05 09:21:28 +02:00
Huw Davies cf78601b37 dbghelp: Add a missing include to fix the build.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-01 19:42:25 +02:00
Zebediah Figura 4005901773 dbghelp: Translate the 32-bit ELF section header to the 64-bit one.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-01 19:42:12 +02:00
Zebediah Figura 799e0bfa57 dbghelp: Translate the 32-bit ELF header to the 64-bit one.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-01 19:42:03 +02:00
Zebediah Figura a612f1f56f dbghelp: Detect ELF architecture before reading the whole header.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-01 19:41:54 +02:00
Zebediah Figura c2c0e4fe51 dbghelp: Don't enforce child architecture in elf_map_file().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-01 19:41:46 +02:00
Zebediah Figura 185d9ee7eb dbghelp: Correctly determine the wine loader base address.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-31 21:36:47 +02:00
Zebediah Figura a981edf0bc dbghelp: Determine the wine loader name from the target process's architecture.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-31 21:36:42 +02:00
Zebediah Figura 9b973eee9e dbghelp: Add a helper to check if a given module is the Wine loader.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-31 21:35:48 +02:00
Martin Storsjo e0780c258f ntdll: Update the ARM64 CONTEXT struct to match Win SDK 10.0.16299.0.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 13:13:59 +01:00
Zebediah Figura 5d740ddcfe dbghelp: Avoid an infinite loop.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:59 +01:00
Nikolay Sivov 6fd9a98f1d dbghelp: Use correct module name buffer length when doing enumeration.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-31 17:54:55 +01:00
Nikolay Sivov 1d3c14d2d1 dbghelp: Use correct destination buffer length when initializing module data.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 20:42:07 +01:00
Nikolay Sivov da1d075b83 dbghelp: Make sure returned module info strings are null-terminated.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 20:42:07 +01:00
Nikolay Sivov aae9700acc dbghelp: Preserve caller supplied structure size member in SymGetModuleInfo() functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 20:42:07 +01:00
Alexandre Julliard 21c12ddc64 ntdll: Fix CONTEXT definition for ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:01 +01:00
Alexandre Julliard eb337adcc2 ntdll: Fix CONTEXT definition for ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 13:21:31 +01:00
Zebediah Figura 00e27186ed dbghelp: Silence a noisy FIXME.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-21 19:24:01 +02:00
Akihiro Sagawa d47c07d0cf dbghelp: Avoid using isdigit() for WCHARs.
Found with Coccinelle.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-16 18:58:58 +02:00
Daniel Lehman 8d6cf80026 dbghelp: Add support for char32_t type.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-04 09:13:22 +02:00
Daniel Lehman b316ac1897 dbghelp: Add support for char16_t type.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-04 09:13:18 +02:00
Alexandre Julliard 74f05b8660 dbghelp: Use the main module load address from the PEB.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-25 20:53:04 +02:00
Michael Stefaniuc 329b1763cb dbghelp: Use debugstr_a() to trace a string that can be NULL.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 19:03:19 +02:00
Jacek Caban 4bbb252adc dbghelp: Removed no longer needed psapi import.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-03 13:25:14 +01:00
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
Bruno Jesus a5c3f38773 dbghelp: Remove a dead assignment (Cppcheck). 2014-11-20 22:32:43 +09:00
David Heidelberger 4f18c053d3 winedbg: List Dwarf2 GNU extensions as TODO to workaround spam in debug. 2014-10-22 21:02:01 +09:00
David Heidelberger df5ff98b07 dbghelp: Implement DW_TAG_const_type in dwarf2_parse_udt_type. 2014-10-09 17:36:22 +02:00
Gerald Pfeifer a910704ccf dbghelp: Do not try to ignore the return codes in PEV_ERROR and and PEV_ERROR1. 2014-07-28 17:22:23 -05:00
Austin English 8980a6fa5c dbghelp: Ignore a few more symbol ids. 2014-07-14 09:57:48 +02:00
Ken Thomases 5acf1510fb dbghelp: Ignore the __PAGEZERO segment.
It made it seem as though the wineloader always started at address 0.
Issue identified by Jacek Caban.
2014-07-07 23:00:52 +02:00
Ken Thomases 1f2680f5f3 dbghelp: If the caller didn't provide a module load address use the segment start address. 2014-07-07 23:00:47 +02:00
Victor Martinez Calvo 9eca0aa8a7 dbghelp: Fix invalid assignment in symt_fill_sym_info. 2014-04-30 18:32:21 +02:00
André Hentschel 46594b8e6b dbghelp: Make pdb_load_stream_name_table a void function. 2014-04-29 11:18:56 +02:00
André Hentschel 1986dabc3e dbghelp: Use boolean return value in boolean function. 2014-04-29 11:18:51 +02:00
Alistair Leslie-Hughes b816a8e629 dbghelp: Improve dwarf support. 2014-03-26 19:20:42 +01:00
Alexandre Julliard cf0e96c6d0 configure: Rename substituted variables to a standard _CFLAGS and _LIBS format. 2014-01-30 14:51:33 +01:00
Andrey Gusev e7f0a8a081 Assorted spelling and typos fixes. 2014-01-27 17:00:11 +01:00
Frédéric Delanoy 74b0f6b4ad dbghelp: Remove an "#if 1" preprocessor directive. 2014-01-13 17:36:59 +01:00
Frédéric Delanoy 91f2435469 Assorted spelling fixes. 2014-01-09 17:39:59 +01:00
Alexandre Julliard 5e7416e5c8 makefiles: Get rid of the MAKE_DLL_RULES variable. 2014-01-02 12:08:18 +01:00
Frédéric Delanoy d066561625 dbghelp: Constify some character strings. 2013-12-16 12:02:49 +01:00
Ken Thomases 1577fb6c3f dbghelp: For Mach-O, get the address of the process's image info from its PEB. 2013-12-05 12:40:56 +01:00
Frédéric Delanoy 5ba7f79bad Assorted spelling fixes. 2013-12-03 19:41:53 +01:00
Ken Thomases 15467577fc dbghelp: Add debug logging to some error paths in the Mach-O support. 2013-12-03 12:34:45 +01:00
Ken Thomases 3fe34fe346 dbghelp: Fix some parameter names and types in the Mach-O support. 2013-12-03 12:33:55 +01:00
Stefan Leichter 89832cde4e dbghelp: Add a null check for optional output parameter for function SymFromAddr. 2013-12-02 10:50:32 +01: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
Frédéric Delanoy c002197692 dbghelp: Use BOOL type where appropriate. 2013-10-04 12:46:20 +02:00
Huw Davies 5c7c954658 dbghelp: Skip the dllprefix when matching PE with ELF modules. 2013-09-27 12:20:00 +02:00
Huw Davies 96e32da5c9 dbghelp: Add a couple of structures that are missing from the Android ndk. 2013-09-23 20:32:21 +02:00
Marcus Meissner b3f9747b28 dbghelp: Free srcpath in stabs handling (Coverity). 2013-06-24 11:45:10 +02:00
Marcus Meissner 7a406d0adf dbghelp: Free root in error case (Coverity). 2013-06-24 11:44:01 +02:00
Andrew Cook 878ea7d9ea dbghelp: Add stubs for SymSetHomeDirectory. 2013-04-01 20:42:33 +02:00
André Hentschel c174b3f5ec dbghelp: Remove SPARC support. 2013-03-05 11:01:11 +01:00
Jeff Muizelaar 03cae02611 dbghelp: Store the vendor id in the correct order. 2013-03-04 11:15:57 +01:00
Maarten Lankhorst 1dc3ef5188 dbghelp: Add support for zlib compressed debug sections.
Patch created with the assistance of Eric Pouech who helped diagnose
the problem, wrote some parts of this patch and reviewed this patch.
2013-01-30 20:10:44 +01:00
André Hentschel 9d49dd82e8 dbghelp: Remove useless code in ARM stack walk. 2013-01-23 12:44:12 +01:00
André Hentschel 49f59ccf71 dbghelp: Implement rudimentary stack walk for ARM64. 2013-01-23 12:44:06 +01:00
André Hentschel ce8640cbef dbghelp: Add ARM64 support. 2013-01-16 12:53:16 +01:00
Andrew Talbot ddf922d7a1 dbghelp: Avoid signed-unsigned integer comparisons. 2013-01-15 12:14:11 +01:00
Alexandre Julliard a81996d757 dbghelp: Use sysconf() instead of getpagesize(). 2013-01-09 12:15:25 +01:00
Andrew Talbot 9feb4053fe dbghelp: Indentation fix. 2012-12-17 11:47:38 +01:00
Marcus Meissner 6d6b216002 dbghelp: Size of the floating point stack registers is 10 bytes (Coverity). 2012-10-25 11:49:06 +02:00
André Hentschel 538a0abbd7 include: Rename IMAGE_FILE_MACHINE_ARMV7 to IMAGE_FILE_MACHINE_ARMNT. 2012-08-17 10:45:17 +02:00
Michael Stefaniuc 31fdb97632 dbghelp: Remove a superfluous TRUE:FALSE conditional expression. 2012-08-15 12:12:43 +02:00
Eric Pouech 83462bf081 dbghelp: Added support for index leaves in types definition for CodeView debug format. 2012-06-25 10:32:55 +02:00
Gerald Pfeifer 6cb7cd1983 dbghelp: Avoid unconditional use of NT_GNU_BUILD_ID. 2012-06-04 12:17:55 +02:00
Eric Pouech d647bd108c dbghelp: Use build-id information to locate debug information (and prefer it over .debug_link when both are present). 2012-06-01 13:24:36 +02:00
Eric Pouech dbd70d0917 dbghelp: Protect COFF line number parsing against out of bounds access. 2012-05-21 11:33:59 +02:00
Francois Gouget fac36c55e9 Assorted typo, spelling, wording and case fixes. 2012-05-15 16:26:43 +02:00
André Hentschel 89cb501927 dbghelp: Assorted fixes for shadow variables. 2012-04-23 12:58:36 +02:00
Thomas Faber 9f0119a0c0 dbghelp: Fix uninitialized variable usage. 2012-03-28 13:55:26 +02:00
Michael Stefaniuc 4cf695e164 dbghelp: Print the debug string and not the pointer to it. 2012-03-26 18:15:25 +02:00
Alexandre Julliard 0a7827b8b2 dbghelp: Add support for jump instructions in function epilogs on x86_64. 2012-03-16 13:16:45 +01:00
André Hentschel 84a036a435 dbghelp: Silence arm_fetch_minidump_module. 2012-03-09 11:34:13 +01:00
André Hentschel 138cb84be0 dbghelp: Add arm_fetch_minidump_thread implementation. 2012-03-09 11:34:02 +01:00
Eric Pouech 43f62c99b9 dbghelp: Fix a couple of traces in dwarf line info parsing. 2012-02-14 17:58:59 +01:00
Eric Pouech 90207b1d69 dbghelp: In i386 stack unwinder, only check for NULL ebp after calling the dwarf/MSVC unwinders as they allow NULL ebp. 2012-02-14 17:58:58 +01:00
Eric Pouech 0905afd0bc dbghelp: In traces for Dwarf/CFA engine, some offset are signed entities. 2012-02-14 17:58:58 +01:00
Eric Pouech 5201415626 dbghelp: In dwarf parser, when looking for FDE/CIE skip first O-length entries. 2012-02-14 17:58:56 +01:00
Eric Pouech 611d5e470d dbghelp: Correctly initialize module word_size field when only the eh_frame is present (and not compilation unit). 2012-02-14 17:58:54 +01:00
Eric Pouech 8328606141 dbghelp: Store the 32/64 bitness in the image structure. 2012-02-14 12:31:48 +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 d02295d998 dbghelp: Add our own thread data gathering struct for minidump internals instead on relying on SYSTEM_PROCESS_INFO. 2012-01-24 18:10:32 +01:00
Eric Pouech 2ce0e94018 winedbg, winedump: Embed wine build-id information info minidump, and display it. 2012-01-24 18:10:32 +01:00
Eric Pouech f3107df576 dbghelp: Use new regular expression matcher for files. 2012-01-23 16:07:39 +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 be9a7b9b97 dbghelp: Rewrote a simple regular expression matcher, and use for implementing SymMatchString[AW]. 2012-01-23 16:07:38 +01:00
Eric Pouech 7c2a5e184d dbghelp: In x86-64 support code, fix RUNTIME_FUNCTION dumping. 2012-01-23 16:06:49 +01:00
Eric Pouech 2ed88d7ac2 dbghelp: On x86-64 CPUs, add capability to interpret properly the epilog part. 2012-01-23 16:06:40 +01:00
Eric Pouech e40430cd16 dbghelp: Fix a couple of bugs in function table interpretation for x86-64 processors. 2012-01-23 15:59:59 +01:00
Eric Pouech 82d961e382 dbghelp: Always ensure that 64bit module functions use real 64bit addresses. 2012-01-23 15:59:59 +01:00
Alexandre Julliard 55107912f0 dbghelp: Fix a couple of pointer cast warnings. 2012-01-16 18:17:43 +01:00
Francois Gouget 67448e5661 dbghelp: Fix the position where the calling convention is specified in function pointers. 2012-01-16 12:45:33 +01:00
André Hentschel b95574e286 dbghelp: No need for WINE_ prefixed ERR. 2012-01-10 17:55:29 +01:00
Daniel Lehman 44233d5f07 dbghelp: Use CDECL calling convention for __unDName and callbacks. 2012-01-09 12:52:17 +01:00
Eric Pouech 28bb6f954a dbghelp: Correctly return flags in SYMBOL_INFO structure for local variables stored in a register. 2012-01-03 12:37:28 +01:00
André Hentschel c486cec0d6 dbghelp: Use ARMv7 for debugging. 2011-11-02 12:25:39 +01:00
André Hentschel d6fadb882f dbghelp: Implement SymMatchStringW. 2011-11-01 10:42:53 +01:00
André Hentschel 7e3fe1975a dbghelp: Rename SymMatchString and forward it to SymMatchStringA. 2011-11-01 10:42:50 +01:00
André Hentschel 85051917fe dbghelp: Rewrite stabs parsing to not need PATH_MAX. 2011-10-17 17:45:03 +02:00
André Hentschel bfdc93cdc5 dbghelp: Remove superfluous PATH_MAX defines. 2011-10-11 19:44:33 +02:00
Andrew Talbot 14d5268e5e dbghelp: Mark a fall-through in a switch statement. 2011-09-30 10:27:56 -05:00