Commit Graph

190 Commits

Author SHA1 Message Date
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
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
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 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
Frédéric Delanoy d066561625 dbghelp: Constify some character strings. 2013-12-16 12:02:49 +01:00
Frédéric Delanoy 5ba7f79bad Assorted spelling fixes. 2013-12-03 19:41:53 +01: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
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
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 8328606141 dbghelp: Store the 32/64 bitness in the image structure. 2012-02-14 12:31:48 +01:00
André Hentschel bfdc93cdc5 dbghelp: Remove superfluous PATH_MAX defines. 2011-10-11 19:44:33 +02:00
Frédéric Delanoy f932abf326 dlls: Assorted spelling fixes. 2011-08-01 18:26:27 +02:00
André Hentschel 5d0d2ef893 dbghelp: Remove dead code (clang). 2011-07-11 11:51:11 +02:00
Frédéric Delanoy e35cdaa138 dbghelp: Remove dead code (Clang). 2011-07-05 14:43:43 +02:00
Gerald Pfeifer d93b6c0aa2 dbghelp: Add a return statement for the default/assert case in elf_map_file. 2011-04-01 10:48:57 +02:00
Eric Pouech b10977fc3c dbghelp: Now that compilers (like clang) start to merge symbols across compilation units, no longer barf about duplicates. 2011-03-28 17:24:42 +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
Gerald Pfeifer 061b50eda5 dbghelp: Also return a value in an error case in elf_map_file_read. 2011-01-03 11:54:03 +01:00
Gerald Pfeifer 8f7d06b69b dbghelp: Make ehdr_addr in elf_enum_modules_internal dependent on AT_SYSINFO_EHDR. 2010-12-29 11:59:33 +01: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
Eric Pouech 737b5b95bb dbghelp: Use pread instead of read in elf_map_file. 2010-12-28 11:15:24 +01:00
Eric Pouech 655247354a dbghelp: Split elf_load_file into two functions (one for creating a file-map, another one for loading info out of a file-map). 2010-12-28 11:15:06 +01:00
Eric Pouech 8740f1dc1e dbghelp: Factorize a bit the ELF enumeration callbacks. 2010-12-28 11:14:43 +01:00
Eric Pouech cf06ef640d dbghelp: Fix ELF file computation on 64bit systems. 2010-12-27 11:47:51 +01:00
Eric Pouech 854379bbaa dbghelp: Fix some relocation errors for debug formats out of ELF files. 2010-10-11 17:11:24 +02:00
Eric Pouech 922caac23b dbghelp: Compute ELF load address using the link_map ld's address (and get correct relocation computation). 2010-10-11 17:11:24 +02:00
Eric Pouech 2662ed10c8 dbghelp: When enumerating loaded modules from r_debug structure, pass the address of the dynamic section as well. 2010-10-11 17:11:24 +02: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
Paul Vriens 5da1ecef3a dbghelp: Fix use of GetProcessHeap. 2010-09-21 17:53:55 +02:00
Eric Pouech 34ef8d2113 dbghelp: Store delta used for re-locating a module. 2010-04-02 10:34:37 +02:00
Eric Pouech 4c3361e39e dbghelp: Properly bail out if get an error while reading ELF header. 2010-03-22 11:29:14 +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 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 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 8c4f96d232 dbghelp: Store the file map in ELF's module specific data. 2010-03-16 13:31:05 +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 bc38d3eaac dbghelp: Add support for loading dwarf debug information out of PE images. 2009-12-24 12:15:41 +01:00
Eric Pouech 92b9b0940d dbghelp: Wrap the symt* <=> index transformations. 2009-12-15 11:56:45 +01:00
Eric Pouech 02a70615f9 dbghelp: Add ELF support but for the current 32 vs 64 bit architecture. 2009-12-14 12:28:25 +01:00
Paul Bolle 4c97910387 dbghelp: elf_load_file: return if elf_map_file fails. 2009-10-28 14:28:38 +01:00
Andrew Talbot 41ca9b0ffd dbghelp: Constify some variables. 2009-07-13 10:24:56 +02:00
Eric Pouech 607a07f42a dbghelp: When loading ELF public information, handle the cases when we don't get an address. 2009-06-26 12:00:25 +02:00
Ken Thomases 637827a2d0 dbghelp: Extract calc_crc32 function into a separate file. 2009-03-12 14:29:03 +01:00
Ken Thomases b8f6a68d6f dbghelp: Rename some things to be less ELF-centric. 2009-03-12 13:09:56 +01:00
Ken Thomases 3db11b98b7 dbghelp: Let stabs_parse call back for real (non-debug) symbol definitions. 2009-03-12 13:09:55 +01:00
Alexandre Julliard d2682f57f8 dbghelp: The main executable is now always named "wine". 2009-03-10 18:22:43 +01:00
Peter Oberndorfer b19fa1d282 dbghelp: Minor cleanup. 2007-05-17 12:44:50 +02:00
Alexandre Julliard b677e81d8f dbghelp: Avoid some warnings on Solaris. 2007-03-17 20:05:34 +01:00
Peter Oberndorfer 25203bd87e dbghelp: Fix up load_offset to work in case the load offset is different for real binary and debug link file. 2007-03-16 11:34:47 +01:00
Peter Oberndorfer 7bbb212050 dbghelp: Initialize the elf_section_map in case of failures in elf_find_section.
Make sidx signed so sidx < 0 comparisons work.
(most of the patch written by Eric Pouech)
2007-03-16 11:34:33 +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
Eric Pouech e161dd92ee dbghelp: Handle the .gnu_debuglink files with the newly added alternate mechanism. 2007-02-26 14:39:52 +01:00
Eric Pouech fc66bb37f4 dbghelp: Allow to add an alternate file_map for an ELF file (where to look for its debug information). 2007-02-26 14:39:38 +01:00
Eric Pouech 62b57f9e21 dbghelp: Rewrote the ELF section mapper for better data encapsulation. 2007-02-26 14:39:16 +01:00
Eric Pouech 8d3167cc9a dbghelp: Merge the A/W of elf_map_file into a single one. 2007-02-22 12:34:09 +01:00
Eric Pouech 0c1e33bb06 dbghelp: Now load the .gnu_debuglink file using Unicode search paths. 2007-02-22 12:33:37 +01:00
Eric Pouech 4aab161297 dbghelp: Added helper to map a Unicode file. 2007-02-22 12:33:14 +01:00
Eric Pouech 3565d93ebe dbghelp: Now moving the ELF loading code to Unicode. 2007-02-22 12:32:17 +01:00
Eric Pouech c1269392e0 dbghelp: Move elf_fetch_file_info to Unicode. 2007-02-22 12:29:53 +01:00
Eric Pouech 039d54a4bf dbghelp: Make elf_enum_modules a Unicode function. 2007-02-22 12:29:27 +01:00
Eric Pouech 46684a9fb6 dbghelp: Moved ELF module loading interfaces to Unicode.
The core the code remains ANSI, as all the information is stored as ANSI.
2007-02-22 12:20:03 +01:00
Eric Pouech 43dffcd05d dbghelp: Now storing module information in Unicode form. 2007-02-22 11:39:08 +01:00
Eric Pouech 6efc061992 dbghelp: .gnu_link support: rewrote helper functions for better later unicodification. 2007-02-22 11:35:21 +01:00
Eric Pouech aac77c98a2 dbghelp: Added an ANSI copy of the module name (useful for next patches). 2007-02-22 11:28:53 +01:00
Rob Shearman 272d7ab46a dbghelp: ImageName is usually blank, so print LoadedImageName in elf_load_debug_info_map. 2007-02-21 19:49:43 +01:00
Frank Richter 867ebe4da0 dbghelp: Search for .gnu_debuglink file. 2007-01-17 11:40:10 +01:00
Eric Pouech 2e34ea4e01 dbghelp: Removed unneeded code from rewrite of .gnu_link handling. 2007-01-15 13:00:17 +01:00
Frank Richter afc2df8705 dbghelp: Split gnu_debuglink handling into own function. 2007-01-12 11:24:06 +01:00
Eric Pouech 1b158dd38d dbghelp: Corrected the map/unmap operations for ELF sections.
Now correctly free the mapped areas when no longer used.
2007-01-06 11:40:44 +01:00
Andrew Talbot 3af121230b dbghelp: Qualify use of WINE_DEFAULT_DEBUG_CHANNEL. 2007-01-02 13:21:15 +01:00
Eric Pouech 4806320b48 dbghelp: In find_nearest, now return the symbol instead of its index in module->sorttable. 2006-12-06 11:37:10 +01:00
Eric Pouech 08712bc3a9 dbghelp: Simplify the way we find the debug header. 2006-12-06 11:36:59 +01:00
Thomas Fitzsimmons 4b30ece829 dbghelp: Recognize DT_GNU_HASH. 2006-12-05 11:49:15 +01:00
Pierre d'Herbemont c20afad608 dbghelp: Fix elf_load_module params on non elf system to reflect last change to its definition. 2006-12-04 12:19:22 +01:00
Eric Pouech 8e7b2e0fd7 dbghelp: Get rid of long int issues on 64bit platforms. 2006-11-30 13:26:39 +01:00
Eric Pouech 0dd7c44669 dbghelp: Removed the alpha status FIXME for the dwarf code. 2006-11-27 17:59:18 +01:00
Eric Pouech 20fc25bc55 dbghelp: Use the location info structure thoughout the code to handle the location of a data variable. 2006-11-27 17:54:39 +01:00
Eric Pouech 848f8c41c0 dbghelp: Pass .debug_loc section info from the ELF loader to the dwarf parser. 2006-11-27 17:53:52 +01:00
Eric Pouech 1a723f237c dbghelp: Store compiland's address in internal structures. 2006-11-27 17:49:50 +01:00
Eric Pouech 04c7c203fc dbghelp: Simplify code with function to get section size. 2006-11-27 17:48:44 +01:00
Peter Oberndorfer a39f3da5fc dbghelp: Do not write to array element -1. 2006-11-09 10:36:35 +01:00
Peter Oberndorfer 6d0948f7a6 dbghelp: Make dwarf2_parse_line_numbers handle missing line number section. 2006-11-08 15:49:46 +01:00
Robert Shearman f57ddeb9db dbghelp: Don't access a negative section index in elf_map_section. 2006-07-17 14:49:05 +02:00
William Knop 289a068b4f dbghelp: Fix for non-elf build (undefined symbol: _elf_is_in_thunk_area). 2006-06-27 21:14:02 +02:00