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
19f97c5f
Commit
19f97c5f
authored
Nov 15, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
>
parent
10a20b2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
dwarf.c
dlls/dbghelp/dwarf.c
+21
-12
No files found.
dlls/dbghelp/dwarf.c
View file @
19f97c5f
...
...
@@ -1835,8 +1835,9 @@ static void dwarf2_parse_enumerator(dwarf2_debug_info_t* di,
static
struct
symt
*
dwarf2_parse_enumeration_type
(
dwarf2_debug_info_t
*
di
)
{
struct
attribute
name
;
struct
attribute
size
;
struct
symt_basic
*
basetype
;
struct
attribute
attrtype
;
dwarf2_debug_info_t
*
ditype
;
struct
symt
*
type
;
struct
vector
*
children
;
dwarf2_debug_info_t
*
child
;
unsigned
int
i
;
...
...
@@ -1846,20 +1847,28 @@ static struct symt* dwarf2_parse_enumeration_type(dwarf2_debug_info_t* di)
TRACE
(
"%s
\n
"
,
dwarf2_debug_di
(
di
));
if
(
!
dwarf2_find_attribute
(
di
,
DW_AT_name
,
&
name
))
name
.
u
.
string
=
NULL
;
if
(
!
dwarf2_find_attribute
(
di
,
DW_AT_byte_size
,
&
size
))
size
.
u
.
uvalue
=
4
;
switch
(
size
.
u
.
uvalue
)
/* FIXME: that's wrong
*/
if
(
dwarf2_find_attribute
(
di
,
DW_AT_type
,
&
attrtype
)
&&
(
ditype
=
dwarf2_jump_to_debug_info
(
&
attrtype
))
!=
NULL
)
type
=
ditype
->
symt
;
else
/* no type found for this enumeration, construct it from size
*/
{
case
1
:
basetype
=
symt_new_basic
(
di
->
unit_ctx
->
module_ctx
->
module
,
btInt
,
"char"
,
1
);
break
;
case
2
:
basetype
=
symt_new_basic
(
di
->
unit_ctx
->
module_ctx
->
module
,
btInt
,
"short"
,
2
);
break
;
default:
case
4
:
basetype
=
symt_new_basic
(
di
->
unit_ctx
->
module_ctx
->
module
,
btInt
,
"int"
,
4
);
break
;
}
struct
attribute
size
;
struct
symt_basic
*
basetype
;
if
(
!
dwarf2_find_attribute
(
di
,
DW_AT_byte_size
,
&
size
))
size
.
u
.
uvalue
=
4
;
di
->
symt
=
&
symt_new_enum
(
di
->
unit_ctx
->
module_ctx
->
module
,
name
.
u
.
string
,
&
basetype
->
symt
)
->
symt
;
switch
(
size
.
u
.
uvalue
)
/* FIXME: that's wrong */
{
case
1
:
basetype
=
symt_new_basic
(
di
->
unit_ctx
->
module_ctx
->
module
,
btInt
,
"char"
,
1
);
break
;
case
2
:
basetype
=
symt_new_basic
(
di
->
unit_ctx
->
module_ctx
->
module
,
btInt
,
"short"
,
2
);
break
;
default:
case
4
:
basetype
=
symt_new_basic
(
di
->
unit_ctx
->
module_ctx
->
module
,
btInt
,
"int"
,
4
);
break
;
}
type
=
&
basetype
->
symt
;
}
di
->
symt
=
&
symt_new_enum
(
di
->
unit_ctx
->
module_ctx
->
module
,
name
.
u
.
string
,
type
)
->
symt
;
children
=
dwarf2_get_di_children
(
di
);
/* FIXME: should we use the sibling stuff ?? */
if
(
children
)
for
(
i
=
0
;
i
<
vector_length
(
children
);
i
++
)
{
child
=
*
(
dwarf2_debug_info_t
**
)
vector_at
(
children
,
i
);
...
...
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