Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
0646e156
Commit
0646e156
authored
Sep 15, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Sep 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
>
parent
f7377e5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
dwarf.c
dlls/dbghelp/dwarf.c
+9
-1
info.c
programs/winedbg/info.c
+12
-1
No files found.
dlls/dbghelp/dwarf.c
View file @
0646e156
...
...
@@ -182,6 +182,7 @@ typedef struct dwarf2_parse_module_context_s
const
struct
elf_thunk_area
*
thunks
;
struct
symt
*
symt_cache
[
sc_num
];
/* void, unknown */
struct
vector
unit_contexts
;
DWORD
cu_versions
;
}
dwarf2_parse_module_context_t
;
enum
unit_status
...
...
@@ -2517,6 +2518,8 @@ static BOOL dwarf2_parse_compilation_unit_head(dwarf2_parse_context_t* ctx,
TRACE
(
"- word_size: %u
\n
"
,
ctx
->
head
.
word_size
);
TRACE
(
"- offset_size: %u
\n
"
,
ctx
->
head
.
offset_size
);
if
(
ctx
->
head
.
version
>=
2
)
ctx
->
module_ctx
->
cu_versions
|=
1
<<
(
ctx
->
head
.
version
-
2
);
if
(
max_supported_dwarf_version
==
0
)
{
char
*
env
=
getenv
(
"DBGHELP_DWARF_VERSION"
);
...
...
@@ -3732,6 +3735,7 @@ BOOL dwarf2_parse(struct module* module, ULONG_PTR load_offset,
module_ctx
.
symt_cache
[
sc_void
]
=
&
symt_new_basic
(
module_ctx
.
module
,
btVoid
,
"void"
,
0
)
->
symt
;
module_ctx
.
symt_cache
[
sc_unknown
]
=
&
symt_new_basic
(
module_ctx
.
module
,
btNoType
,
"# unknown"
,
0
)
->
symt
;
vector_init
(
&
module_ctx
.
unit_contexts
,
sizeof
(
dwarf2_parse_context_t
),
16
);
module_ctx
.
cu_versions
=
0
;
/* phase I: parse all CU heads */
mod_ctx
.
data
=
section
[
section_debug
].
address
;
...
...
@@ -3749,7 +3753,11 @@ BOOL dwarf2_parse(struct module* module, ULONG_PTR load_offset,
dwarf2_parse_compilation_unit
((
dwarf2_parse_context_t
*
)
vector_at
(
&
module_ctx
.
unit_contexts
,
i
));
dwarf2_modfmt
->
module
->
module
.
SymType
=
SymDia
;
dwarf2_modfmt
->
module
->
module
.
CVSig
=
'D'
|
(
'W'
<<
8
)
|
(
'A'
<<
16
)
|
(
'R'
<<
24
);
/* hide dwarf versions in CVSig
* bits 24-31 will be set according to found dwarf version
* different CU can have different dwarf version, so use a bit per version (version 2 => b24)
*/
dwarf2_modfmt
->
module
->
module
.
CVSig
=
'D'
|
(
'W'
<<
8
)
|
(
'F'
<<
16
)
|
((
module_ctx
.
cu_versions
&
0xFF
)
<<
24
);
/* FIXME: we could have a finer grain here */
dwarf2_modfmt
->
module
->
module
.
GlobalSymbols
=
TRUE
;
dwarf2_modfmt
->
module
->
module
.
TypeInfo
=
TRUE
;
...
...
programs/winedbg/info.c
View file @
0646e156
...
...
@@ -137,10 +137,21 @@ static const char* get_symtype_str(const IMAGEHLP_MODULE64* mi)
case
'S'
|
(
'T'
<<
8
)
|
(
'A'
<<
16
)
|
(
'B'
<<
24
):
return
"Stabs"
;
case
'D'
|
(
'W'
<<
8
)
|
(
'A'
<<
16
)
|
(
'R'
<<
24
):
/* previous versions of dbghelp used to report this... */
return
"Dwarf"
;
default:
if
((
mi
->
CVSig
&
0x00FFFFFF
)
==
(
'D'
|
(
'W'
<<
8
)
|
(
'F'
<<
16
)))
{
static
char
tmp
[
64
];
DWORD
versbit
=
mi
->
CVSig
>>
24
;
strcpy
(
tmp
,
"Dwarf"
);
if
(
versbit
&
1
)
strcat
(
tmp
,
"-2"
);
if
(
versbit
&
2
)
strcat
(
tmp
,
"-3"
);
if
(
versbit
&
4
)
strcat
(
tmp
,
"-4"
);
if
(
versbit
&
8
)
strcat
(
tmp
,
"-5"
);
return
tmp
;
}
return
"DIA"
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment