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
1bd74051
Commit
1bd74051
authored
Jan 13, 2014
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Jan 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Use BOOL type where appropriate.
parent
993fb863
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
25 deletions
+22
-25
dump.c
tools/winedump/dump.c
+1
-1
main.c
tools/winedump/main.c
+3
-6
msmangle.c
tools/winedump/msmangle.c
+17
-17
winedump.h
tools/winedump/winedump.h
+1
-1
No files found.
tools/winedump/dump.c
View file @
1bd74051
...
...
@@ -154,7 +154,7 @@ const char* get_symbol_str(const char* symname)
parsed_symbol
symbol
;
symbol_init
(
&
symbol
,
symname
);
if
(
symbol_demangle
(
&
symbol
)
==
-
1
)
if
(
!
symbol_demangle
(
&
symbol
)
)
ret
=
symname
;
else
if
(
symbol
.
flags
&
SYM_DATA
)
{
...
...
tools/winedump/main.c
View file @
1bd74051
...
...
@@ -444,17 +444,14 @@ int main (int argc, char *argv[])
if
(
globals
.
do_code
&&
symbol_searched
(
count
,
symbol
.
symbol
))
{
/* Attempt to get information about the symbol */
int
result
=
symbol_demangle
(
&
symbol
);
BOOL
result
=
symbol_demangle
(
&
symbol
)
||
symbol_search
(
&
symbol
);
if
(
result
)
result
=
!
symbol_search
(
&
symbol
);
if
(
!
result
&&
symbol
.
function_name
)
if
(
result
&&
symbol
.
function_name
)
/* Clean up the prototype */
symbol_clean_string
(
symbol
.
function_name
);
if
(
NORMAL
)
puts
(
result
?
"[Not Found]"
:
"[OK
]"
);
puts
(
result
?
"[OK]"
:
"[Not Found
]"
);
}
else
if
(
NORMAL
)
puts
(
"[Ignoring]"
);
...
...
tools/winedump/msmangle.c
View file @
1bd74051
...
...
@@ -63,7 +63,7 @@ static char *get_pointer_type_string (compound_type *ct,
*
* Demangle a C++ linker symbol into a C prototype
*/
int
symbol_demangle
(
parsed_symbol
*
sym
)
BOOL
symbol_demangle
(
parsed_symbol
*
sym
)
{
compound_type
ct
;
BOOL
is_static
=
FALSE
;
...
...
@@ -83,7 +83,7 @@ int symbol_demangle (parsed_symbol *sym)
/* MS mangled names always begin with '?' */
name
=
sym
->
symbol
;
if
(
*
name
++
!=
'?'
)
return
-
1
;
return
FALSE
;
if
(
VERBOSE
)
puts
(
"Attempting to demangle symbol"
);
...
...
@@ -162,12 +162,12 @@ int symbol_demangle (parsed_symbol *sym)
case
'X'
:
function_name
=
strdup
(
"placement_new_closure"
);
break
;
case
'Y'
:
function_name
=
strdup
(
"placement_delete_closure"
);
break
;
default:
return
-
1
;
return
FALSE
;
}
break
;
default:
/* FIXME: Other operators */
return
-
1
;
return
FALSE
;
}
name
++
;
}
...
...
@@ -177,7 +177,7 @@ int symbol_demangle (parsed_symbol *sym)
function_name
=
name
;
while
(
*
name
&&
*
name
++
!=
'@'
)
;
if
(
!*
name
)
return
-
1
;
return
FALSE
;
function_name
=
str_substring
(
function_name
,
name
-
1
);
}
...
...
@@ -194,7 +194,7 @@ int symbol_demangle (parsed_symbol *sym)
while
(
*
name
&&
*
name
++
!=
'@'
)
;
if
(
*
name
++
!=
'@'
)
{
free
(
function_name
);
return
-
1
;
return
FALSE
;
}
class_name
=
str_substring
(
class_name
,
name
-
2
);
/* Allocates a new string */
}
...
...
@@ -220,7 +220,7 @@ int symbol_demangle (parsed_symbol *sym)
printf
(
"/*FIXME: %s: unknown data*/
\n
"
,
sym
->
symbol
);
free
(
function_name
);
free
(
class_name
);
return
-
1
;
return
FALSE
;
}
sym
->
flags
|=
SYM_DATA
;
sym
->
argc
=
1
;
...
...
@@ -230,7 +230,7 @@ int symbol_demangle (parsed_symbol *sym)
FREE_CT
(
ct
);
free
(
function_name
);
free
(
class_name
);
return
0
;
return
TRUE
;
case
'6'
:
/* compiler generated static */
case
'7'
:
/* compiler generated static */
...
...
@@ -246,11 +246,11 @@ int symbol_demangle (parsed_symbol *sym)
puts
(
"Demangled symbol OK [vtable]"
);
free
(
function_name
);
free
(
class_name
);
return
0
;
return
TRUE
;
}
free
(
function_name
);
free
(
class_name
);
return
-
1
;
return
FALSE
;
/* Functions */
...
...
@@ -295,7 +295,7 @@ int symbol_demangle (parsed_symbol *sym)
default:
free
(
function_name
);
free
(
class_name
);
return
-
1
;
return
FALSE
;
}
/* If there is an implicit this pointer, const status follows */
...
...
@@ -310,7 +310,7 @@ int symbol_demangle (parsed_symbol *sym)
default:
free
(
function_name
);
free
(
class_name
);
return
-
1
;
return
FALSE
;
}
}
...
...
@@ -342,7 +342,7 @@ int symbol_demangle (parsed_symbol *sym)
default:
free
(
function_name
);
free
(
class_name
);
return
-
1
;
return
FALSE
;
}
/* Return type, or @ if 'void' */
...
...
@@ -358,7 +358,7 @@ int symbol_demangle (parsed_symbol *sym)
if
(
!
demangle_datatype
(
&
name
,
&
ct
,
sym
))
{
free
(
function_name
);
free
(
class_name
);
return
-
1
;
return
FALSE
;
}
sym
->
return_text
=
ct
.
expression
;
sym
->
return_type
=
get_type_constant
(
ct
.
dest_type
,
ct
.
flags
);
...
...
@@ -376,7 +376,7 @@ int symbol_demangle (parsed_symbol *sym)
if
(
!
demangle_datatype
(
&
name
,
&
ct
,
sym
))
{
free
(
function_name
);
free
(
class_name
);
return
-
1
;
return
FALSE
;
}
if
(
strcmp
(
ct
.
expression
,
"void"
))
...
...
@@ -405,7 +405,7 @@ int symbol_demangle (parsed_symbol *sym)
if
(
*
name
!=
'Z'
)
{
free
(
function_name
);
free
(
class_name
);
return
-
1
;
return
FALSE
;
}
/* Note: '()' after 'Z' means 'throws', but we don't care here */
...
...
@@ -433,7 +433,7 @@ int symbol_demangle (parsed_symbol *sym)
if
(
VERBOSE
)
puts
(
"Demangled symbol OK"
);
return
0
;
return
TRUE
;
}
...
...
tools/winedump/winedump.h
View file @
1bd74051
...
...
@@ -164,7 +164,7 @@ BOOL dll_next_symbol (parsed_symbol * sym);
/* Symbol functions */
void
symbol_init
(
parsed_symbol
*
symbol
,
const
char
*
name
);
int
symbol_demangle
(
parsed_symbol
*
symbol
);
BOOL
symbol_demangle
(
parsed_symbol
*
symbol
);
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