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
ac857cb3
Commit
ac857cb3
authored
Jul 10, 2006
by
Ge van Geldorp
Committed by
Alexandre Julliard
Jul 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Implement some x86_64 backend routines.
parent
2a8b31d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
21 deletions
+45
-21
be_x86_64.c
programs/winedbg/be_x86_64.c
+43
-19
debugger.h
programs/winedbg/debugger.h
+2
-2
No files found.
programs/winedbg/be_x86_64.c
View file @
ac857cb3
...
@@ -25,16 +25,34 @@
...
@@ -25,16 +25,34 @@
static
unsigned
be_x86_64_get_addr
(
HANDLE
hThread
,
const
CONTEXT
*
ctx
,
static
unsigned
be_x86_64_get_addr
(
HANDLE
hThread
,
const
CONTEXT
*
ctx
,
enum
be_cpu_addr
bca
,
ADDRESS
*
addr
)
enum
be_cpu_addr
bca
,
ADDRESS
*
addr
)
{
{
dbg_printf
(
"not done
\n
"
);
addr
->
Mode
=
AddrModeFlat
;
return
FALSE
;
switch
(
bca
)
{
case
be_cpu_addr_pc
:
addr
->
Segment
=
ctx
->
SegCs
;
addr
->
Offset
=
ctx
->
Rip
;
return
TRUE
;
case
be_cpu_addr_stack
:
addr
->
Segment
=
ctx
->
SegSs
;
addr
->
Offset
=
ctx
->
Rsp
;
return
TRUE
;
case
be_cpu_addr_frame
:
addr
->
Segment
=
ctx
->
SegSs
;
addr
->
Offset
=
ctx
->
Rbp
;
return
TRUE
;
default:
addr
->
Mode
=
-
1
;
return
FALSE
;
}
}
}
static
void
be_x86_64_single_step
(
CONTEXT
*
ctx
,
unsigned
enable
)
static
void
be_x86_64_single_step
(
CONTEXT
*
ctx
,
unsigned
enable
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
single_step
\n
"
);
}
}
static
void
be_x86_64_print_context
(
HANDLE
hThread
,
const
CONTEXT
*
ctx
)
static
void
be_x86_64_print_context
(
HANDLE
hThread
,
const
CONTEXT
*
ctx
,
int
all_regs
)
{
{
dbg_printf
(
"Context printing for x86_64 not done yet
\n
"
);
dbg_printf
(
"Context printing for x86_64 not done yet
\n
"
);
}
}
...
@@ -106,26 +124,27 @@ static const struct dbg_internal_var* be_x86_64_init_registers(CONTEXT* ctx)
...
@@ -106,26 +124,27 @@ static const struct dbg_internal_var* be_x86_64_init_registers(CONTEXT* ctx)
return
be_x86_64_ctx
;
return
be_x86_64_ctx
;
}
}
static
unsigned
be_x86_64_is_step_over_insn
(
void
*
insn
)
static
unsigned
be_x86_64_is_step_over_insn
(
const
void
*
insn
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
step_over_insn
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
static
unsigned
be_x86_64_is_function_return
(
void
*
insn
)
static
unsigned
be_x86_64_is_function_return
(
const
void
*
insn
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
is_function_return
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
static
unsigned
be_x86_64_is_break_insn
(
void
*
insn
)
static
unsigned
be_x86_64_is_break_insn
(
const
void
*
insn
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
is_break_insn
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
static
unsigned
be_x86_64_is_func_call
(
void
*
insn
,
void
**
insn_
callee
)
static
unsigned
be_x86_64_is_func_call
(
const
void
*
insn
,
ADDRESS
*
callee
)
{
{
dbg_printf
(
"not done is_func_call
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -138,7 +157,7 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process
...
@@ -138,7 +157,7 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process
CONTEXT
*
ctx
,
enum
be_xpoint_type
type
,
CONTEXT
*
ctx
,
enum
be_xpoint_type
type
,
void
*
addr
,
unsigned
long
*
val
,
unsigned
size
)
void
*
addr
,
unsigned
long
*
val
,
unsigned
size
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
insert_Xpoint
\n
"
);
return
0
;
return
0
;
}
}
...
@@ -146,38 +165,43 @@ static unsigned be_x86_64_remove_Xpoint(HANDLE hProcess, const struct be_process
...
@@ -146,38 +165,43 @@ static unsigned be_x86_64_remove_Xpoint(HANDLE hProcess, const struct be_process
CONTEXT
*
ctx
,
enum
be_xpoint_type
type
,
CONTEXT
*
ctx
,
enum
be_xpoint_type
type
,
void
*
addr
,
unsigned
long
val
,
unsigned
size
)
void
*
addr
,
unsigned
long
val
,
unsigned
size
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
remove_Xpoint
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
static
unsigned
be_x86_64_is_watchpoint_set
(
const
CONTEXT
*
ctx
,
unsigned
idx
)
static
unsigned
be_x86_64_is_watchpoint_set
(
const
CONTEXT
*
ctx
,
unsigned
idx
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
is_watchpoint_set
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
static
void
be_x86_64_clear_watchpoint
(
CONTEXT
*
ctx
,
unsigned
idx
)
static
void
be_x86_64_clear_watchpoint
(
CONTEXT
*
ctx
,
unsigned
idx
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
clear_watchpoint
\n
"
);
}
}
static
int
be_x86_64_adjust_pc_for_break
(
CONTEXT
*
ctx
,
BOOL
way
)
static
int
be_x86_64_adjust_pc_for_break
(
CONTEXT
*
ctx
,
BOOL
way
)
{
{
dbg_printf
(
"not done
\n
"
);
if
(
way
)
return
0
;
{
ctx
->
Rip
--
;
return
-
1
;
}
ctx
->
Rip
++
;
return
1
;
}
}
static
int
be_x86_64_fetch_integer
(
const
struct
dbg_lvalue
*
lvalue
,
unsigned
size
,
static
int
be_x86_64_fetch_integer
(
const
struct
dbg_lvalue
*
lvalue
,
unsigned
size
,
unsigned
ext_sign
,
LONGLONG
*
ret
)
unsigned
ext_sign
,
LONGLONG
*
ret
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
fetch_integer
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
static
int
be_x86_64_fetch_float
(
const
struct
dbg_lvalue
*
lvalue
,
unsigned
size
,
static
int
be_x86_64_fetch_float
(
const
struct
dbg_lvalue
*
lvalue
,
unsigned
size
,
long
double
*
ret
)
long
double
*
ret
)
{
{
dbg_printf
(
"not done
\n
"
);
dbg_printf
(
"not done
fetch_float
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
...
...
programs/winedbg/debugger.h
View file @
ac857cb3
...
@@ -421,13 +421,13 @@ extern int gdb_main(int argc, char* argv[]);
...
@@ -421,13 +421,13 @@ extern int gdb_main(int argc, char* argv[]);
static
inline
BOOL
dbg_read_memory
(
const
void
*
addr
,
void
*
buffer
,
size_t
len
)
static
inline
BOOL
dbg_read_memory
(
const
void
*
addr
,
void
*
buffer
,
size_t
len
)
{
{
DWORD
rlen
;
SIZE_T
rlen
;
return
dbg_curr_process
->
process_io
->
read
(
dbg_curr_process
->
handle
,
addr
,
buffer
,
len
,
&
rlen
)
&&
len
==
rlen
;
return
dbg_curr_process
->
process_io
->
read
(
dbg_curr_process
->
handle
,
addr
,
buffer
,
len
,
&
rlen
)
&&
len
==
rlen
;
}
}
static
inline
BOOL
dbg_write_memory
(
void
*
addr
,
const
void
*
buffer
,
size_t
len
)
static
inline
BOOL
dbg_write_memory
(
void
*
addr
,
const
void
*
buffer
,
size_t
len
)
{
{
DWORD
wlen
;
SIZE_T
wlen
;
return
dbg_curr_process
->
process_io
->
write
(
dbg_curr_process
->
handle
,
addr
,
buffer
,
len
,
&
wlen
)
&&
len
==
wlen
;
return
dbg_curr_process
->
process_io
->
write
(
dbg_curr_process
->
handle
,
addr
,
buffer
,
len
,
&
wlen
)
&&
len
==
wlen
;
}
}
...
...
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