Commit Graph

74 Commits

Author SHA1 Message Date
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
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
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
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
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
Francois Gouget ba6e4ff66e dbghelp: pe_unmap_directory() is unused so remove it. 2015-03-16 15:03:31 +09:00
Bruno Jesus a5c3f38773 dbghelp: Remove a dead assignment (Cppcheck). 2014-11-20 22:32:43 +09:00
Eric Pouech 8328606141 dbghelp: Store the 32/64 bitness in the image structure. 2012-02-14 12:31:48 +01:00
André Hentschel b95574e286 dbghelp: No need for WINE_ prefixed ERR. 2012-01-10 17:55:29 +01:00
Frédéric Delanoy f932abf326 dlls: Assorted spelling fixes. 2011-08-01 18:26:27 +02:00
Eric Pouech 0be7461fc8 dbghelp: Set also reloc_delta information in module description for PE native modules. 2011-03-14 13:20:29 +01:00
Eric Pouech 031cce8e77 dbghelp: Added support for variables in thread storage. 2011-01-31 14:30:13 +01:00
Eric Pouech 1e141eee4f dbghelp: Allow loading PE module with 64bit addresses. 2010-10-11 12:54:18 +02:00
Andrew Talbot 9738f40e79 dbghelp: Remove unused functions. 2010-08-30 11:26:29 +02:00
Eric Pouech 63c7ea6494 dbghelp: Use virtual size (not raw/file size) when getting the size of a PE section. 2010-08-30 11:26:29 +02:00
Eric Pouech 3ced7b8f40 dbghelp: Ensure we can try to load COFF symbols if none is found in other debug formats. 2010-06-28 11:42:28 +02:00
Eric Pouech d97e6a47e5 dbghelp: Test validity of COFF symbol table against file size (and not image size). 2010-06-28 11:42:23 +02:00
Eric Pouech 1f5ff75107 dbghelp: Fix the localization of section table while loading COFF information. 2010-06-28 11:42:18 +02:00
Eric Pouech 516fc78a2b dbghelp: Protect PE's COFF table reading against bogus values in NTHEADER. 2010-05-10 13:43:58 +02:00
Mikhail Maroukhine 0519c4b68a dbghelp: Fix compiler warnings with flag -Wcast-qual. 2010-03-29 12:13:28 +02: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 cd92e3d147 dbghelp: Move the PE debug info to the newly define scheme. 2010-03-19 12:08:37 +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 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 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 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 520fcae5d2 dbghelp: For PE modules, when no debug info is present, also try to load symbols out of COFF symbol table. 2010-01-25 12:53:03 +01:00
Eric Pouech 181de55619 dbghelp: Removed some unused fields for public symbol description. 2010-01-25 12:52:46 +01:00
Marcus Meissner c39cd4c0ce dbghelp: Initialize ret (Coverity). 2009-12-29 11:07:11 +01:00
Eric Pouech bc38d3eaac dbghelp: Add support for loading dwarf debug information out of PE images. 2009-12-24 12:15:41 +01:00
Eric Pouech c6eb8104dd dbghelp: Enforce using 64bit integers for module's address and size. 2009-12-14 12:28:54 +01:00
Eric Pouech b037912c9d dbghelp: Fix a couple of casts on 64bit platforms. 2009-12-14 12:27:32 +01:00
Eric Pouech 185e5daed6 dbghelp: For mingw32 (stabs debug info), parse the FileHeader's symbol table to offset properly the global variables. 2009-12-10 11:53:57 +01:00
Andrew Talbot c702da34da dbghelp: Constify some variables. 2009-07-14 10:45:29 +02:00
Ken Thomases 3db11b98b7 dbghelp: Let stabs_parse call back for real (non-debug) symbol definitions. 2009-03-12 13:09:55 +01:00
Michael Stefaniuc 3c3a9b5081 dbghelp: Remove superfluous pointer casts. 2009-01-19 13:36:25 +01:00
Eric Pouech 01e69c71e0 dbghelp: Report in module's info when a module's debug information has been mismatched (dbg and pdb only). 2008-10-20 13:52:16 +02:00
Eric Pouech 2994e98850 dbghelp: Improve the symbol loader for .DBG files.
When looking for a .DBG file, first look for a .DBG file matching all
attributes, then for a .DBG partially matching the attributes.
2008-09-04 13:47:11 +02:00
Alexandre Julliard 97429b32f8 dbghelp: Always initialize section pointer in ImageDirectoryEntryToDataEx. 2008-07-18 11:16:02 +02:00
Eric Pouech d2fa765087 dbghelp: Fix invalid pointer dereference. 2008-04-14 12:40:22 +02:00
Rob Shearman 5dd2f1efa8 Include config.h and wine/port.h in files that use snprintf. 2008-02-29 12:39:28 +01:00
Eric van Beurden e254a1d929 dbghelp: Wrap TRACE strings using the debugstr functions and update some type casting. 2008-01-18 12:18:20 +01:00
Andrey Turkin 9e2c76c6d4 dbghelp: Implement ImageDirectoryEntryToDataEx. 2008-01-11 13:43:44 +01:00
Andrey Turkin 4c8e88df7e dbghelp: Avoid crashing on files with bogus export table. 2007-10-10 11:18:26 +02:00
Andrew Talbot dcb298b468 dbghelp: Exclude unused headers. 2007-05-01 11:42:24 +02:00
Eric Pouech 9a0e666733 dbghelp: Renamed pe_load_module (resp pe_load_module_from_pcs)
to pe_load_native_module (resp pe_load_builtin_module) to better describe
what those functions actually do.
2007-03-13 21:07:47 +01:00
Eric Pouech f2cfb374a4 dbghelp: Get rid of module_name in all traces (using Unicode flavor). 2007-03-13 21:02:42 +01:00
Eric Pouech ade919c603 dbghelp: Cleanups for module loading (lookups on module name and image name are two different things)
- split up module_find_by_name in two different functions:
  + reused module_find_by_name which looks upon the module name
  + added module_is_already_loaded which looks upon the image name
- cleanup module loading using these functions (removed extra parameter
  to pe_load_module_from_pcs)
2007-03-13 20:58:08 +01:00