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
58d5b3c8
Commit
58d5b3c8
authored
Oct 13, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use proper macros for VARIANT.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
768bb93f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
59 deletions
+58
-59
dwarf.c
dlls/dbghelp/dwarf.c
+16
-16
msc.c
dlls/dbghelp/msc.c
+28
-29
symbol.c
dlls/dbghelp/symbol.c
+10
-10
type.c
dlls/dbghelp/type.c
+4
-4
No files found.
dlls/dbghelp/dwarf.c
View file @
58d5b3c8
...
...
@@ -1888,19 +1888,19 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm,
case
DW_FORM_data4
:
case
DW_FORM_udata
:
case
DW_FORM_addr
:
v
.
n1
.
n2
.
vt
=
VT_UI4
;
v
.
n1
.
n2
.
n3
.
lVal
=
value
.
u
.
uvalue
;
V_VT
(
&
v
)
=
VT_UI4
;
V_UI4
(
&
v
)
=
value
.
u
.
uvalue
;
break
;
case
DW_FORM_data8
:
case
DW_FORM_sec_offset
:
v
.
n1
.
n2
.
vt
=
VT_UI8
;
v
.
n1
.
n2
.
n3
.
llVal
=
value
.
u
.
lluvalue
;
V_VT
(
&
v
)
=
VT_UI8
;
V_UI8
(
&
v
)
=
value
.
u
.
lluvalue
;
break
;
case
DW_FORM_sdata
:
v
.
n1
.
n2
.
vt
=
VT_I4
;
v
.
n1
.
n2
.
n3
.
lVal
=
value
.
u
.
svalue
;
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
value
.
u
.
svalue
;
break
;
case
DW_FORM_strp
:
...
...
@@ -1908,8 +1908,8 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm,
/* FIXME: native doesn't report const strings from here !!
* however, the value of the string is in the code somewhere
*/
v
.
n1
.
n2
.
vt
=
VT_I1
|
VT_BYREF
;
v
.
n1
.
n2
.
n3
.
byref
=
pool_strdup
(
&
subpgm
->
ctx
->
module_ctx
->
module
->
pool
,
value
.
u
.
string
);
V_VT
(
&
v
)
=
VT_BYREF
;
V_BYREF
(
&
v
)
=
pool_strdup
(
&
subpgm
->
ctx
->
module_ctx
->
module
->
pool
,
value
.
u
.
string
);
break
;
case
DW_FORM_block
:
...
...
@@ -1917,23 +1917,23 @@ static void dwarf2_parse_variable(dwarf2_subprogram_t* subpgm,
case
DW_FORM_block2
:
case
DW_FORM_block4
:
case
DW_FORM_exprloc
:
v
.
n1
.
n2
.
vt
=
VT_I4
;
V_VT
(
&
v
)
=
VT_I4
;
switch
(
value
.
u
.
block
.
size
)
{
case
1
:
v
.
n1
.
n2
.
n3
.
lVal
=
*
(
BYTE
*
)
value
.
u
.
block
.
ptr
;
break
;
case
2
:
v
.
n1
.
n2
.
n3
.
lVal
=
*
(
USHORT
*
)
value
.
u
.
block
.
ptr
;
break
;
case
4
:
v
.
n1
.
n2
.
n3
.
lVal
=
*
(
DWORD
*
)
value
.
u
.
block
.
ptr
;
break
;
case
1
:
V_I4
(
&
v
)
=
*
(
BYTE
*
)
value
.
u
.
block
.
ptr
;
break
;
case
2
:
V_I4
(
&
v
)
=
*
(
USHORT
*
)
value
.
u
.
block
.
ptr
;
break
;
case
4
:
V_I4
(
&
v
)
=
*
(
DWORD
*
)
value
.
u
.
block
.
ptr
;
break
;
default:
v
.
n1
.
n2
.
vt
=
VT_I1
|
VT_BYREF
;
v
.
n1
.
n2
.
n3
.
byref
=
pool_alloc
(
&
subpgm
->
ctx
->
module_ctx
->
module
->
pool
,
value
.
u
.
block
.
size
);
memcpy
(
v
.
n1
.
n2
.
n3
.
byref
,
value
.
u
.
block
.
ptr
,
value
.
u
.
block
.
size
);
V_VT
(
&
v
)
=
VT_BYREF
;
V_BYREF
(
&
v
)
=
pool_alloc
(
&
subpgm
->
ctx
->
module_ctx
->
module
->
pool
,
value
.
u
.
block
.
size
);
memcpy
(
V_BYREF
(
&
v
)
,
value
.
u
.
block
.
ptr
,
value
.
u
.
block
.
size
);
}
break
;
default:
FIXME
(
"Unsupported form for const value %s (%lx)
\n
"
,
debugstr_a
(
name
.
u
.
string
),
value
.
form
);
v
.
n1
.
n2
.
vt
=
VT_EMPTY
;
V_VT
(
&
v
)
=
VT_EMPTY
;
}
if
(
subpgm
->
func
)
{
...
...
dlls/dbghelp/msc.c
View file @
58d5b3c8
...
...
@@ -263,8 +263,8 @@ static int leaf_as_variant(VARIANT* v, const unsigned short int* leaf)
if
(
type
<
LF_NUMERIC
)
{
v
->
n1
.
n2
.
vt
=
VT_UINT
;
v
->
n1
.
n2
.
n3
.
uintVal
=
type
;
V_VT
(
v
)
=
VT_UINT
;
V_UINT
(
v
)
=
type
;
}
else
{
...
...
@@ -272,109 +272,108 @@ static int leaf_as_variant(VARIANT* v, const unsigned short int* leaf)
{
case
LF_CHAR
:
length
+=
1
;
v
->
n1
.
n2
.
vt
=
VT_I1
;
v
->
n1
.
n2
.
n3
.
cVal
=
*
(
const
char
*
)
leaf
;
V_VT
(
v
)
=
VT_I1
;
V_I1
(
v
)
=
*
(
const
char
*
)
leaf
;
break
;
case
LF_SHORT
:
length
+=
2
;
v
->
n1
.
n2
.
vt
=
VT_I2
;
v
->
n1
.
n2
.
n3
.
iVal
=
*
(
const
short
*
)
leaf
;
V_VT
(
v
)
=
VT_I2
;
V_I2
(
v
)
=
*
(
const
short
*
)
leaf
;
break
;
case
LF_USHORT
:
length
+=
2
;
v
->
n1
.
n2
.
vt
=
VT_UI2
;
v
->
n1
.
n2
.
n3
.
uiVal
=
*
leaf
;
V_VT
(
v
)
=
VT_UI2
;
V_UI2
(
v
)
=
*
leaf
;
break
;
case
LF_LONG
:
length
+=
4
;
v
->
n1
.
n2
.
vt
=
VT_I4
;
v
->
n1
.
n2
.
n3
.
lVal
=
*
(
const
int
*
)
leaf
;
V_VT
(
v
)
=
VT_I4
;
V_I4
(
v
)
=
*
(
const
int
*
)
leaf
;
break
;
case
LF_ULONG
:
length
+=
4
;
v
->
n1
.
n2
.
vt
=
VT_UI4
;
v
->
n1
.
n2
.
n3
.
uiVal
=
*
(
const
unsigned
int
*
)
leaf
;
V_VT
(
v
)
=
VT_UI4
;
V_UI4
(
v
)
=
*
(
const
unsigned
int
*
)
leaf
;
break
;
case
LF_QUADWORD
:
length
+=
8
;
v
->
n1
.
n2
.
vt
=
VT_I8
;
v
->
n1
.
n2
.
n3
.
llVal
=
*
(
const
long
long
int
*
)
leaf
;
V_VT
(
v
)
=
VT_I8
;
V_I8
(
v
)
=
*
(
const
long
long
int
*
)
leaf
;
break
;
case
LF_UQUADWORD
:
length
+=
8
;
v
->
n1
.
n2
.
vt
=
VT_UI8
;
v
->
n1
.
n2
.
n3
.
ullVal
=
*
(
const
long
long
unsigned
int
*
)
leaf
;
V_VT
(
v
)
=
VT_UI8
;
V_UI8
(
v
)
=
*
(
const
long
long
unsigned
int
*
)
leaf
;
break
;
case
LF_REAL32
:
length
+=
4
;
v
->
n1
.
n2
.
vt
=
VT_R4
;
v
->
n1
.
n2
.
n3
.
fltVal
=
*
(
const
float
*
)
leaf
;
V_VT
(
v
)
=
VT_R4
;
V_R4
(
v
)
=
*
(
const
float
*
)
leaf
;
break
;
case
LF_REAL48
:
FIXME
(
"Unsupported numeric leaf type %04x
\n
"
,
type
);
length
+=
6
;
v
->
n1
.
n2
.
vt
=
VT_EMPTY
;
/* FIXME */
V_VT
(
v
)
=
VT_EMPTY
;
/* FIXME */
break
;
case
LF_REAL64
:
length
+=
8
;
v
->
n1
.
n2
.
vt
=
VT_R8
;
v
->
n1
.
n2
.
n3
.
fltVal
=
*
(
const
double
*
)
leaf
;
V_VT
(
v
)
=
VT_R8
;
V_R8
(
v
)
=
*
(
const
double
*
)
leaf
;
break
;
case
LF_REAL80
:
FIXME
(
"Unsupported numeric leaf type %04x
\n
"
,
type
);
length
+=
10
;
v
->
n1
.
n2
.
vt
=
VT_EMPTY
;
/* FIXME */
V_VT
(
v
)
=
VT_EMPTY
;
/* FIXME */
break
;
case
LF_REAL128
:
FIXME
(
"Unsupported numeric leaf type %04x
\n
"
,
type
);
length
+=
16
;
v
->
n1
.
n2
.
vt
=
VT_EMPTY
;
/* FIXME */
V_VT
(
v
)
=
VT_EMPTY
;
/* FIXME */
break
;
case
LF_COMPLEX32
:
FIXME
(
"Unsupported numeric leaf type %04x
\n
"
,
type
);
length
+=
4
;
v
->
n1
.
n2
.
vt
=
VT_EMPTY
;
/* FIXME */
V_VT
(
v
)
=
VT_EMPTY
;
/* FIXME */
break
;
case
LF_COMPLEX64
:
FIXME
(
"Unsupported numeric leaf type %04x
\n
"
,
type
);
length
+=
8
;
v
->
n1
.
n2
.
vt
=
VT_EMPTY
;
/* FIXME */
V_VT
(
v
)
=
VT_EMPTY
;
/* FIXME */
break
;
case
LF_COMPLEX80
:
FIXME
(
"Unsupported numeric leaf type %04x
\n
"
,
type
);
length
+=
10
;
v
->
n1
.
n2
.
vt
=
VT_EMPTY
;
/* FIXME */
break
;
case
LF_COMPLEX128
:
FIXME
(
"Unsupported numeric leaf type %04x
\n
"
,
type
);
length
+=
16
;
v
->
n1
.
n2
.
vt
=
VT_EMPTY
;
/* FIXME */
V_VT
(
v
)
=
VT_EMPTY
;
/* FIXME */
break
;
case
LF_VARSTRING
:
FIXME
(
"Unsupported numeric leaf type %04x
\n
"
,
type
);
length
+=
2
+
*
leaf
;
v
->
n1
.
n2
.
vt
=
VT_EMPTY
;
/* FIXME */
V_VT
(
v
)
=
VT_EMPTY
;
/* FIXME */
break
;
default:
FIXME
(
"Unknown numeric leaf type %04x
\n
"
,
type
);
v
->
n1
.
n2
.
vt
=
VT_EMPTY
;
/* FIXME */
V_VT
(
v
)
=
VT_EMPTY
;
/* FIXME */
break
;
}
}
...
...
dlls/dbghelp/symbol.c
View file @
58d5b3c8
...
...
@@ -748,18 +748,18 @@ static void symt_fill_sym_info(struct module_pair* pair,
if
(
data
->
container
&&
(
data
->
container
->
tag
==
SymTagFunction
||
data
->
container
->
tag
==
SymTagBlock
))
sym_info
->
Flags
|=
SYMFLAG_LOCAL
;
switch
(
data
->
u
.
value
.
n1
.
n2
.
vt
)
{
case
VT_I4
:
sym_info
->
Value
=
(
ULONG
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
lVal
;
break
;
case
VT_I2
:
sym_info
->
Value
=
(
ULONG
)(
LONG_PTR
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
iVal
;
break
;
case
VT_I1
:
sym_info
->
Value
=
(
ULONG
)(
LONG_PTR
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
cVal
;
break
;
case
VT_UI4
:
sym_info
->
Value
=
(
ULONG
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
ulVal
;
break
;
case
VT_UI2
:
sym_info
->
Value
=
(
ULONG
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
uiVal
;
break
;
case
VT_UI1
:
sym_info
->
Value
=
(
ULONG
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
bVal
;
break
;
case
VT_
I1
|
VT_BYREF
:
sym_info
->
Value
=
(
ULONG64
)(
DWORD_PTR
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
byref
;
break
;
switch
(
V_VT
(
&
data
->
u
.
value
)
)
{
case
VT_I4
:
sym_info
->
Value
=
(
ULONG
)
V_I4
(
&
data
->
u
.
value
)
;
break
;
case
VT_I2
:
sym_info
->
Value
=
(
ULONG
)(
LONG_PTR
)
V_I2
(
&
data
->
u
.
value
)
;
break
;
case
VT_I1
:
sym_info
->
Value
=
(
ULONG
)(
LONG_PTR
)
V_I1
(
&
data
->
u
.
value
)
;
break
;
case
VT_UI4
:
sym_info
->
Value
=
(
ULONG
)
V_UI4
(
&
data
->
u
.
value
)
;
break
;
case
VT_UI2
:
sym_info
->
Value
=
(
ULONG
)
V_UI2
(
&
data
->
u
.
value
)
;
break
;
case
VT_UI1
:
sym_info
->
Value
=
(
ULONG
)
V_UI1
(
&
data
->
u
.
value
)
;
break
;
case
VT_
BYREF
:
sym_info
->
Value
=
(
ULONG64
)(
DWORD_PTR
)
V_BYREF
(
&
data
->
u
.
value
)
;
break
;
case
VT_EMPTY
:
sym_info
->
Value
=
0
;
break
;
default:
FIXME
(
"Unsupported variant type (%u)
\n
"
,
data
->
u
.
value
.
n1
.
n2
.
vt
);
FIXME
(
"Unsupported variant type (%u)
\n
"
,
V_VT
(
&
data
->
u
.
value
)
);
sym_info
->
Value
=
0
;
break
;
}
...
...
dlls/dbghelp/type.c
View file @
58d5b3c8
...
...
@@ -371,8 +371,8 @@ BOOL symt_add_enum_element(struct module* module, struct symt_enum* enum_type,
e
->
kind
=
DataIsConstant
;
e
->
container
=
&
enum_type
->
symt
;
e
->
type
=
enum_type
->
base_type
;
e
->
u
.
value
.
n1
.
n2
.
vt
=
VT_I4
;
e
->
u
.
value
.
n1
.
n2
.
n3
.
lVal
=
value
;
V_VT
(
&
e
->
u
.
value
)
=
VT_I4
;
V_I4
(
&
e
->
u
.
value
)
=
value
;
p
=
vector_add
(
&
enum_type
->
vchildren
,
&
module
->
pool
);
if
(
!
p
)
return
FALSE
;
/* FIXME we leak e */
...
...
@@ -952,8 +952,8 @@ BOOL symt_get_info(struct module* module, const struct symt* type,
}
}
if
(
loc
.
kind
!=
loc_absolute
)
return
FALSE
;
X
(
VARIANT
).
n1
.
n2
.
vt
=
VT_UI4
;
/* FIXME */
X
(
VARIANT
).
n1
.
n2
.
n3
.
uiVal
=
loc
.
offset
;
V_VT
(
&
X
(
VARIANT
))
=
VT_UI4
;
/* FIXME */
V_UI4
(
&
X
(
VARIANT
))
=
loc
.
offset
;
}
break
;
default:
return
FALSE
;
...
...
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