Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
0df84ecf
Commit
0df84ecf
authored
11 years ago
by
Piotr Caban
Committed by
Alexandre Julliard
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msvcrt: Add support for vtordisp functions demangling.
parent
2734ae07
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/msvcrt/tests/cpp.c
+3
-1
3 additions, 1 deletion
dlls/msvcrt/tests/cpp.c
dlls/msvcrt/undname.c
+33
-9
33 additions, 9 deletions
dlls/msvcrt/undname.c
with
36 additions
and
10 deletions
dlls/msvcrt/tests/cpp.c
+
3
−
1
View file @
0df84ecf
...
...
@@ -1309,7 +1309,9 @@ static void test_demangle(void)
/* 122 */
{
"?_R2@?BN@???$_Fabs@N@std@@YANAEBV?$complex@N@1@PEAH@Z@4NB"
,
"double const `double __cdecl std::_Fabs<double>(class std::complex<double> const & __ptr64,int * __ptr64)'::`29'::_R2"
,
"?_R2@?BN@???$_Fabs@N@std@@YANAEBV?$complex@N@1@PEAH@Z@4NB"
},
/* 123 */
{
"?vtordisp_thunk@std@@$4PPPPPPPM@3EAA_NXZ"
,
"[thunk]:public: virtual bool __cdecl std::vtordisp_thunk`vtordisp{4294967292,4}' (void) __ptr64"
,
"[thunk]:public: virtual bool __cdecl std::vtordisp_thunk`vtordisp{-4,4}' (void) __ptr64"
},
};
int
i
,
num_test
=
(
sizeof
(
test
)
/
sizeof
(
test
[
0
]));
char
*
name
;
...
...
This diff is collapsed.
Click to expand it.
dlls/msvcrt/undname.c
+
33
−
9
View file @
0df84ecf
...
...
@@ -331,7 +331,7 @@ static const char* get_number(struct parsed_symbol* sym)
if
(
*
sym
->
current
!=
'@'
)
return
NULL
;
ptr
=
und_alloc
(
sym
,
17
);
sprintf
(
ptr
,
"%s%
d
"
,
sgn
?
"-"
:
""
,
ret
);
sprintf
(
ptr
,
"%s%
u
"
,
sgn
?
"-"
:
""
,
ret
);
sym
->
current
++
;
}
else
return
NULL
;
...
...
@@ -1103,13 +1103,24 @@ static BOOL handle_method(struct parsed_symbol* sym, BOOL cast_op)
* 'X' public: thunk
* 'Y'
* 'Z'
* "$0" private: thunk vtordisp
* "$1" private: thunk vtordisp
* "$2" protected: thunk vtordisp
* "$3" protected: thunk vtordisp
* "$4" public: thunk vtordisp
* "$5" public: thunk vtordisp
*/
accmem
=
*
sym
->
current
++
;
if
(
accmem
<
'A'
||
accmem
>
'Z'
)
goto
done
;
if
(
accmem
==
'$'
)
{
accmem
=
*
sym
->
current
++
;
if
(
accmem
<
'0'
||
accmem
>
'5'
)
goto
done
;
}
else
if
(
accmem
<
'A'
||
accmem
>
'Z'
)
goto
done
;
if
(
!
(
sym
->
flags
&
UNDNAME_NO_ACCESS_SPECIFIERS
))
{
switch
((
accmem
-
'A'
)
/
8
)
switch
(
accmem
>=
'0'
&&
accmem
<=
'5'
?
(
accmem
-
'0'
)
/
2
:
(
accmem
-
'A'
)
/
8
)
{
case
0
:
access
=
"private: "
;
break
;
case
1
:
access
=
"protected: "
;
break
;
...
...
@@ -1118,7 +1129,12 @@ static BOOL handle_method(struct parsed_symbol* sym, BOOL cast_op)
}
if
(
!
(
sym
->
flags
&
UNDNAME_NO_MEMBER_TYPE
))
{
if
(
accmem
<=
'X'
)
if
(
accmem
>=
'0'
&&
accmem
<=
'5'
)
{
access
=
str_printf
(
sym
,
"[thunk]:%s"
,
access
);
member_type
=
"virtual "
;
}
else
if
(
accmem
<=
'X'
)
{
switch
((
accmem
-
'A'
)
%
8
)
{
...
...
@@ -1134,7 +1150,15 @@ static BOOL handle_method(struct parsed_symbol* sym, BOOL cast_op)
name
=
get_class_string
(
sym
,
0
);
if
((
accmem
-
'A'
)
%
8
==
6
||
(
accmem
-
'8'
)
%
8
==
7
)
/* a thunk */
if
(
accmem
>=
'0'
&&
accmem
<=
'5'
)
/* vtordisp thunk */
{
const
char
*
n1
=
get_number
(
sym
);
const
char
*
n2
=
get_number
(
sym
);
if
(
!
n1
||
!
n2
)
goto
done
;
name
=
str_printf
(
sym
,
"%s`vtordisp{%s,%s}' "
,
name
,
n1
,
n2
);
}
else
if
((
accmem
-
'A'
)
%
8
==
6
||
(
accmem
-
'A'
)
%
8
==
7
)
/* a thunk */
name
=
str_printf
(
sym
,
"%s`adjustor{%s}' "
,
name
,
get_number
(
sym
));
if
(
accmem
<=
'X'
)
...
...
@@ -1194,7 +1218,7 @@ done:
}
/******************************************************************
*
handle_template
*
handle_template
* Does the final parsing and handling for a name with templates
*/
static
BOOL
handle_template
(
struct
parsed_symbol
*
sym
)
...
...
@@ -1443,10 +1467,10 @@ static BOOL symbol_demangle(struct parsed_symbol* sym)
/* Function/Data type and access level */
if
(
*
sym
->
current
>=
'0'
&&
*
sym
->
current
<=
'9'
)
ret
=
handle_data
(
sym
);
else
if
(
*
sym
->
current
>=
'A'
&&
*
sym
->
current
<=
'Z'
)
ret
=
handle_method
(
sym
,
do_after
==
3
);
else
if
(
*
sym
->
current
==
'$'
)
else
if
(
sym
->
current
[
0
]
==
'$'
&&
(
sym
->
current
[
1
]
<
'0'
||
sym
->
current
[
1
]
>
'9'
))
ret
=
handle_template
(
sym
);
else
if
((
*
sym
->
current
>=
'A'
&&
*
sym
->
current
<=
'Z'
)
||
*
sym
->
current
==
'$'
)
ret
=
handle_method
(
sym
,
do_after
==
3
);
else
ret
=
FALSE
;
done:
if
(
ret
)
assert
(
sym
->
result
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment