Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
cadac127
Commit
cadac127
authored
Jul 16, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Jul 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix demangling of variables being an array.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
b02d5bb8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
cpp.c
dlls/msvcrt/tests/cpp.c
+1
-0
undname.c
dlls/msvcrt/undname.c
+18
-14
No files found.
dlls/msvcrt/tests/cpp.c
View file @
cadac127
...
...
@@ -1294,6 +1294,7 @@ static void test_demangle(void)
/* 131 */
{
"??_R0?AVCC@DD@@@8"
,
"class DD::CC `RTTI Type Descriptor'"
},
/* 132 */
{
"??$meth@FD@DD@CC@@QAE_NK@Z"
,
"public: bool __thiscall CC::DD::meth<short,char>(unsigned long)"
},
/* 133 */
{
"?func@@YAXPIFAH@Z"
,
"void __cdecl func(int __unaligned * __restrict)"
},
/* 135 */
{
"?x@@3PAY02HA"
,
"int (* x)[3]"
},
};
int
i
,
num_test
=
ARRAY_SIZE
(
test
);
char
*
name
;
...
...
dlls/msvcrt/undname.c
View file @
cadac127
...
...
@@ -466,11 +466,14 @@ static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
default:
return
FALSE
;
}
if
(
ref
||
str_modif
||
xdt
.
left
||
xdt
.
right
)
str_modif
=
str_printf
(
sym
,
" %s%s%s%s%s%s%s"
,
xdt
.
left
,
xdt
.
left
&&
ref
?
" "
:
NULL
,
ref
,
(
xdt
.
left
||
ref
)
&&
xdt
.
right
?
" "
:
NULL
,
xdt
.
right
,
(
xdt
.
left
||
ref
||
xdt
.
right
)
&&
str_modif
?
" "
:
NULL
,
str_modif
);
ct
->
left
=
str_printf
(
sym
,
" %s%s%s%s%s%s%s"
,
xdt
.
left
,
xdt
.
left
&&
ref
?
" "
:
NULL
,
ref
,
(
xdt
.
left
||
ref
)
&&
xdt
.
right
?
" "
:
NULL
,
xdt
.
right
,
(
xdt
.
left
||
ref
||
xdt
.
right
)
&&
str_modif
?
" "
:
NULL
,
str_modif
);
else
ct
->
left
=
NULL
;
ct
->
right
=
NULL
;
if
(
get_modifier
(
sym
,
&
xdt
))
{
...
...
@@ -487,29 +490,30 @@ static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
if
(
!
(
n1
=
get_number
(
sym
)))
return
FALSE
;
num
=
atoi
(
n1
);
if
(
str_modif
[
0
]
==
' '
&&
!
xdt
.
left
)
str_modif
++
;
if
(
ct
->
left
&&
ct
->
left
[
0
]
==
' '
&&
!
xdt
.
left
)
ct
->
left
++
;
str_modif
=
str_printf
(
sym
,
" (%s%s)"
,
xdt
.
left
,
str_modif
);
ct
->
left
=
str_printf
(
sym
,
" (%s%s"
,
xdt
.
left
,
ct
->
left
);
ct
->
right
=
")"
;
xdt
.
left
=
NULL
;
while
(
num
--
)
str_modif
=
str_printf
(
sym
,
"%s[%s]"
,
str_modif
,
get_number
(
sym
));
ct
->
right
=
str_printf
(
sym
,
"%s[%s]"
,
ct
->
right
,
get_number
(
sym
));
}
/* Recurse to get the referred-to type */
if
(
!
demangle_datatype
(
sym
,
&
sub_ct
,
pmt_ref
,
FALSE
))
return
FALSE
;
if
(
xdt
.
left
)
ct
->
left
=
str_printf
(
sym
,
"%s %s%s"
,
sub_ct
.
left
,
xdt
.
left
,
str_modif
);
ct
->
left
=
str_printf
(
sym
,
"%s %s%s"
,
sub_ct
.
left
,
xdt
.
left
,
ct
->
left
);
else
{
/* don't insert a space between duplicate '*' */
if
(
!
in_args
&&
str_modif
&&
str_modif
[
0
]
&&
str_modif
[
1
]
==
'*'
&&
sub_ct
.
left
[
strlen
(
sub_ct
.
left
)
-
1
]
==
'*'
)
str_modif
++
;
ct
->
left
=
str_printf
(
sym
,
"%s%s"
,
sub_ct
.
left
,
str_modif
);
if
(
!
in_args
&&
ct
->
left
&&
ct
->
left
[
0
]
&&
ct
->
left
[
1
]
==
'*'
&&
sub_ct
.
left
[
strlen
(
sub_ct
.
left
)
-
1
]
==
'*'
)
ct
->
left
++
;
ct
->
left
=
str_printf
(
sym
,
"%s%s"
,
sub_ct
.
left
,
ct
->
left
);
}
ct
->
right
=
sub_ct
.
right
;
if
(
sub_ct
.
right
)
ct
->
right
=
str_printf
(
sym
,
"%s%s"
,
ct
->
right
,
sub_ct
.
right
)
;
sym
->
stack
.
num
=
mark
;
}
return
TRUE
;
...
...
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