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
b26ae69f
Commit
b26ae69f
authored
May 01, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Fix formatting of the flag register bits.
parent
880d00fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
46 deletions
+15
-46
be_i386.c
programs/winedbg/be_i386.c
+7
-23
be_x86_64.c
programs/winedbg/be_x86_64.c
+8
-23
No files found.
programs/winedbg/be_i386.c
View file @
b26ae69f
...
...
@@ -197,8 +197,9 @@ static void be_i386_all_print_context(HANDLE hThread, const CONTEXT* ctx)
static
void
be_i386_print_context
(
HANDLE
hThread
,
const
CONTEXT
*
ctx
,
int
all_regs
)
{
static
const
char
flags
[]
=
"aVR-N--ODITSZ-A-P-C"
;
int
i
;
char
buf
[
33
];
char
*
pt
;
dbg_printf
(
"Register dump:
\n
"
);
...
...
@@ -208,28 +209,11 @@ static void be_i386_print_context(HANDLE hThread, const CONTEXT* ctx, int all_re
(
WORD
)
ctx
->
SegDs
,
(
WORD
)
ctx
->
SegEs
,
(
WORD
)
ctx
->
SegFs
,
(
WORD
)
ctx
->
SegGs
);
strcpy
(
buf
,
" - 00 - - - "
);
pt
=
buf
+
strlen
(
buf
)
-
1
;
if
(
ctx
->
EFlags
&
0x00000001
)
*
pt
--
=
'C'
;
/* Carry Flag */
if
(
ctx
->
EFlags
&
0x00000002
)
*
pt
--
=
'1'
;
if
(
ctx
->
EFlags
&
0x00000004
)
*
pt
--
=
'P'
;
/* Parity Flag */
if
(
ctx
->
EFlags
&
0x00000008
)
*
pt
--
=
'-'
;
if
(
ctx
->
EFlags
&
0x00000010
)
*
pt
--
=
'A'
;
/* Auxiliary Carry Flag */
if
(
ctx
->
EFlags
&
0x00000020
)
*
pt
--
=
'-'
;
if
(
ctx
->
EFlags
&
0x00000040
)
*
pt
--
=
'Z'
;
/* Zero Flag */
if
(
ctx
->
EFlags
&
0x00000080
)
*
pt
--
=
'S'
;
/* Sign Flag */
if
(
ctx
->
EFlags
&
0x00000100
)
*
pt
--
=
'T'
;
/* Trap/Trace Flag */
if
(
ctx
->
EFlags
&
0x00000200
)
*
pt
--
=
'I'
;
/* Interrupt Enable Flag */
if
(
ctx
->
EFlags
&
0x00000400
)
*
pt
--
=
'D'
;
/* Direction Indicator */
if
(
ctx
->
EFlags
&
0x00000800
)
*
pt
--
=
'O'
;
/* Overflow flags */
if
(
ctx
->
EFlags
&
0x00001000
)
*
pt
--
=
'1'
;
/* I/O Privilege Level */
if
(
ctx
->
EFlags
&
0x00002000
)
*
pt
--
=
'1'
;
/* I/O Privilege Level */
if
(
ctx
->
EFlags
&
0x00004000
)
*
pt
--
=
'N'
;
/* Nested Task Flag */
if
(
ctx
->
EFlags
&
0x00008000
)
*
pt
--
=
'-'
;
if
(
ctx
->
EFlags
&
0x00010000
)
*
pt
--
=
'R'
;
/* Resume Flag */
if
(
ctx
->
EFlags
&
0x00020000
)
*
pt
--
=
'V'
;
/* Virtual Mode Flag */
if
(
ctx
->
EFlags
&
0x00040000
)
*
pt
--
=
'a'
;
/* Alignment Check Flag */
strcpy
(
buf
,
flags
);
for
(
i
=
0
;
buf
[
i
];
i
++
)
if
(
buf
[
i
]
!=
'-'
&&
!
(
ctx
->
EFlags
&
(
1
<<
(
sizeof
(
flags
)
-
2
-
i
))))
buf
[
i
]
=
' '
;
switch
(
get_selector_type
(
hThread
,
ctx
,
ctx
->
SegCs
))
{
case
AddrMode1616
:
...
...
programs/winedbg/be_x86_64.c
View file @
b26ae69f
...
...
@@ -66,31 +66,16 @@ static void be_x86_64_single_step(CONTEXT* ctx, unsigned enable)
static
void
be_x86_64_print_context
(
HANDLE
hThread
,
const
CONTEXT
*
ctx
,
int
all_regs
)
{
char
*
pt
,
buf
[
33
];
static
const
char
flags
[]
=
"aVR-N--ODITSZ-A-P-C"
;
char
buf
[
33
];
int
i
;
dbg_printf
(
"Register dump:
\n
"
);
strcpy
(
buf
,
" - 00 - - - "
);
pt
=
buf
+
strlen
(
buf
)
-
1
;
if
(
ctx
->
EFlags
&
0x00000001
)
*
pt
--
=
'C'
;
/* Carry Flag */
if
(
ctx
->
EFlags
&
0x00000002
)
*
pt
--
=
'1'
;
if
(
ctx
->
EFlags
&
0x00000004
)
*
pt
--
=
'P'
;
/* Parity Flag */
if
(
ctx
->
EFlags
&
0x00000008
)
*
pt
--
=
'-'
;
if
(
ctx
->
EFlags
&
0x00000010
)
*
pt
--
=
'A'
;
/* Auxiliary Carry Flag */
if
(
ctx
->
EFlags
&
0x00000020
)
*
pt
--
=
'-'
;
if
(
ctx
->
EFlags
&
0x00000040
)
*
pt
--
=
'Z'
;
/* Zero Flag */
if
(
ctx
->
EFlags
&
0x00000080
)
*
pt
--
=
'S'
;
/* Sign Flag */
if
(
ctx
->
EFlags
&
0x00000100
)
*
pt
--
=
'T'
;
/* Trap/Trace Flag */
if
(
ctx
->
EFlags
&
0x00000200
)
*
pt
--
=
'I'
;
/* Interrupt Enable Flag */
if
(
ctx
->
EFlags
&
0x00000400
)
*
pt
--
=
'D'
;
/* Direction Indicator */
if
(
ctx
->
EFlags
&
0x00000800
)
*
pt
--
=
'O'
;
/* Overflow flags */
if
(
ctx
->
EFlags
&
0x00001000
)
*
pt
--
=
'1'
;
/* I/O Privilege Level */
if
(
ctx
->
EFlags
&
0x00002000
)
*
pt
--
=
'1'
;
/* I/O Privilege Level */
if
(
ctx
->
EFlags
&
0x00004000
)
*
pt
--
=
'N'
;
/* Nested Task Flag */
if
(
ctx
->
EFlags
&
0x00008000
)
*
pt
--
=
'-'
;
if
(
ctx
->
EFlags
&
0x00010000
)
*
pt
--
=
'R'
;
/* Resume Flag */
if
(
ctx
->
EFlags
&
0x00020000
)
*
pt
--
=
'V'
;
/* Virtual Mode Flag */
if
(
ctx
->
EFlags
&
0x00040000
)
*
pt
--
=
'a'
;
/* Alignment Check Flag */
strcpy
(
buf
,
flags
);
for
(
i
=
0
;
buf
[
i
];
i
++
)
if
(
buf
[
i
]
!=
'-'
&&
!
(
ctx
->
EFlags
&
(
1
<<
(
sizeof
(
flags
)
-
2
-
i
))))
buf
[
i
]
=
' '
;
dbg_printf
(
"Register dump:
\n
"
);
dbg_printf
(
" rip:%016lx rsp:%016lx rbp:%016lx eflags:%08x (%s)
\n
"
,
ctx
->
Rip
,
ctx
->
Rsp
,
ctx
->
Rbp
,
ctx
->
EFlags
,
buf
);
dbg_printf
(
" rax:%016lx rbx:%016lx rcx:%016lx rdx:%016lx
\n
"
,
...
...
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