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
5bdbc1a3
Commit
5bdbc1a3
authored
Sep 17, 2001
by
Eric Pouech
Committed by
Alexandre Julliard
Sep 17, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed demangling invocation.
Be a bit more verbose on implemented features.
parent
7c1db50c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
10 deletions
+25
-10
main.c
tools/winedump/main.c
+7
-5
msmangle.c
tools/winedump/msmangle.c
+3
-0
pe.c
tools/winedump/pe.c
+7
-5
symbol.c
tools/winedump/symbol.c
+6
-0
winedump.h
tools/winedump/winedump.h
+2
-0
No files found.
tools/winedump/main.c
View file @
5bdbc1a3
...
...
@@ -149,7 +149,7 @@ struct option
static
const
struct
option
option_table
[]
=
{
{
"-h"
,
NONE
,
0
,
do_usage
,
"-h Display this help message"
},
{
"sym"
,
DMGL
,
2
,
do_demangle
,
"sym <sym> Demangle C++ symbol <sym>
'
and exit"
},
{
"sym"
,
DMGL
,
2
,
do_demangle
,
"sym <sym> Demangle C++ symbol <sym> and exit"
},
{
"spec"
,
SPEC
,
2
,
do_spec
,
"spec <dll> Use dll for input file and generate implementation code"
},
{
"-I"
,
SPEC
,
1
,
do_include
,
"-I dir Look for prototypes in 'dir' (implies -c)"
},
{
"-c"
,
SPEC
,
0
,
do_code
,
"-c Generate skeleton code (requires -I)"
},
...
...
@@ -259,7 +259,6 @@ int main (int argc, char *argv[])
{
parsed_symbol
symbol
;
int
count
=
0
;
int
result
;
globals
.
mode
=
NONE
;
...
...
@@ -272,15 +271,18 @@ int main (int argc, char *argv[])
case
DMGL
:
globals
.
uc_dll_name
=
""
;
VERBOSE
=
1
;
symbol
.
symbol
=
strdup
(
globals
.
input_name
);
result
=
symbol_demangle
(
&
symbol
);
symbol_init
(
&
symbol
,
globals
.
input_name
);
if
(
symbol_demangle
(
&
symbol
)
==
-
1
);
fatal
(
"Symbol hasn't got a mangled name
\n
"
);
if
(
symbol
.
flags
&
SYM_DATA
)
printf
(
symbol
.
arg_text
[
0
]);
else
output_prototype
(
stdout
,
&
symbol
);
fputc
(
'\n'
,
stdout
);
return
result
?
1
:
0
;
symbol_clear
(
&
symbol
)
;
break
;
case
SPEC
:
dll_open
(
globals
.
input_name
);
...
...
tools/winedump/msmangle.c
View file @
5bdbc1a3
...
...
@@ -486,7 +486,10 @@ static char *demangle_datatype (char **str, compound_type *ct,
/* FIXME: P6 = Function pointer, others who knows.. */
if
(
isdigit
(
*
iter
))
{
if
(
*
iter
==
6
)
printf
(
"Function pointer in argument list is not handled yet
\n
"
);
return
NULL
;
}
/* Recurse to get the pointed-to type */
if
(
!
demangle_datatype
(
&
iter
,
&
sub_ct
,
sym
))
...
...
tools/winedump/pe.c
View file @
5bdbc1a3
...
...
@@ -336,15 +336,17 @@ static void dump_dir_exported_functions(void)
name
=
(
char
*
)
RVA
(
*
pName
,
sizeof
(
DWORD
));
if
(
name
&&
globals
.
do_demangle
)
{
symbol
.
symbol
=
strdup
(
name
);
symbol_demangle
(
&
symbol
);
printf
(
" %08lX %4lu "
,
pFunc
[
*
pOrdl
],
exportDir
->
Base
+
*
pOrdl
);
if
(
symbol
.
flags
&
SYM_DATA
)
printf
(
symbol
.
arg_text
[
0
]);
symbol_init
(
&
symbol
,
name
);
if
(
symbol_demangle
(
&
symbol
)
==
-
1
)
printf
(
name
);
else
if
(
symbol
.
flags
&
SYM_DATA
)
printf
(
symbol
.
arg_text
[
0
]);
else
output_prototype
(
stdout
,
&
symbol
);
printf
(
"
\n
"
);
symbol_clear
(
&
symbol
);
}
else
{
...
...
tools/winedump/symbol.c
View file @
5bdbc1a3
...
...
@@ -72,6 +72,12 @@ static const char *known_longs[] =
"WCHAR"
,
"BOOL"
,
"bool"
,
"INT16"
,
"WORD"
,
"DWORD"
,
NULL
};
int
symbol_init
(
parsed_symbol
*
sym
,
const
char
*
name
)
{
memset
(
sym
,
0
,
sizeof
(
parsed_symbol
));
sym
->
symbol
=
strdup
(
name
);
return
0
;
}
/*******************************************************************
* symbol_clear
...
...
tools/winedump/winedump.h
View file @
5bdbc1a3
...
...
@@ -138,6 +138,8 @@ void dll_open (const char *dll_name);
int
dll_next_symbol
(
parsed_symbol
*
sym
);
/* Symbol functions */
int
symbol_init
(
parsed_symbol
*
symbol
,
const
char
*
name
);
int
symbol_demangle
(
parsed_symbol
*
symbol
);
int
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