Commit Graph

162 Commits

Author SHA1 Message Date
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 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
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
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
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
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
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
Frédéric Delanoy 1d65efe50b dbghelp: Use BOOL type where appropriate. 2013-11-12 12:58:03 +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
Michael Stefaniuc 31fdb97632 dbghelp: Remove a superfluous TRUE:FALSE conditional expression. 2012-08-15 12:12:43 +02: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
Andrew Nguyen 6ee16099a3 dbghelp: Implement SymEnumSourceFilesW. 2011-06-01 17:59:17 +02:00
Marcus Meissner 0d198362aa dbghelp: Fixed pasted size error (Coverity). 2011-02-23 15:01:27 +01:00
Alexandre Julliard 16a2ea5c8f dbghelp: Use wine64 as loader name on 64-bit. 2011-01-28 11:57:46 +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
Eric Pouech c7c8c0dea7 dbghelp: Speed up source string creation (by using rb trees). 2011-01-10 13:03:52 +01:00
Eric Pouech 2a87a89680 dbghelp: Only map an ELF file once. 2010-10-11 17:11:17 +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 0c2401369c dbghelp: Rewrite SymGetModuleBase so that it relies on 64 bit version. 2010-03-29 11:45:04 +02:00
Eric Pouech bf97b03db5 dbghelp: Implemented SymFunctionTableAccess. 2010-03-22 11:27: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 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 9d7b6b65ef dbghelp: Added helper to free module's specific data (ELF, MSC...) upon removal. 2010-03-16 13:30:46 +01:00
Eric Pouech 7b83b70b06 dbghelp: Rewrite the symt* <=> index wrappers to that they work on 64bit platforms. 2009-12-15 11:57:33 +01:00
Eric Pouech c6eb8104dd dbghelp: Enforce using 64bit integers for module's address and size. 2009-12-14 12:28:54 +01:00
Marcus Meissner d6f78e4014 dbghelp: Check wImageName for NULL (Coverity). 2009-12-01 13:14:40 +01:00
Eric Pouech 68cc7d5875 dbghelp: Beef up SymRefreshModuleList. 2009-11-17 12:05:46 +01:00
Andrew Nguyen 44ac91d78d dbghelp: Stub SymRefreshModuleList. 2009-11-16 17:04:48 +01:00
Alexandre Julliard 75792a3e69 dbghelp: Grow all arrays by doubling the size. 2009-07-10 14:46:55 +02:00
Eric Pouech 609ec7b11d dbghelp: when (re)building the per module symbol table (lookup by address), no longer iterate over the hash table.
Directly add to the table when adding a new symbol.
2009-06-26 12:01:00 +02:00
Ken Thomases feedbb1630 dbghelp: Recognize .dylib files as Mach-O modules. 2009-03-25 12:17:36 +01:00
Ken Thomases d7466e0c4e dbghelp: Add support for debugging Mach-O modules. 2009-03-25 12:17:29 +01:00
Ken Thomases b8f6a68d6f dbghelp: Rename some things to be less ELF-centric. 2009-03-12 13:09:56 +01:00
Alexandre Julliard d2682f57f8 dbghelp: The main executable is now always named "wine". 2009-03-10 18:22:43 +01:00
Marcus Meissner 54e8ecf1b0 dbghelp: Check for wImageName being NULL (Coverity). 2009-02-02 15:44:39 +01:00
Andrew Talbot 4c92ba2270 dbghelp: Declare some functions static. 2009-01-03 15:35:29 +01: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
Eric Pouech 1f6974c124 dbghelp: Fix for SymGetModuleInfo(). 2008-05-26 19:45:55 +02:00
Rob Shearman f21b91c0a2 dbghelp: Fix read beyond end of field in module_get_debug. 2008-02-21 20:16:04 +01:00
Rob Shearman f48941a2a8 dbghelp: Fix a typo in SymLoadModuleExW that caused the wrong number of characters to be passed to lstrcpynW. 2008-02-15 11:03:42 +01:00
Andrew Talbot f2223dbe79 dbghelp: Remove unneeded casts. 2007-12-05 12:04:48 +01:00
Vitaliy Margolen dfe21d0ef5 dbghelp: Fix detection of ELF libs by their name. 2007-10-29 13:58:35 +01:00
Francois Gouget 9d2f48dc0f dbghelp: Better match the PSDK types, especially with regards to constness.
Also add a number of missing prototypes, especially 64bit or Unicode
versions of existing prototypes, and the related structures.  Update
win32.api to fix the winapi_check warnings.
2007-08-03 12:43:40 +02:00
Andrew Talbot dcb298b468 dbghelp: Exclude unused headers. 2007-05-01 11:42:24 +02:00
Michael Stefaniuc 5f62da109e janitorial: Pass HEAP_ZERO_MEMORY as flag to HeapAlloc() instead of zeroing out the allocated memory in a later call. 2007-04-25 12:26:07 +02:00
Andrew Talbot 099bb87feb dbghelp: Constify some variables. 2007-04-18 13:00:57 +02:00
Eric Pouech f1436139fc dbghelp: Rewrote SymEnumerateModules with Unicode basis, and implemented SymEnumerateModulesW64. 2007-03-14 22:43:58 +01: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
Eric Pouech 59f93f64b7 dbghelp: Rewrote module_is_elf_container_loaded so that it no longer
uses the stored ModuleName (that the dbghelp's caller can override) but rather a
combination of base address and filename for the module.
2007-03-13 20:54:21 +01:00
Eric Pouech a6a57c934c dbghelp: Added helper to get the basename + extension from full filename. 2007-03-13 20:52:58 +01:00
Eric Pouech 3565d93ebe dbghelp: Now moving the ELF loading code to Unicode. 2007-02-22 12:32:17 +01:00
Eric Pouech 1690cf1815 dbghelp: Moved the internals for registered callback to Unicode. 2007-02-22 12:27:16 +01:00
Eric Pouech 180127dd94 dbghelp: Get rid of temporary module_get_type_by_nameA. 2007-02-22 12:27:00 +01:00
Eric Pouech d707fe5ac3 dbghelp: Added module_get_type_by_name in Unicode form and keep the ANSI form for compatibility. 2007-02-22 12:21:14 +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 6a859fb0e6 dbghelp: Move PE module loading to Unicode. 2007-02-22 11:41:15 +01:00
Eric Pouech 43dffcd05d dbghelp: Now storing module information in Unicode form. 2007-02-22 11:39:08 +01:00
Eric Pouech c75fb89a64 dbghelp: Prepare module loading functions to be switched to Unicode module storage. 2007-02-22 11:34:20 +01:00
Eric Pouech 50de2e2e4a dbghelp: Make the module info functions ready for the Unicode move. 2007-02-22 11:33:06 +01:00
Eric Pouech fcd3972fa8 dbghelp: Rewrote the loaded modules enumeration so that Unicode version is the core. 2007-02-22 11:32:05 +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
Eric Pouech 33c8ffc301 dbghelp: Added helper to define the module's name. 2007-02-22 11:28:13 +01:00
Eric Pouech 883732281e dbghelp: Implemented 64 bit versions of EnumerateLoadedModules. 2007-01-04 11:12:13 +01:00
Dmitry Timoshkov e7d620081f dbghelp: Make some data const. 2006-12-14 20:11:07 +01:00
Eric Pouech a1a879363d dbghelp: Added a field to the hash table to store the number of elements in the hash table.
Make use of it to get rid to module_compute_num_syms.
2006-12-06 11:37:38 +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 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 32c96adddd dbghelp: Added a process field to the modules pair structure.
This makes the code simpler to read, a bit more efficient, and
furthermore it'll be needed in future patches.
2006-11-27 17:49:01 +01:00
Peter Oberndorfer 2b06143031 dbghelp: Initialize BOOL elements with FALSE instead of 0. 2006-11-08 15:50:31 +01:00
Andrew Talbot 2f8c51f547 dbghelp: Cast-qual warnings fix. 2006-09-08 16:07:43 +02:00
Eric Pouech 1a5f7f5926 dbghelp: Implemented SymEnumerateModules64. 2006-06-27 11:17:54 +02:00
Eric Pouech e4441d7e6f dbghelp: Module info.
- now internally storing module info as a 64bit module structure
  (the interest in not in the 64 bit side of things, but because
  it allows storing lots of usefull information)
- fixed SymGetModuleInfo64W which wasn't returning the
  LoadedPdbName field
- now filling for MSC files with the extended information
  (instead of guessing it)
- reused the extended module info to store wine ELF module
  information (link for map link, stabs vs dwarf symbol info)
2006-06-27 11:17:34 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Eric Pouech 2a1d8efde4 dbghelp: Removed call to registered callback when unloading a module.
First, native dbghelp doesn't do it, and it crashed windbg, likely
because we got the undocumented arguments wrong.
2006-05-11 12:19:24 +02:00
Eric Pouech d2d85a1b46 dbghelp: Implemented SymGetModuleInfoW and SymGetModuleInfoW64. 2006-05-11 12:16:01 +02:00
Eric Pouech 922a7bd191 dbghelp: Implemented SymLoadModuleExW. 2006-05-11 12:15:21 +02:00
Eric Pouech a49adbc49e dbghelp: Base and symbols.
- report the correct image base for a symbol which is
  seen as being in a builtin PE module, whilst its debug 
  information is gotten from an ELF module
- module_get_debug now returns a pair of modules
  (the requested that has to be presented back to the client
   and the effective one, which contains the debug info)
- reworked SymFromName in order to provide also the revelant
  module base address
2006-05-08 14:47:56 +02:00
Eric Pouech 88aa6703af dbghelp: Virtual modules.
Rewrote virtual modules handling so that it's an option to either PE
or ELF modules rather than a specific type.
2006-02-20 12:16:08 +01:00
Eric Pouech 0509fe72c9 dbghelp: Return better values in module information.
- 32/64: number of symbols is now correct
- 64: the 64 bit extra fields are now initialized with some non null
  yet sensible value
2006-01-23 16:38:57 +01:00
Eric Pouech bdf32ee032 dbghelp: Brought dbghelp.h a bit closer to PSDK definitions. 2006-01-23 16:37:48 +01:00
Eric Pouech 418591c8ea dbghelp: Started implementation of the global callback mechanism. 2006-01-23 16:29:21 +01:00
Eric Pouech 558130a696 dbghelp: StackWalk (32 and 64 bit version).
- enhance implementation of StackWalk (32 and 64 bit version) by
  making use of module information and calling for FPO
- FPO part is still non functional
- implemented SymGetModuleBase64
- stubbed SymFunctionTableAccess64
2006-01-05 13:41:25 +01:00
Eric Pouech 87ab6e6cd8 dbghelp: Correct handling for all module names. 2005-12-22 11:11:39 +01:00
Francois Gouget e186f54c4e Add IMAGEHLP_MODULEW64.
Add SymGetModuleInfoW64() and SymLoadModule64().
2005-12-02 13:00:24 +01:00
Eric Pouech d10a90dca0 Added support for 'loading' virtual modules. 2005-11-29 11:47:40 +01:00
Eric Pouech 8bd3c060ec Now correctly checking calling down to 32 bit version. 2005-11-29 11:45:16 +01:00
Eric Pouech dd3e1dc525 Implemented SymGetModuleInfo64. 2005-11-29 11:42:13 +01:00
Eric Pouech 22f9f4f0c3 Implemented SymUnloadModule64. 2005-11-29 11:35:10 +01:00
Eric Pouech 1cb1183037 Implemented SymLoadModuleEx. 2005-11-29 11:24:46 +01:00
Paul Vriens 4129e6e17f Add SymLoadModule64. 2005-05-29 20:02:42 +00:00