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
6cc66c99
Commit
6cc66c99
authored
Nov 14, 2005
by
Uwe Bonnes
Committed by
Alexandre Julliard
Nov 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undname: Allow more then one coded character in demangle_datatype.
parent
3a547b08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
18 deletions
+42
-18
cpp.c
dlls/msvcrt/tests/cpp.c
+29
-5
undname.c
dlls/msvcrt/undname.c
+13
-13
No files found.
dlls/msvcrt/tests/cpp.c
View file @
6cc66c99
...
...
@@ -818,13 +818,37 @@ static void test_rtti(void)
ok
(
casted
==
NULL
,
"Cast succeeded
\n
"
);
}
struct
_demangle
{
LPCSTR
mangled
;
LPCSTR
result
;
BOOL
test_in_wine
;
};
static
void
test_demangle
(
void
)
{
char
*
name
=
NULL
;
static
const
char
*
mangled
=
".ABVVec4@ref2@dice@@"
;
static
const
char
*
result
=
"class dice::ref2::Vec4 const &"
;
name
=
p__unDName
(
0
,
mangled
+
1
,
0
,
pmalloc
,
pfree
,
0x2800
);
ok
(
name
!=
NULL
&&
!
strcmp
(
name
,
result
),
"Got name %s
\n
"
,
name
);
char
*
name
;
struct
_demangle
demangle
[]
=
{
/* { "BlaBla"," ?? ::Bla", FALSE}, */
{
"ABVVec4@ref2@dice@@"
,
"class dice::ref2::Vec4 const &"
,
TRUE
},
{
"?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0H@@@"
,
"class CDB_GEN_BIG_ENUM_FLAG<enum CDB_WYSIWYG_BITS_ENUM,7>"
,
TRUE
},
{
"?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0HO@@@"
,
"class CDB_GEN_BIG_ENUM_FLAG<enum CDB_WYSIWYG_BITS_ENUM,126>"
,
TRUE
},
{
"?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0HOA@@@"
,
"class CDB_GEN_BIG_ENUM_FLAG<enum CDB_WYSIWYG_BITS_ENUM,2016>"
,
TRUE
},
{
"?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0HOAA@@@"
,
"class CDB_GEN_BIG_ENUM_FLAG<enum CDB_WYSIWYG_BITS_ENUM,32256>"
,
TRUE
},
{
"?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$01@@@"
,
"?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$01@@@"
,
FALSE
},
/* { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$011@@@", "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$011@@@",FALSE}, */
};
int
i
,
num_test
=
(
sizeof
(
demangle
)
/
sizeof
(
struct
_demangle
));
for
(
i
=
0
;
i
<
num_test
;
i
++
)
{
name
=
NULL
;
name
=
p__unDName
(
0
,
demangle
[
i
].
mangled
,
0
,
pmalloc
,
pfree
,
0x2800
);
if
(
demangle
[
i
].
test_in_wine
)
ok
(
name
!=
NULL
&&
!
strcmp
(
name
,
demangle
[
i
].
result
),
"Got name
\"
%s
\"\n
"
,
name
);
else
todo_wine
ok
(
name
!=
NULL
&&
!
strcmp
(
name
,
demangle
[
i
].
result
),
"Got name %s
\n
"
,
name
);
}
}
START_TEST
(
cpp
)
...
...
dlls/msvcrt/undname.c
View file @
6cc66c99
...
...
@@ -23,6 +23,7 @@
#include "wine/port.h"
#include <assert.h>
#include <stdio.h>
#include "msvcrt.h"
#include "wine/debug.h"
...
...
@@ -598,6 +599,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
{
char
dt
;
BOOL
add_pmt
=
TRUE
;
int
num_args
=
0
;
assert
(
ct
);
ct
->
left
=
ct
->
right
=
NULL
;
...
...
@@ -713,24 +715,22 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
ct
->
left
=
ptr
;
sym
->
current
+=
2
;
}
else
if
((
sym
->
current
[
1
]
>=
'A'
&&
sym
->
current
[
1
]
<=
'P'
)
&&
sym
->
current
[
2
]
==
'@'
)
else
if
(
sym
->
current
[
1
]
>=
'A'
&&
sym
->
current
[
1
]
<=
'P'
)
{
char
*
ptr
;
ptr
=
und_alloc
(
sym
,
3
);
if
(
sym
->
current
[
1
]
<=
'J'
)
while
(
sym
->
current
[
1
]
>=
'A'
&&
sym
->
current
[
1
]
<=
'P'
)
{
ptr
[
0
]
=
'0'
+
sym
->
current
[
1
]
-
'A'
;
ptr
[
1
]
=
0
;
num_args
*=
16
;
num_args
+=
sym
->
current
[
1
]
-
'A'
;
sym
->
current
+=
1
;
}
else
if
(
sym
->
current
[
1
]
==
'@'
)
{
ptr
[
0
]
=
'1'
;
ptr
[
1
]
=
sym
->
current
[
1
]
-
'K'
+
'0'
;
ptr
[
2
]
=
0
;
char
*
ptr
;
ptr
=
und_alloc
(
sym
,
17
);
sprintf
(
ptr
,
"%d"
,
num_args
);
ct
->
left
=
ptr
;
sym
->
current
+=
1
;
}
ct
->
left
=
ptr
;
sym
->
current
+=
3
;
}
else
goto
done
;
break
;
...
...
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