Module: wine Branch: master Commit: 0d7a6f13a8c235a8bf10adb13c1a16e1347b919f URL: http://source.winehq.org/git/wine.git/?a=commit;h=0d7a6f13a8c235a8bf10adb13c...
Author: Eric Pouech eric.pouech@orange.fr Date: Mon Apr 12 21:18:18 2010 +0200
winedbg: Describe pointer size in CPU backend structure.
---
programs/winedbg/be_alpha.c | 1 + programs/winedbg/be_cpu.h | 3 ++- programs/winedbg/be_i386.c | 1 + programs/winedbg/be_ppc.c | 1 + programs/winedbg/be_x86_64.c | 1 + programs/winedbg/debugger.h | 2 +- 6 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/programs/winedbg/be_alpha.c b/programs/winedbg/be_alpha.c index 3c470e7..76cddb5 100644 --- a/programs/winedbg/be_alpha.c +++ b/programs/winedbg/be_alpha.c @@ -146,6 +146,7 @@ static int be_alpha_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, struct backend_cpu be_alpha = { IMAGE_FILE_MACHINE_ALPHA, + 8, be_cpu_linearize, be_cpu_build_addr, be_alpha_get_addr, diff --git a/programs/winedbg/be_cpu.h b/programs/winedbg/be_cpu.h index a08f8f0..005494d 100644 --- a/programs/winedbg/be_cpu.h +++ b/programs/winedbg/be_cpu.h @@ -23,7 +23,8 @@ enum be_xpoint_type {be_xpoint_break, be_xpoint_watch_exec, be_xpoint_watch_read be_xpoint_watch_write}; struct backend_cpu { - DWORD machine; + const DWORD machine; + const DWORD pointer_size; /* ------------------------------------------------------------------------------ * address manipulation * ------------------------------------------------------------------------------ */ diff --git a/programs/winedbg/be_i386.c b/programs/winedbg/be_i386.c index 74676dd..d6111bd 100644 --- a/programs/winedbg/be_i386.c +++ b/programs/winedbg/be_i386.c @@ -738,6 +738,7 @@ static int be_i386_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, struct backend_cpu be_i386 = { IMAGE_FILE_MACHINE_I386, + 4, be_i386_linearize, be_i386_build_addr, be_i386_get_addr, diff --git a/programs/winedbg/be_ppc.c b/programs/winedbg/be_ppc.c index 22becf2..2377648 100644 --- a/programs/winedbg/be_ppc.c +++ b/programs/winedbg/be_ppc.c @@ -170,6 +170,7 @@ static int be_ppc_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, struct backend_cpu be_ppc = { IMAGE_FILE_MACHINE_POWERPC, + 4, be_cpu_linearize, be_cpu_build_addr, be_ppc_get_addr, diff --git a/programs/winedbg/be_x86_64.c b/programs/winedbg/be_x86_64.c index 514310b..6099a78 100644 --- a/programs/winedbg/be_x86_64.c +++ b/programs/winedbg/be_x86_64.c @@ -547,6 +547,7 @@ static int be_x86_64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, struct backend_cpu be_x86_64 = { IMAGE_FILE_MACHINE_AMD64, + 8, be_cpu_linearize, be_cpu_build_addr, be_x86_64_get_addr, diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h index d8e1ef4..b38d6bd 100644 --- a/programs/winedbg/debugger.h +++ b/programs/winedbg/debugger.h @@ -38,7 +38,7 @@ #include "objbase.h" #include "oaidl.h"
-#define ADDRSIZE ((unsigned)sizeof(void*)) +#define ADDRSIZE (be_cpu->pointer_size) #define ADDRWIDTH (ADDRSIZE * 2)
/* the debugger uses these exceptions for it's internal use */