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
Eric Pouech
6c64e6dee4
dbghelp: Silence some FIXMEs.
...
Reading gecko's PDB generate a lot of those.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 20:29:38 +01:00
Eric Pouech
0bbb161c41
dbghelp: Protect against missing compiland when adding global function.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52045
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:50 +01:00
Eric Pouech
e105e9d35e
dbghelp: Check that we don't add same line number twice.
...
This happens (at least) in dwarf debug info where there could be two entries
with same source file and line number, but different column numbers
(and we don't store columns).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 21:00:57 +01:00
Eric Pouech
27f133732f
dbghelp: Implement SymGetLineFromInlineContext(W) for inlined frame.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-29 21:28:14 +02:00
Eric Pouech
3d6b65dd38
dbghelp: In SymGetLine* family, compute displacement relative to line_info's address.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-29 21:28:02 +02:00
Eric Pouech
1c5989465e
dbghelp: Make symt_add_func_line() last parameter an absolute address.
...
It used to be an offset to the start of function, but it's actually
stored as an absolute address afterwards. This avoids unnecessary
computations.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-29 21:27:41 +02:00
Eric Pouech
0187675065
dbghelp: Rename line_info's pc_offset field into address.
...
It's actually an absolute address.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-29 21:27:23 +02:00
Eric Pouech
eee701ad52
dbghelp: Implement SymFromInlineContext 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:16 +02:00
Eric Pouech
82bac5d080
dbghelp: Implement StackWalkEx 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:16 +02:00
Eric Pouech
fb34c82ef8
dbghelp/dwarf: Store each subrange for an inlined function.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-28 18:25:16 +02:00
Eric Pouech
690c2e51bf
dbghelp/dwarf: Generate proper inline functions.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-28 18:25:16 +02:00
Eric Pouech
b9290c987a
dbghelp: Introduce symt_inlinesite (SymTagInlineSite) to support inline sites.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-28 18:25:16 +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
e250c6fb98
dbghelp: Implement SymGetLineFromInlineContext*() when context isn't in inline mode.
...
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
219e4b6e75
dbghelp: Implement SymFromInlineContext() when context isn't in inline mode.
...
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
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
26e06f5b79
dbghelp: Add stub implementations of SymGetLineFromInlineContext(W).
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-19 20:58:12 +02:00
Eric Pouech
9a1a849b95
dbghelp: Add stub implementation of SymFromInlineContext(W).
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-19 20:58:00 +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
099a8bbfd3
dbghelp: Add helper to initialize a module_pair.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-13 22:52:25 +02:00
Eric Pouech
eded75f8d2
dbghelp: Report a couple more VARIANT types in symbol info for constants.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-13 22:52:25 +02:00
Eric Pouech
58d5b3c880
dbghelp: Use proper macros for VARIANT.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-13 22:52:25 +02:00
Eric Pouech
b6044788ea
dbghelp: Added support for custom symbols.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:29:34 +02:00
Eric Pouech
24a7de70a6
dbghelp: Manage parent/child relationship between SymTagExe and SymTagCompiland.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:29:34 +02:00
Eric Pouech
dd67b78ed3
dbghelp/dwarf: Add support for local variables with constant values.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 21:48:59 +02:00
Eric Pouech
23c325276b
dbghelp: Remove unneeded #include <limits.h>.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 19:01:03 +02:00
Eric Pouech
f4afcb3f5a
dbghelp: Ensure all adresses are stored at least in DWORD_PTR.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 20:22:11 +02:00
Eric Pouech
d648dcd3a6
dbghelp/dwarf: Share compilation unit header information.
...
Store cu information for dwarf content
- in each compiland
- and queue the unique one's inside the module.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:31:54 +02:00
Eric Pouech
cee52d5988
dbghelp: Get rid of useless symt_normalize_func().
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:22 +02:00
Eric Pouech
707a2273ec
dbghelp: Set is_first and is_last flags on the fly in symt_add_func_line.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:22 +02:00
Eric Pouech
cd8b85e4a9
dbghelp: Rewrite SymGetLinePrev* with internal_line_t.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:22 +02:00
Eric Pouech
8557fd5b34
dbghelp: Implement all SymGetLineNext* functions using internal_line_t.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:22 +02:00
Eric Pouech
fabc4f7e12
dbghelp: Add internal_line_t structure as help in Line manipulation.
...
the rationale is that:
- the file name in IMAGEHLP_LINE* structures is returned as a pointer to
an internal buffer
- in the W64 variant of APIs, two calls to fetch_buffer() are currently needed
(one for first A allocation, second for W conversion)
- this generate bugs as it's assumed the two buffers are different
so the internal_line_t purpose is to factorize the implementations
of the 3 variants (A32, A64, W64) into a single code path
this insures a unique allocation, and at most, one conversion
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:22 +02:00
Eric Pouech
d459301de6
dbghelp: Make symt_fill_func_line_info() and symt_get_func_line_next() static functions inside symbol.c.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:22 +02:00
Eric Pouech
b882ab2b25
dbghelp: Use the correct module name for lookups including module's name.
...
(modulename is truncated at 64 chars, while module.ModuleName at 32 chars)
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-06 17:58:43 +02:00
Eric Pouech
b9ebb3fb62
dbghelp: Use module->modulename instead of module->module.ModuleName in traces.
...
The former is truncated to 64 chars while the latter is truncated to
32 chars.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-06 17:58:29 +02:00
Eric Pouech
2325962e74
dbghelp: Return the stored name for a compiland.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Eric Pouech
1fa1620086
dbghelp: Introduce internal type (symt_module) to match SymTagExe.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Eric Pouech
85557f361b
dbghelp: Fix two internal buffer allocations.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Eric Pouech
d268cb028a
dbghelp: Fix NameLen usage in SYMBOL_INFO(W).
...
SYMBOL_INFO.NameLen should be the actual length of the symbol, not the
length of the (potentially truncated) string returned in
SYMBOL_INFO.Name. Add an helper (symbol_setname) to set those fields
properly.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Eric Pouech
7d54682ffc
dbghelp: Fix a failure about 'wrong name EntryPoint'.
...
Regression was introduced in d614ac4671
by allowing to return the symbol with the lowest address in the module
even if the requested address was strictly below.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 20:49:05 +02:00
Gijs Vermeulen
8d260b40fc
dbghelp: Implement SymFromNameW().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50829
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 21:12:57 +02:00
Zebediah Figura
b70f9680c4
dbghelp: Link directly to __unDName.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 10:20:52 +02:00
Alexandre Julliard
0163db5152
dbghelp: Make qsort callback explicitly cdecl.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 09:14:17 +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
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
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
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
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