winedbg: Describe pointer size in CPU backend structure.
authorEric Pouech <eric.pouech@orange.fr>
Mon, 12 Apr 2010 19:18:18 +0000 (21:18 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 13 Apr 2010 09:42:18 +0000 (11:42 +0200)
programs/winedbg/be_alpha.c
programs/winedbg/be_cpu.h
programs/winedbg/be_i386.c
programs/winedbg/be_ppc.c
programs/winedbg/be_x86_64.c
programs/winedbg/debugger.h

index 3c470e75b9bc4d4689262159eeb0a901f96400b8..76cddb52d5605a43f0786002ea091bab0c3db51e 100644 (file)
@@ -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,
index a08f8f05eab10d1a86d05216c894be49e1176e13..005494d9dbe4112107e2f47a1a96c67b44c0941b 100644 (file)
@@ -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
      * ------------------------------------------------------------------------------ */
index 74676ddecf74d5e7a3879dfd2b4a1e08df4117b3..d6111bdab1d7fb9b5148ecbb453f4a855adf452c 100644 (file)
@@ -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,
index 22becf2c117481ae0dffd5b4bd91d638274a5c36..23776488fc12505b68391a17cdf50afcb74d2e8a 100644 (file)
@@ -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,
index 514310b8ae2d5bb1de31407f40f68c687ef19ead..6099a784ba67bd124a7a198fd99cf77ef58da077 100644 (file)
@@ -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,
index d8e1ef4218206e0f1f891ddac1bebaa3efb88c46..b38d6bdf37e82d395e923ea72f7dbe3c039d62ac 100644 (file)
@@ -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 */