Commit Graph

87 Commits

Author SHA1 Message Date
Eric Pouech a64d157928 dbghelp: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Thomas Faber 40dfd9b8b1 dbghelp: Use _NT_ALT_SYMBOL_PATH.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:04:04 +01:00
Thomas Faber bb2802984d dbghelp: Use . instead of concrete path for search path.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:03:56 +01:00
Thomas Faber 06f1c40f17 dbghelp: Accept NULL search path in SymSetSearchPath.
Fixes a crash when starting kernrate.exe.

Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:03:24 +01:00
Eric Pouech 10a20b2d22 dbghelp: Relax some failure conditions in SymSetContext and SymSetScopeFromAddr.
They shouldn't fail if passed address is inside a module, even if it
doesn't point to a function.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:01:16 +01:00
Eric Pouech 232681da96 dbghelp: Implement SymSetScopeFromInlineContext for inlined frames.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-28 18:25:17 +02:00
Eric Pouech 8592e9088f dbghelp: Implement SymSetScopeFromInlineContext() when context isn't inlined.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-27 22:40:50 +02:00
Eric Pouech 706c5400e9 dbghelp: Rewrite SymSetContext() on top of SymSetScopeFromAddr().
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-27 22:40:50 +02:00
Eric Pouech 925182b09f dbghelp: Implement SymSetScopeFromAddr() and SymSetScopeFromIndex().
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-27 22:40:50 +02:00
Eric Pouech 066bb761cc dbghelp: Add local scope information in struct process.
- make SymSetContext() generate this information
- let SymEnumSymboli() (when dealing with local symbols) use this
  information instead of the stack frame

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-27 22:40:50 +02:00
Eric Pouech 8b4d5e6eef dbghelp: Improve error handling in SymSetContext().
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-19 20:59:01 +02:00
Eric Pouech 76c4e691af dbghelp: Add stub implementations for the SymSetScope* functions.
Also move SymSetScopeFromAddr out of symbol.c into dbghelp.c which
makes more sense as modification of process settings.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-19 20:58:38 +02:00
Eric Pouech d3a876f172 dbghelp: Use wide string literals.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-19 20:55:41 +02:00
Eric Pouech 1cddd8d571 dbghelp: Fix SymInitialize for a live 32bit target from a 64bit caller in WOW64.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 21:59:30 +02:00
Rémi Bernon 8ec843e77b dbghelp: Read process memory using target addresses, not debugger.
This fixes "wine winedbg --gdb winecfg" not working anymore.

There was a regression since f40195cd92, but the environment read was
broken before.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 17:51:36 +01:00
Brendan Shanks f40195cd92 dbghelp: Use PEB->CloudFileFlags instead of PEB->Reserved for debug base address.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50077
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 22:06:52 +01:00
Rémi Bernon 774ee4734a dbghelp: Ignore missing debug info in SymInitializeW.
When fInvadeProcess is used, we return an error if the target process
is found but its debug info is not. We should only return an error if
the process is not found.

This fixes a SymInitializeW popup error on Hard Reset Redux startup.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-01 10:02:16 +02:00
André Hentschel 30f17befaf dbghelp: Remove support for PPC32.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:46:14 +02:00
Jacek Caban 2b0977fc71 dbghelp: Use debuggee environment variables in search_dll_path.
This fixes searching wow32 binaries, where debuggee search path is
different than debugger's.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 21:04:05 +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 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 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 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 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 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
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 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
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
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
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 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
Francois Gouget f8a7d6ed74 Assorted spelling fixes. 2015-08-07 23:50:48 +09:00
Alexandre Julliard 836b682ed3 dbghelp: Remove a useless DllMain, msvcrt can't be unloaded. 2013-11-11 11:49:18 +01:00
André Hentschel c174b3f5ec dbghelp: Remove SPARC support. 2013-03-05 11:01:11 +01:00
André Hentschel ce8640cbef dbghelp: Add ARM64 support. 2013-01-16 12:53:16 +01:00
Marcus Meissner f955a7ca07 dbghelp: Local variable used out of scope (Coverity). 2011-03-04 16:26:01 +01:00
André Hentschel 9a1103112e dbghelp: Add ARM support. 2010-09-20 12:58:56 +02:00
Austin English e92a552dca dbghelp: Add initial Sparc CPU support. 2010-08-23 13:41:17 +02:00
André Hentschel 64951f7110 dbghelp: Use the available PowerPC functions. 2010-05-28 16:22:26 +02:00
André Hentschel 1f168cbd6e dbghelp: Fix a typo. 2009-12-31 12:12:16 +01:00
Eric Pouech 54766cdac0 dbghelp: Hacked a StackWalk implementation for x86_64. 2009-12-23 14:27:29 +01:00
Eric Pouech 7230659ce9 dbghelp: Create a cpu backend to store CPU dependent code, and use it for the i386 stack implementation. 2009-12-23 14:27:29 +01:00
Eric Pouech 2d85d5c235 dbghelp: Generalize helper to get a string from an ADDRESS64. 2009-12-22 15:39:20 +01:00
Marcus Meissner 6feb525bc7 dbghelp: Check for NULL return from process_find_by_handle (Coverity). 2009-12-15 16:09:11 +01:00
Eric Pouech 9ff52fb82c dbghelp: Don't return error when validating a 64bit wide address on a 64bit platform. 2009-12-14 12:28:37 +01:00
Eric Pouech 114bb38cd8 dbghelp: Rewrote the SymRegisterCallback function so that they work on a 64bit platform. 2009-12-14 12:28:00 +01:00
Eric Pouech b037912c9d dbghelp: Fix a couple of casts on 64bit platforms. 2009-12-14 12:27:32 +01:00
Eric Pouech c300f215b1 dbghelp: Make the module enumeration process compatible with 64bit platforms. 2009-12-14 12:26:51 +01:00
Alexandre Julliard 891d025639 dbghelp: Fix an invalid pointer cast. 2009-12-10 15:31:27 +01:00