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
4cc0bf28
Commit
4cc0bf28
authored
Oct 03, 2005
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 03, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bitfield extraction.
parent
e577a2a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
types.c
programs/winedbg/types.c
+12
-10
No files found.
programs/winedbg/types.c
View file @
4cc0bf28
...
@@ -150,18 +150,21 @@ static BOOL types_get_udt_element_lvalue(struct dbg_lvalue* lvalue,
...
@@ -150,18 +150,21 @@ static BOOL types_get_udt_element_lvalue(struct dbg_lvalue* lvalue,
types_get_info
(
type
,
TI_GET_TYPE
,
&
lvalue
->
type
.
id
);
types_get_info
(
type
,
TI_GET_TYPE
,
&
lvalue
->
type
.
id
);
lvalue
->
type
.
module
=
type
->
module
;
lvalue
->
type
.
module
=
type
->
module
;
types_get_info
(
type
,
TI_GET_OFFSET
,
&
offset
);
if
(
!
types_get_info
(
type
,
TI_GET_OFFSET
,
&
offset
))
return
FALSE
;
lvalue
->
addr
.
Offset
+=
offset
;
if
(
types_get_info
(
type
,
TI_GET_BITPOSITION
,
&
bitoffset
))
if
(
types_get_info
(
type
,
TI_GET_BITPOSITION
,
&
bitoffset
))
{
{
if
(
!
types_get_info
(
type
,
TI_GET_LENGTH
,
&
length
)
||
types_get_info
(
type
,
TI_GET_LENGTH
,
&
length
);
length
>
sizeof
(
*
tmpbuf
))
/* FIXME: this test isn't sufficient, depending on start of bitfield
return
FALSE
;
* (ie a 32 bit field can spread across 5 bytes)
*/
if
(
length
>
8
*
sizeof
(
*
tmpbuf
))
return
FALSE
;
lvalue
->
addr
.
Offset
+=
bitoffset
>>
3
;
/*
/*
* Bitfield operation. We have to extract the field and store
* Bitfield operation. We have to extract the field and store
* it in a temporary buffer so that we get it all right.
* it in a temporary buffer so that we get it all right.
*/
*/
lvalue
->
addr
.
Offset
+=
offset
;
if
(
!
memory_read_value
(
lvalue
,
sizeof
(
*
tmpbuf
),
tmpbuf
))
return
FALSE
;
if
(
!
memory_read_value
(
lvalue
,
sizeof
(
*
tmpbuf
),
tmpbuf
))
return
FALSE
;
mask
=
0xffffffff
<<
length
;
mask
=
0xffffffff
<<
length
;
*
tmpbuf
>>=
bitoffset
&
7
;
*
tmpbuf
>>=
bitoffset
&
7
;
...
@@ -180,14 +183,13 @@ static BOOL types_get_udt_element_lvalue(struct dbg_lvalue* lvalue,
...
@@ -180,14 +183,13 @@ static BOOL types_get_udt_element_lvalue(struct dbg_lvalue* lvalue,
{
{
*
tmpbuf
|=
mask
;
*
tmpbuf
|=
mask
;
}
}
return
TRUE
;
}
}
if
(
types_get_info
(
type
,
TI_GET_OFFSET
,
&
offset
))
else
{
{
lvalue
->
addr
.
Offset
+=
offset
;
if
(
!
memory_read_value
(
lvalue
,
sizeof
(
*
tmpbuf
),
tmpbuf
))
return
FALSE
;
return
TRUE
;
}
}
return
FALS
E
;
return
TRU
E
;
}
}
/******************************************************************
/******************************************************************
...
...
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