Alexandre Julliard
088a787a2c
makefiles: Make -mno-cygwin the default.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +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
e5dbf5f74e
dbghelp: Added support for locating a .dwz file (GNU extension) attached to a debug file.
...
A DWZ file contains additional Dwarf debug information, and can be shared
across several debug info files.
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
fc380e0691
dbghelp: Separate alternate debug file lookup functions.
...
Split in two different (and disjoint) the functions for checking that
an alternate debug file matches the expected one
- the first based on crc
- the second based on GNU build-id
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
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
c031d5aa8c
dbghelp: Use correct parameter name.
...
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
7f2eb08304
dbghelp/dwarf: Initialize module's word_size at module load time.
...
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
7bb85884e0
dbghelp/dwarf: Pass dwarf2_cuhead_t to lookuploclist().
...
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
0b7f8373e3
dbghelp/dwarf: Use word_size from cuhead_t.
...
Removed word_size from traverse context and make use of cuhead_t's
equivalent field instead
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:33:12 +02:00
Eric Pouech
ff7ec0d829
dbghelp/dwarf: Pass word_size as a parameter to a couple of frame related functions.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:32:56 +02:00
Eric Pouech
bb5d9cf63d
dbghelp/dwarf: Pass a parse_cuhead_t to compute_location().
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:32:43 +02:00
Eric Pouech
d12c754806
dbghelp/dwarf: Pass dwarf2_cuhead_t for addr details to swallow_attribute.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:32:31 +02:00
Eric Pouech
f4da45d9f5
dbghelp/dwarf: Add word size parameter to parse_addr() internal function.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:32:14 +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
1c8869e79a
dbghelp/dwarf: Add dwarf2_cuhead_s structure to hold compilation unit parsing info.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:31:30 +02:00
Eric Pouech
31b6640e48
dbghelp/dwarf: Allow tweaking from env variable which DWARF version is to be loaded.
...
This is a temporary feature while implementing the required bits for Dwarf3
and Dwarf4 format.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 22:31:28 +02:00
Akihiro Sagawa
70032f8863
dbghelp: Get rid of useless while loop.
...
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 19:34:12 +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