Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
8241fe38
Commit
8241fe38
authored
Sep 11, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Sep 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
>
parent
d78c09aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
dwarf.c
dlls/dbghelp/dwarf.c
+15
-10
No files found.
dlls/dbghelp/dwarf.c
View file @
8241fe38
...
...
@@ -480,7 +480,7 @@ static void dwarf2_swallow_attribute(dwarf2_traverse_context_t* ctx,
switch
(
abbrev_attr
->
form
)
{
case
DW_FORM_flag_present
:
step
=
0
;
break
;
case
DW_FORM_ref_addr
:
case
DW_FORM_ref_addr
:
step
=
(
head
->
version
>=
3
)
?
head
->
offset_size
:
head
->
word_size
;
break
;
case
DW_FORM_addr
:
step
=
head
->
word_size
;
break
;
case
DW_FORM_flag
:
case
DW_FORM_data1
:
...
...
@@ -488,8 +488,8 @@ static void dwarf2_swallow_attribute(dwarf2_traverse_context_t* ctx,
case
DW_FORM_data2
:
case
DW_FORM_ref2
:
step
=
2
;
break
;
case
DW_FORM_data4
:
case
DW_FORM_ref4
:
case
DW_FORM_strp
:
step
=
4
;
break
;
case
DW_FORM_ref4
:
step
=
4
;
break
;
case
DW_FORM_strp
:
step
=
head
->
offset_size
;
break
;
case
DW_FORM_data8
:
case
DW_FORM_ref8
:
step
=
8
;
break
;
case
DW_FORM_sdata
:
...
...
@@ -516,6 +516,13 @@ static void dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
switch
(
attr
->
form
)
{
case
DW_FORM_ref_addr
:
if
(
ctx
->
head
.
version
>=
3
)
attr
->
u
.
uvalue
=
dwarf2_get_addr
(
data
,
ctx
->
head
.
offset_size
);
else
attr
->
u
.
uvalue
=
dwarf2_get_addr
(
data
,
ctx
->
head
.
word_size
);
TRACE
(
"addr<0x%lx>
\n
"
,
attr
->
u
.
uvalue
);
break
;
case
DW_FORM_addr
:
attr
->
u
.
uvalue
=
dwarf2_get_addr
(
data
,
ctx
->
head
.
word_size
);
TRACE
(
"addr<0x%lx>
\n
"
,
attr
->
u
.
uvalue
);
...
...
@@ -590,13 +597,11 @@ static void dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
break
;
case
DW_FORM_strp
:
{
ULONG_PTR
offset
=
dwarf2_get_u4
(
data
);
attr
->
u
.
string
=
(
const
char
*
)
ctx
->
sections
[
section_string
].
address
+
offset
;
}
TRACE
(
"strp<%s>
\n
"
,
debugstr_a
(
attr
->
u
.
string
));
break
;
attr
->
u
.
string
=
(
const
char
*
)
ctx
->
sections
[
section_string
].
address
+
dwarf2_get_addr
(
data
,
ctx
->
head
.
offset_size
);
TRACE
(
"strp<%s>
\n
"
,
debugstr_a
(
attr
->
u
.
string
));
break
;
case
DW_FORM_block
:
attr
->
u
.
block
.
size
=
dwarf2_get_leb128_as_unsigned
(
data
,
&
attr
->
u
.
block
.
ptr
);
TRACE
(
"block<%p,%u>
\n
"
,
attr
->
u
.
block
.
ptr
,
attr
->
u
.
block
.
size
);
...
...
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