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
e08a1760
Commit
e08a1760
authored
Jun 20, 2006
by
Ge van Geldorp
Committed by
Alexandre Julliard
Jun 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Added x86_64 support.
parent
6352734e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
186 additions
and
0 deletions
+186
-0
Makefile.in
programs/winedbg/Makefile.in
+1
-0
be_x86_64.c
programs/winedbg/be_x86_64.c
+154
-0
gdbproxy.c
programs/winedbg/gdbproxy.c
+27
-0
winedbg.c
programs/winedbg/winedbg.c
+4
-0
No files found.
programs/winedbg/Makefile.in
View file @
e08a1760
...
@@ -11,6 +11,7 @@ C_SRCS = \
...
@@ -11,6 +11,7 @@ C_SRCS = \
be_alpha.c
\
be_alpha.c
\
be_i386.c
\
be_i386.c
\
be_ppc.c
\
be_ppc.c
\
be_x86_64.c
\
break.c
\
break.c
\
db_disasm.c
\
db_disasm.c
\
display.c
\
display.c
\
...
...
programs/winedbg/be_x86_64.c
0 → 100644
View file @
e08a1760
/*
* Debugger x86_64 specific functions
*
* Copyright 2004 Vincent Bron
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "debugger.h"
#if defined(__x86_64__)
static
unsigned
be_x86_64_get_addr
(
HANDLE
hThread
,
const
CONTEXT
*
ctx
,
enum
be_cpu_addr
bca
,
ADDRESS
*
addr
)
{
dbg_printf
(
"not done
\n
"
);
return
FALSE
;
}
static
void
be_x86_64_single_step
(
CONTEXT
*
ctx
,
unsigned
enable
)
{
dbg_printf
(
"not done
\n
"
);
}
static
void
be_x86_64_print_context
(
HANDLE
hThread
,
const
CONTEXT
*
ctx
)
{
dbg_printf
(
"Context printing for x86_64 not done yet
\n
"
);
}
static
void
be_x86_64_print_segment_info
(
HANDLE
hThread
,
const
CONTEXT
*
ctx
)
{
}
static
struct
dbg_internal_var
be_x86_64_ctx
[]
=
{
{
0
,
NULL
,
0
,
dbg_itype_none
}
};
static
const
struct
dbg_internal_var
*
be_x86_64_init_registers
(
CONTEXT
*
ctx
)
{
dbg_printf
(
"not done
\n
"
);
return
be_x86_64_ctx
;
}
static
unsigned
be_x86_64_is_step_over_insn
(
void
*
insn
)
{
dbg_printf
(
"not done
\n
"
);
return
FALSE
;
}
static
unsigned
be_x86_64_is_function_return
(
void
*
insn
)
{
dbg_printf
(
"not done
\n
"
);
return
FALSE
;
}
static
unsigned
be_x86_64_is_break_insn
(
void
*
insn
)
{
dbg_printf
(
"not done
\n
"
);
return
FALSE
;
}
static
unsigned
be_x86_64_is_func_call
(
void
*
insn
,
void
**
insn_callee
)
{
return
FALSE
;
}
static
void
be_x86_64_disasm_one_insn
(
ADDRESS
*
addr
,
int
display
)
{
dbg_printf
(
"Disasm NIY
\n
"
);
}
static
unsigned
be_x86_64_insert_Xpoint
(
HANDLE
hProcess
,
const
struct
be_process_io
*
pio
,
CONTEXT
*
ctx
,
enum
be_xpoint_type
type
,
void
*
addr
,
unsigned
long
*
val
,
unsigned
size
)
{
dbg_printf
(
"not done
\n
"
);
return
0
;
}
static
unsigned
be_x86_64_remove_Xpoint
(
HANDLE
hProcess
,
const
struct
be_process_io
*
pio
,
CONTEXT
*
ctx
,
enum
be_xpoint_type
type
,
void
*
addr
,
unsigned
long
val
,
unsigned
size
)
{
dbg_printf
(
"not done
\n
"
);
return
FALSE
;
}
static
unsigned
be_x86_64_is_watchpoint_set
(
const
CONTEXT
*
ctx
,
unsigned
idx
)
{
dbg_printf
(
"not done
\n
"
);
return
FALSE
;
}
static
void
be_x86_64_clear_watchpoint
(
CONTEXT
*
ctx
,
unsigned
idx
)
{
dbg_printf
(
"not done
\n
"
);
}
static
int
be_x86_64_adjust_pc_for_break
(
CONTEXT
*
ctx
,
BOOL
way
)
{
dbg_printf
(
"not done
\n
"
);
return
0
;
}
static
int
be_x86_64_fetch_integer
(
const
struct
dbg_lvalue
*
lvalue
,
unsigned
size
,
unsigned
ext_sign
,
LONGLONG
*
ret
)
{
dbg_printf
(
"not done
\n
"
);
return
FALSE
;
}
static
int
be_x86_64_fetch_float
(
const
struct
dbg_lvalue
*
lvalue
,
unsigned
size
,
long
double
*
ret
)
{
dbg_printf
(
"not done
\n
"
);
return
FALSE
;
}
struct
backend_cpu
be_x86_64
=
{
be_cpu_linearize
,
be_cpu_build_addr
,
be_x86_64_get_addr
,
be_x86_64_single_step
,
be_x86_64_print_context
,
be_x86_64_print_segment_info
,
be_x86_64_init_registers
,
be_x86_64_is_step_over_insn
,
be_x86_64_is_function_return
,
be_x86_64_is_break_insn
,
be_x86_64_is_func_call
,
be_x86_64_disasm_one_insn
,
be_x86_64_insert_Xpoint
,
be_x86_64_remove_Xpoint
,
be_x86_64_is_watchpoint_set
,
be_x86_64_clear_watchpoint
,
be_x86_64_adjust_pc_for_break
,
be_x86_64_fetch_integer
,
be_x86_64_fetch_float
,
};
#endif
programs/winedbg/gdbproxy.c
View file @
e08a1760
...
@@ -338,6 +338,33 @@ static size_t cpu_register_map[] = {
...
@@ -338,6 +338,33 @@ static size_t cpu_register_map[] = {
FIELD_OFFSET
(
CONTEXT
,
Fpcr
),
FIELD_OFFSET
(
CONTEXT
,
Fpcr
),
FIELD_OFFSET
(
CONTEXT
,
SoftFpcr
),
FIELD_OFFSET
(
CONTEXT
,
SoftFpcr
),
};
};
#elif defined(__x86_64__)
static
size_t
cpu_register_map
[]
=
{
FIELD_OFFSET
(
CONTEXT
,
Rax
),
FIELD_OFFSET
(
CONTEXT
,
Rbx
),
FIELD_OFFSET
(
CONTEXT
,
Rcx
),
FIELD_OFFSET
(
CONTEXT
,
Rdx
),
FIELD_OFFSET
(
CONTEXT
,
Rsi
),
FIELD_OFFSET
(
CONTEXT
,
Rdi
),
FIELD_OFFSET
(
CONTEXT
,
Rbp
),
FIELD_OFFSET
(
CONTEXT
,
Rsp
),
FIELD_OFFSET
(
CONTEXT
,
R8
),
FIELD_OFFSET
(
CONTEXT
,
R9
),
FIELD_OFFSET
(
CONTEXT
,
R10
),
FIELD_OFFSET
(
CONTEXT
,
R11
),
FIELD_OFFSET
(
CONTEXT
,
R12
),
FIELD_OFFSET
(
CONTEXT
,
R13
),
FIELD_OFFSET
(
CONTEXT
,
R14
),
FIELD_OFFSET
(
CONTEXT
,
R15
),
FIELD_OFFSET
(
CONTEXT
,
Rip
),
FIELD_OFFSET
(
CONTEXT
,
EFlags
),
FIELD_OFFSET
(
CONTEXT
,
SegCs
),
FIELD_OFFSET
(
CONTEXT
,
SegSs
),
FIELD_OFFSET
(
CONTEXT
,
SegDs
),
FIELD_OFFSET
(
CONTEXT
,
SegEs
),
FIELD_OFFSET
(
CONTEXT
,
SegFs
),
FIELD_OFFSET
(
CONTEXT
,
SegGs
),
};
#else
#else
# error Define the registers map for your CPU
# error Define the registers map for your CPU
#endif
#endif
...
...
programs/winedbg/winedbg.c
View file @
e08a1760
...
@@ -479,6 +479,8 @@ extern struct backend_cpu be_i386;
...
@@ -479,6 +479,8 @@ extern struct backend_cpu be_i386;
extern
struct
backend_cpu
be_ppc
;
extern
struct
backend_cpu
be_ppc
;
#elif __ALPHA__
#elif __ALPHA__
extern
struct
backend_cpu
be_alpha
;
extern
struct
backend_cpu
be_alpha
;
#elif __x86_64__
extern
struct
backend_cpu
be_x86_64
;
#else
#else
# error CPU unknown
# error CPU unknown
#endif
#endif
...
@@ -495,6 +497,8 @@ int main(int argc, char** argv)
...
@@ -495,6 +497,8 @@ int main(int argc, char** argv)
be_cpu
=
&
be_ppc
;
be_cpu
=
&
be_ppc
;
#elif __ALPHA__
#elif __ALPHA__
be_cpu
=
&
be_alpha
;
be_cpu
=
&
be_alpha
;
#elif __x86_64__
be_cpu
=
&
be_x86_64
;
#else
#else
# error CPU unknown
# error CPU unknown
#endif
#endif
...
...
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