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
1d9c8846
Commit
1d9c8846
authored
Aug 21, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Aug 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Display function attributes in function/methods codeview records.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b5b20310
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
11 deletions
+31
-11
mscvpdb.h
include/wine/mscvpdb.h
+4
-4
msc.c
tools/winedump/msc.c
+27
-7
No files found.
include/wine/mscvpdb.h
View file @
1d9c8846
...
...
@@ -309,7 +309,7 @@ union codeview_type
short
int
id
;
unsigned
short
int
rvtype
;
unsigned
char
call
;
unsigned
char
reserved
;
unsigned
char
funcattr
;
unsigned
short
int
params
;
unsigned
short
int
arglist
;
}
procedure_v1
;
...
...
@@ -320,7 +320,7 @@ union codeview_type
short
int
id
;
unsigned
int
rvtype
;
unsigned
char
call
;
unsigned
char
reserved
;
unsigned
char
funcattr
;
unsigned
short
int
params
;
unsigned
int
arglist
;
}
procedure_v2
;
...
...
@@ -333,7 +333,7 @@ union codeview_type
unsigned
short
int
class_type
;
unsigned
short
int
this_type
;
unsigned
char
call
;
unsigned
char
reserved
;
unsigned
char
funcattr
;
unsigned
short
int
params
;
unsigned
short
int
arglist
;
unsigned
int
this_adjust
;
...
...
@@ -347,7 +347,7 @@ union codeview_type
unsigned
int
class_type
;
unsigned
this_type
;
unsigned
char
call
;
unsigned
char
reserved
;
unsigned
char
funcattr
;
unsigned
short
params
;
unsigned
int
arglist
;
unsigned
int
this_adjust
;
...
...
tools/winedump/msc.c
View file @
1d9c8846
...
...
@@ -265,6 +265,25 @@ static const char* get_property(unsigned prop)
return
tmp
;
}
static
const
char
*
get_funcattr
(
unsigned
attr
)
{
static
char
tmp
[
1024
];
unsigned
pos
=
0
;
if
(
!
attr
)
return
"none"
;
#define X(s) {if (pos) tmp[pos++] = ';'; strcpy(tmp + pos, s); pos += strlen(s);}
if
(
attr
&
0x0001
)
X
(
"C++ReturnUDT"
);
if
(
attr
&
0x0002
)
X
(
"Ctor"
);
if
(
attr
&
0x0004
)
X
(
"Ctor-w/virtualbase"
);
if
(
attr
&
0xfff8
)
pos
+=
sprintf
(
tmp
,
"unk:%x"
,
attr
&
0xfff8
);
#undef X
tmp
[
pos
]
=
'\0'
;
assert
(
pos
<
sizeof
(
tmp
));
return
tmp
;
}
static
const
char
*
get_machine
(
unsigned
m
)
{
const
char
*
machine
;
...
...
@@ -865,27 +884,28 @@ static void codeview_dump_one_type(unsigned curr_type, const union codeview_type
case
LF_PROCEDURE_V1
:
/* FIXME: unknown could be the calling convention for the proc */
printf
(
"
\t
%x => Procedure V1 ret_type:%x call:%x (#%u args_type:%x)
\n
"
,
printf
(
"
\t
%x => Procedure V1 ret_type:%x call:%x
attr:%s
(#%u args_type:%x)
\n
"
,
curr_type
,
type
->
procedure_v1
.
rvtype
,
type
->
procedure_v1
.
call
,
type
->
procedure_v1
.
params
,
type
->
procedure_v1
.
arglist
);
type
->
procedure_v1
.
call
,
get_funcattr
(
type
->
procedure_v1
.
funcattr
)
,
type
->
procedure_v1
.
params
,
type
->
procedure_v1
.
arglist
);
break
;
case
LF_PROCEDURE_V2
:
printf
(
"
\t
%x => Procedure V2 ret_type:%x unk:%x (#%u args_type:%x)
\n
"
,
printf
(
"
\t
%x => Procedure V2 ret_type:%x unk:%x
attr:%s
(#%u args_type:%x)
\n
"
,
curr_type
,
type
->
procedure_v2
.
rvtype
,
type
->
procedure_v2
.
call
,
type
->
procedure_v2
.
params
,
type
->
procedure_v2
.
arglist
);
type
->
procedure_v2
.
call
,
get_funcattr
(
type
->
procedure_v2
.
funcattr
)
,
type
->
procedure_v2
.
params
,
type
->
procedure_v2
.
arglist
);
break
;
case
LF_MFUNCTION_V2
:
printf
(
"
\t
%x => MFunction V2 ret-type:%x call:%x class-type:%x this-type:%x
\n
"
printf
(
"
\t
%x => MFunction V2 ret-type:%x call:%x class-type:%x this-type:%x
attr:%s
\n
"
"
\t\t
#args:%x args-type:%x this_adjust:%x
\n
"
,
curr_type
,
type
->
mfunction_v2
.
rvtype
,
type
->
mfunction_v2
.
call
,
type
->
mfunction_v2
.
class_type
,
type
->
mfunction_v2
.
this_type
,
get_funcattr
(
type
->
mfunction_v2
.
funcattr
),
type
->
mfunction_v2
.
params
,
type
->
mfunction_v2
.
arglist
,
type
->
mfunction_v2
.
this_adjust
);
...
...
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