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
5f23b94a
Commit
5f23b94a
authored
Apr 06, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Apr 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Allow using 8-byte long hardware assisted breakpoints on x86_64 CPUs.
parent
23671868
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
be_x86_64.c
programs/winedbg/be_x86_64.c
+3
-1
break.c
programs/winedbg/break.c
+6
-5
debugger.h
programs/winedbg/debugger.h
+1
-1
No files found.
programs/winedbg/be_x86_64.c
View file @
5f23b94a
...
...
@@ -355,6 +355,7 @@ extern void be_x86_64_disasm_one_insn(ADDRESS64* addr, int display);
#define DR7_LEN_1 (0x0)
#define DR7_LEN_2 (0x4)
#define DR7_LEN_4 (0xC)
#define DR7_LEN_8 (0x8)
#define DR7_LOCAL_ENABLE_SHIFT 0
#define DR7_GLOBAL_ENABLE_SHIFT 1
...
...
@@ -429,10 +430,11 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process
*
pr
=
(
DWORD64
)
addr
;
if
(
type
!=
be_xpoint_watch_exec
)
switch
(
size
)
{
case
8
:
bits
|=
DR7_LEN_8
;
break
;
case
4
:
bits
|=
DR7_LEN_4
;
break
;
case
2
:
bits
|=
DR7_LEN_2
;
break
;
case
1
:
bits
|=
DR7_LEN_1
;
break
;
default:
return
0
;
default:
WINE_FIXME
(
"Unsupported xpoint_watch of size %d
\n
"
,
size
);
return
0
;
}
*
val
=
reg
;
/* clear old values */
...
...
programs/winedbg/break.c
View file @
5f23b94a
...
...
@@ -137,7 +137,7 @@ static int init_xpoint(int type, const ADDRESS64* addr)
*
* Returns the value watched by watch point 'num'.
*/
static
BOOL
get_watched_value
(
int
num
,
LPDWORD
val
)
static
BOOL
get_watched_value
(
int
num
,
DWORD64
*
val
)
{
BYTE
buf
[
4
];
...
...
@@ -147,6 +147,7 @@ static BOOL get_watched_value(int num, LPDWORD val)
switch
(
dbg_curr_process
->
bp
[
num
].
w
.
len
+
1
)
{
case
8
:
*
val
=
*
(
DWORD64
*
)
buf
;
break
;
case
4
:
*
val
=
*
(
DWORD
*
)
buf
;
break
;
case
2
:
*
val
=
*
(
WORD
*
)
buf
;
break
;
case
1
:
*
val
=
*
(
BYTE
*
)
buf
;
break
;
...
...
@@ -554,7 +555,7 @@ static int find_triggered_watch(void)
*/
for
(
i
=
0
;
i
<
dbg_curr_process
->
next_bp
;
i
++
)
{
DWORD
val
=
0
;
DWORD
64
val
=
0
;
if
(
bp
[
i
].
refcount
&&
bp
[
i
].
enabled
&&
!
is_xpoint_break
(
i
)
&&
(
be_cpu
->
is_watchpoint_set
(
&
dbg_context
,
bp
[
i
].
info
)))
...
...
@@ -577,7 +578,7 @@ static int find_triggered_watch(void)
*/
for
(
i
=
0
;
i
<
dbg_curr_process
->
next_bp
;
i
++
)
{
DWORD
val
=
0
;
DWORD
64
val
=
0
;
if
(
bp
[
i
].
refcount
&&
bp
[
i
].
enabled
&&
!
is_xpoint_break
(
i
)
&&
get_watched_value
(
i
,
&
val
))
...
...
@@ -740,8 +741,8 @@ BOOL break_should_continue(ADDRESS64* addr, DWORD code)
case
be_xpoint_watch_write
:
dbg_printf
(
"Stopped on watchpoint %d at "
,
dbg_curr_thread
->
stopped_xpoint
);
print_address
(
addr
,
TRUE
);
dbg_printf
(
" new value %
u
\n
"
,
dbg_curr_process
->
bp
[
dbg_curr_thread
->
stopped_xpoint
].
w
.
oldval
);
dbg_printf
(
" new value %
s
\n
"
,
wine_dbgstr_longlong
(
dbg_curr_process
->
bp
[
dbg_curr_thread
->
stopped_xpoint
].
w
.
oldval
)
);
}
return
FALSE
;
}
...
...
programs/winedbg/debugger.h
View file @
5f23b94a
...
...
@@ -139,7 +139,7 @@ struct dbg_breakpoint
struct
/* only used for watchpoints */
{
BYTE
len
:
2
;
DWORD
oldval
;
DWORD
64
oldval
;
}
w
;
struct
expr
*
condition
;
};
...
...
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