Eric Pouech
2da1698312
dbghelp/dwarf: Correctly compute address of label.
...
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
9768ea5637
dbghelp/dwarf: Bump max supported version (by default) up to 4.
...
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
56969bc80e
dbghelp/dwarf: Fix incorrect WARN.
...
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
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
0de0a80940
dbghelp/dwarf: Downgrade FIXME into WARN for empty range.
...
It happens to be generated for some inline functions, that we badly
support yet.
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
e039a28e3b
dbghelp/dwarf: Silence a couple of dwarf DIE's tag in load_one_debug_entry.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:14 +02:00
Eric Pouech
d8c9171c78
dbghelp/dwarf: Added support for OP_call_frame_cfa.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:14 +02:00
Eric Pouech
1ecd66200d
dbghelp/dwarf: Split dwarf2_virtual_unwind into two functions.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:14 +02:00
Eric Pouech
eabeb1da5c
dbghelp/dwarf: Pass cuhead to loc_compute_frame.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:14 +02:00
Eric Pouech
c2d1d76531
dbghelp/dwarf: Add support for DW_TAG_imported_unit.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:14 +02:00
Eric Pouech
e5a1b8b334
dbghelp/dwarf: Add support for partial compilation units.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:14 +02:00
Eric Pouech
e362ed8c28
dbghelp/dwarf: Fix a couple of parent/child mismatch.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:14 +02:00
Eric Pouech
15eb6a2560
dbghelp/dwarf: Handle C++ rvalue reference type as a reference.
...
As we don't handle C++ references yet, it'll be a pointer in the end.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 19:02:21 +02:00
Eric Pouech
79cd318b77
dbghelp/dwarf: Support more dwarf's TAG related to types in udt parsing.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 19:02:09 +02:00
Eric Pouech
88840187f5
dbghelp/dwarf: Added support for DW_TAG_subrange_type in various places.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 19:02:05 +02:00
Eric Pouech
44bcae3f8d
dbghelp/dwarf: Support enumeration as index type for arrays.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 19:02:00 +02:00
Eric Pouech
09d2a6cffb
dbghelp/dwarf: Added support for parsing dwarf's 3 restrict type TAG.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 19:01:52 +02:00
Eric Pouech
87485ea107
dbghelp/dwarf: Handle some Dwarf4 tweaks in high / low pc attributes.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 19:01:46 +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
69d07126fe
dbghelp/dwarf: Properly detect base address selection in AT_ranges.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 19:00:59 +02:00
Eric Pouech
ab8fdb191c
dbghelp/dwarf: In DW_AT_ranges, the values are relative to the start of the CU.
...
And not the module, as most of the other addresses.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 19:00:34 +02:00
Eric Pouech
8547aac2dc
dbghelp/dwarf: When loading a DWZ alternate file, don't force loading of all debug_infos.
...
Can have huge performance impact: libgcc_s.so.8 load time decreased
from 40 seconds down to less than 1 second.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
dc0ac71f5a
dbghelp/dwarf: Add proper support for DW_FORM_GNU_ref_alt.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
d832d51c2c
dbghelp/dwarf: Add a helper to jump into another debug_info.
...
This helper takes into account that source and destination debug_info
can be in different dwarf units, and even different debug files (DWZ).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
def87b2aef
dbghelp/dwarf: No longer pas a unit context when parsing debug_info content.
...
Use debug_info's unit_context instead.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
87b70fb272
dbghelp/dwarf: Fold printing info about unit context when printing debug_info's.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
e804b0754f
dbghelp/dwarf: No longer pass a unit context to dwarf2_get_cpp_name.
...
Use debug_info's unit context instead.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
61af17e6cf
dbghelp/dwarf: No longer pass a parse context to dwarf2_find_attribute.
...
Use debug_info's unit context instead.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
517f614bc8
dbghelp/dwarf: Load the alternate dwarf file content as we do for a regular dwarf module.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
9f74ac4b3b
dbghelp/dwarf: Handle DW_FORM_GNU_strp_alt (string located in an alternate DWZ file).
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
16d6656163
dbghelp/dwarf: Store a potential link to an external DWZ file in the dwarf2 module's information.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Eric Pouech
0646e15665
winedbg: Show dwarf version(s) used for a module.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:06:55 +02:00
Eric Pouech
f7377e5e65
dbghelp/dwarf: Add reference for a DIE to its CU.
...
Dwarf4 (and GNU extensions) support following debug info in
a) different CU
b) different ELF/PE files
So add a field from debug_info into the parent context unit
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:06:47 +02:00
Eric Pouech
f0c9397459
dbghelp/dwarf: Detect out of section sibling DIE information.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:06:42 +02:00
Eric Pouech
34b06f873a
dbghelp/dwarf: Support DW_FORM_ref_addr in type DIE lookup using the new cross-CU DIE mechanisms.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:06:30 +02:00
Eric Pouech
8c22d665a8
dbghelp/dwarf: Add ability to get to a DIE in a different CU.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:06:25 +02:00
Eric Pouech
5e74e2b919
dbghelp: Split the parsing of a dwarf compilation unit in two phases.
...
- first phase just parse the header and do elementary checks
- second phase, actually load all DIEs in CU
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:06:10 +02:00
Eric Pouech
f7244dc1a8
dbghelp/dwarf: Keep open and keep track of parse_context_t inside a module_context_t.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:06:07 +02:00
Eric Pouech
b4d0dbd70b
dbghelp/dwarf: Move the symt_cache from the unit context into the module context.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:06:01 +02:00
Eric Pouech
a345a1cf84
dbghelp/dwarf: Separate CU handling from module handling.
...
Move out of dwarf2_parse_context_s structure information related to the
module and put them into the dwarf2_parse_module_context_s structure
(actually the dwarf2_parse_context should be named dwarf2_parse_cu_context
as it only related to a compilation unit).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 22:05:52 +02:00
Eric Pouech
e87f3dd5b8
dbghelp/dwarf: Properly parse line number header for DWARF4 debug info.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:35:52 +02:00
Eric Pouech
e28ec5a0fb
dbghelp/dwarf: Detect auto reference between a dwarf's DIE and its type.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:35:52 +02:00
Eric Pouech
3111daa222
dbghelp/dwarf: Validate that a string is in the section boundary before using it.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:35:52 +02:00
Eric Pouech
23f0ebbca6
dbghelp/dwarf: Add definitions of some GNU extensions for FORMs.
...
And return failure when encoutering them, as they are not supported yet.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:35:52 +02:00
Eric Pouech
12a778426d
dbghelp/dwarf: Handle errors in dwarf2_fill_attr by returning a boolean.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:35:52 +02:00
Eric Pouech
40877456ea
dbghelp/dwarf: Add support for FORM_exprloc.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:35:52 +02:00
Eric Pouech
6bd22a2f50
dbghelp/dwarf: Add support for FORM_loc_offset and FORM_sec_offset.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:35:52 +02:00
Eric Pouech
8241fe3877
dbghelp/dwarf: Correctly handle attributes according to 32bit or 64bit format.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:35:52 +02:00
Eric Pouech
d78c09aa37
dbghelp/dwarf: Properly parse 32 vs bit 64bit entities.
...
Store the offset_size in dwarf2_cuhead_t.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:35:52 +02:00
Eric Pouech
92b3f1bf2a
dbghelp/dwarf: Don't recompute location when said location is complex.
...
This was generating a global symbol instead of a local symbol.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:24:47 +02:00