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
2f0c0f4c
Commit
2f0c0f4c
authored
Nov 02, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Re-import the demangling code from msvcrt.
parent
1d583004
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
52 deletions
+5
-52
dump.c
tools/winedump/dump.c
+3
-50
main.c
tools/winedump/main.c
+1
-1
msmangle.c
tools/winedump/msmangle.c
+0
-0
winedump.h
tools/winedump/winedump.h
+1
-1
No files found.
tools/winedump/dump.c
View file @
2f0c0f4c
...
...
@@ -130,58 +130,11 @@ void dump_unicode_str( const WCHAR *str, int len )
const
char
*
get_symbol_str
(
const
char
*
symname
)
{
char
*
tmp
;
const
char
*
ret
;
const
char
*
ret
=
NULL
;
if
(
!
symname
)
return
"(nil)"
;
if
(
globals
.
do_demangle
)
{
parsed_symbol
symbol
;
symbol_init
(
&
symbol
,
symname
);
if
(
!
symbol_demangle
(
&
symbol
))
ret
=
symname
;
else
if
(
symbol
.
flags
&
SYM_DATA
)
{
ret
=
tmp
=
dump_want_n
(
strlen
(
symbol
.
arg_text
[
0
])
+
1
);
if
(
tmp
)
strcpy
(
tmp
,
symbol
.
arg_text
[
0
]);
}
else
{
unsigned
int
i
,
len
,
start
=
symbol
.
flags
&
SYM_THISCALL
?
1
:
0
;
len
=
strlen
(
symbol
.
return_text
)
+
3
/* ' __' */
+
strlen
(
symbol_get_call_convention
(
&
symbol
))
+
1
/* ' ' */
+
strlen
(
symbol
.
function_name
)
+
1
/* ')' */
;
if
(
!
symbol
.
argc
||
(
symbol
.
argc
==
1
&&
symbol
.
flags
&
SYM_THISCALL
))
len
+=
4
/* "void" */
;
else
for
(
i
=
start
;
i
<
symbol
.
argc
;
i
++
)
len
+=
(
i
>
start
?
2
/* ", " */
:
0
/* "" */
)
+
strlen
(
symbol
.
arg_text
[
i
]);
if
(
symbol
.
varargs
)
len
+=
5
/* ", ..." */
;
len
+=
2
;
/* ")\0" */
ret
=
tmp
=
dump_want_n
(
len
);
if
(
tmp
)
{
sprintf
(
tmp
,
"%s __%s %s("
,
symbol
.
return_text
,
symbol_get_call_convention
(
&
symbol
),
symbol
.
function_name
);
if
(
!
symbol
.
argc
||
(
symbol
.
argc
==
1
&&
symbol
.
flags
&
SYM_THISCALL
))
strcat
(
tmp
,
"void"
);
else
for
(
i
=
start
;
i
<
symbol
.
argc
;
i
++
)
{
if
(
i
>
start
)
strcat
(
tmp
,
", "
);
strcat
(
tmp
,
symbol
.
arg_text
[
i
]);
}
if
(
symbol
.
varargs
)
strcat
(
tmp
,
", ..."
);
strcat
(
tmp
,
")"
);
}
}
symbol_clear
(
&
symbol
);
}
else
ret
=
symname
;
return
ret
;
if
(
globals
.
do_demangle
)
ret
=
demangle
(
symname
);
return
ret
?
ret
:
symname
;
}
const
char
*
get_guid_str
(
const
GUID
*
guid
)
...
...
tools/winedump/main.c
View file @
2f0c0f4c
...
...
@@ -453,7 +453,7 @@ int main (int argc, char *argv[])
if
(
globals
.
do_code
&&
symbol_searched
(
count
,
symbol
.
symbol
))
{
/* Attempt to get information about the symbol */
BOOL
result
=
symbol_
demangle
(
&
symbol
)
||
symbol_
search
(
&
symbol
);
BOOL
result
=
symbol_search
(
&
symbol
);
if
(
result
&&
symbol
.
function_name
)
/* Clean up the prototype */
...
...
tools/winedump/msmangle.c
View file @
2f0c0f4c
This diff is collapsed.
Click to expand it.
tools/winedump/winedump.h
View file @
2f0c0f4c
...
...
@@ -168,7 +168,7 @@ BOOL dll_next_symbol (parsed_symbol * sym);
/* Symbol functions */
void
symbol_init
(
parsed_symbol
*
symbol
,
const
char
*
name
);
BOOL
symbol_demangle
(
parsed_symbol
*
symbol
);
char
*
demangle
(
const
char
*
name
);
BOOL
symbol_search
(
parsed_symbol
*
symbol
);
...
...
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