Eric Pouech
b65ef71fc0
dbghelp: Improve collision handling in SymLoadModuleEx().
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-16 22:14:54 +01:00
Eric Pouech
1465c7de2a
dbghelp: Detect collision by looking at module's base address in SymLoadModuleEx().
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-16 22:14:40 +01:00
Eric Pouech
ced12a1a3a
dbghelp: Move debug info loading out of image backends into SymLoadModuleEx().
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-16 22:14:24 +01:00
Eric Pouech
1b7bce4bf8
dbghelp: Allow 32bit dbghelp to handle 64 addresses.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-16 22:14:05 +01:00
Eric Pouech
8e8243a308
dbghelp: Always search current directory when loading PE modules.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-16 22:13:51 +01:00
Eric Pouech
e00f0d81fb
dbghelp: Fix module name construction.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-16 22:13:45 +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
6bedd7cce6
dbghelp/tests: Add tests for SymSetSearchPath.
...
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:03:37 +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
cb8aef440e
dbghelp/msc: Support S_SEPCODE codeview record.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:02:04 +01:00
Eric Pouech
7fec9fdcb2
dbghelp/msc: Silence a couple of unneeded codeview entries while parsing PDB.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:02:00 +01:00
Eric Pouech
82ea35cbb5
dbghelp/dwarf: Fix computation of some location attributes.
...
Dwarf4 clarified that only FORM_sec_offset can refer to location
lists, fix dwarf2_compute_location_attr accordingly.
This fixes the 'fixme:dwarf2_parse_udt_member: Found register, while
not expecting it' messages.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:01:47 +01:00
Eric Pouech
61c8728a6e
dbghelp/dwarf: Don't register labels without address.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:01:35 +01:00
Eric Pouech
19f97c5fd8
dbghelp/dwarf: Make use of AT_type if present when parsing an enumeration type.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 20:01:28 +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
acfcd84a05
dbghelp/dwarf: Workaround functions with multiple range of addresses.
...
gcc can emit functions with code spread across non contiguous code areas.
We used to register those functions with an address range enclosing all ranges
(meaning that all addresses not actually belonging to the function but
lying in that address range could be returned by dbghelp as belonging
to the function).
Work around this by registering the function with only the first range
of addresses (this will avoid the errors described above), but will
fail to mark the other address ranges as part of the function.
dbghelp doesn't seem to have explicit support of those cases, even if
pdb/codeview also support functions with multi range of addresses
(see S_SEPCODE).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-10 20:16:26 +01:00
Eric Pouech
b332bda8e2
dbghelp/dwarf: Introduce a helper to read properly multiple range of addresses.
...
Use it to reimplement dwarf2_feed_inlined_ranges.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-10 20:16:17 +01:00
Eric Pouech
0c3274b526
dbghelp/msc: Better detect whether IPI stream is present.
...
Old version of PDB files can have a stream #4 which is not an IPI stream
Available documentation isn't 100% clear about when IPI has been
introduced.
So decide that IPI is present when header of stream looks like a type
stream header.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-10 20:14:08 +01:00
Eric Pouech
92fabc64e5
dbghelp/pdb: Fix start adress of block.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-10 20:13:27 +01:00
Eric Pouech
d8f26a4233
dbghelp/pdb: Add line number to inline sites.
...
Requires to join DEBUG_S_INLINEES subsection with symbol annotations.
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
bfc0edb8cf
dbghelp/pdb: Handle a block in DEBUG_S_LINES subsection spreading across several symbols.
...
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
cab92c90e0
dbghelp/pdb: Added support for S_INLINESITE and S_INLINESITE_END.
...
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
3bc073d8bf
dbghelp/pdb: Let codeview_snarf() handle all module debug information.
...
Except old linetab v1.
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
54ec50d859
dbghelp/pdb: Introduce codeview_init_type_parse() to handle init of type streams.
...
Currently used for TPI stream.
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
b73ca9f05e
dbghelp/pdb: Implement loc_compute for pdb backend.
...
Add support for S_DEFRANGE* entries.
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
7ad847bc34
dbghelp/pdb: Handle S_LOCAL codeview entries.
...
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
de5fe89357
dbghelp/pdb: Add new basic type to represent char8_t introduced in C++20.
...
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
9f3e8a515f
dbghelp: Use cpu from debuggee's modules rather than debugger's.
...
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
e8b195329e
dbghelp: Use module's cpu word size instead of sizeof(void*) or sizeof(DWORD_PTR).
...
This fixes a couple of wrong pointer size computation when debugging a
WoW64 process from a 64 bit debugger.
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
d72e6ac772
dbghelp: Attach a struct cpu* to every module.
...
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
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
f83e647547
dbghelp/dwarf: Don't skip functions when their inlined flag comes from an abstract origin.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-05 17:10:45 +01:00
Eric Pouech
5f9bcb13b7
mscvpdb.h: Move parsing definitions to dbghelp.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 20:32:51 +01:00
Eric Pouech
fbc65b802b
dbghelp/pdb: Convert to new debug subsection definitions (in linetab2).
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 20:32:51 +01:00
Eric Pouech
f0b8518333
mscvpdb.h: Update symbol header for linetab2's block size.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 20:32:51 +01:00
Eric Pouech
c967245ba8
dbghelp: Silence a couple more CV entries.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-29 21:28:36 +02:00
Eric Pouech
ec0af6dc3e
dbghelp: Silence a couple of C++ oriented requests in SymGetTypeInfo().
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-29 21:28:32 +02:00
Eric Pouech
7bde153afe
dbghelp/dwarf: Store line numbers and file info for inlined functions.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-29 21:28:19 +02: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
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
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
ecb91941b3
dbghelp/dwarf: Add current block as a field in dwarf2_subprogram_t.
...
Instead of passing it as a parameter in various subprogram related
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