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
0c45c8b5
Commit
0c45c8b5
authored
May 15, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add support for function namespaces in symbol demangling.
parent
5d12e970
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
cpp.c
dlls/msvcrt/tests/cpp.c
+3
-0
undname.c
dlls/msvcrt/undname.c
+25
-4
No files found.
dlls/msvcrt/tests/cpp.c
View file @
0c45c8b5
...
...
@@ -1056,6 +1056,9 @@ static void test_demangle(void)
/* 121 */
{
"??$?DM@std@@YA?AV?$complex@M@0@ABMABV10@@Z"
,
"class std::complex<float> __cdecl std::operator*<float>(float const &,class std::complex<float> const &)"
,
"??$?DM@std@@YA?AV?$complex@M@0@ABMABV10@@Z"
},
/* 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"
},
};
int
i
,
num_test
=
(
sizeof
(
test
)
/
sizeof
(
test
[
0
]));
...
...
dlls/msvcrt/undname.c
View file @
0c45c8b5
...
...
@@ -106,6 +106,8 @@ struct datatype_t
const
char
*
right
;
};
static
BOOL
symbol_demangle
(
struct
parsed_symbol
*
sym
);
/******************************************************************
* und_alloc
*
...
...
@@ -597,12 +599,31 @@ static BOOL get_class(struct parsed_symbol* sym)
name
=
str_array_get_ref
(
&
sym
->
names
,
*
sym
->
current
++
-
'0'
);
break
;
case
'?'
:
if
(
*++
sym
->
current
==
'$'
)
switch
(
*++
sym
->
current
)
{
case
'$'
:
sym
->
current
++
;
if
((
name
=
get_template_name
(
sym
))
&&
!
str_array_push
(
sym
,
name
,
-
1
,
&
sym
->
names
))
return
FALSE
;
break
;
case
'?'
:
{
struct
array
stack
=
sym
->
stack
;
unsigned
int
start
=
sym
->
names
.
start
;
unsigned
int
num
=
sym
->
names
.
num
;
str_array_init
(
&
sym
->
stack
);
if
(
symbol_demangle
(
sym
))
name
=
str_printf
(
sym
,
"`%s'"
,
sym
->
result
);
sym
->
names
.
start
=
start
;
sym
->
names
.
num
=
num
;
sym
->
stack
=
stack
;
}
break
;
default:
if
(
!
(
name
=
get_number
(
sym
)))
return
FALSE
;
name
=
str_printf
(
sym
,
"`%s'"
,
name
);
break
;
}
break
;
default:
...
...
@@ -1233,8 +1254,6 @@ static BOOL symbol_demangle(struct parsed_symbol* sym)
/* MS mangled names always begin with '?' */
if
(
*
sym
->
current
!=
'?'
)
return
FALSE
;
str_array_init
(
&
sym
->
names
);
str_array_init
(
&
sym
->
stack
);
sym
->
current
++
;
/* Then function name or operator code */
...
...
@@ -1436,7 +1455,7 @@ static BOOL symbol_demangle(struct parsed_symbol* sym)
sym
->
flags
&=
~
UNDNAME_NO_FUNCTION_RETURNS
;
break
;
case
5
:
sym
->
names
.
start
=
1
;
sym
->
names
.
start
++
;
break
;
}
...
...
@@ -1497,6 +1516,8 @@ char* CDECL __unDNameEx(char* buffer, const char* mangled, int buflen,
sym
.
mem_alloc_ptr
=
memget
;
sym
.
mem_free_ptr
=
memfree
;
sym
.
current
=
mangled
;
str_array_init
(
&
sym
.
names
);
str_array_init
(
&
sym
.
stack
);
result
=
symbol_demangle
(
&
sym
)
?
sym
.
result
:
mangled
;
if
(
buffer
&&
buflen
)
...
...
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