Alistair Leslie-Hughes : dbghelp: Add basic support for PVOID64.

Alexandre Julliard julliard at winehq.org
Mon Feb 8 11:06:05 CST 2010


Module: wine
Branch: master
Commit: d02040d98a7e689dcaf26dc2c9fbc112e523f7c4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d02040d98a7e689dcaf26dc2c9fbc112e523f7c4

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Wed Feb  3 12:41:51 2010 +1100

dbghelp: Add basic support for PVOID64.

---

 dlls/dbghelp/msc.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c
index b7adabd..ee394cd 100644
--- a/dlls/dbghelp/msc.c
+++ b/dlls/dbghelp/msc.c
@@ -95,7 +95,7 @@ static void dump(const void* ptr, unsigned len)
  * Process CodeView type information.
  */
 
-#define MAX_BUILTIN_TYPES	0x0480
+#define MAX_BUILTIN_TYPES	0x0604
 #define FIRST_DEFINABLE_TYPE    0x1000
 
 static struct symt*     cv_basic_types[MAX_BUILTIN_TYPES];
@@ -113,6 +113,7 @@ static struct cv_defined_module*cv_current_module;
 
 static void codeview_init_basic_types(struct module* module)
 {
+    struct symt_udt*    udt;
     /*
      * These are the common builtin types that are used by VC++.
      */
@@ -169,6 +170,12 @@ static void codeview_init_basic_types(struct module* module)
     cv_basic_types[T_32PINT8]   = &symt_new_pointer(module, cv_basic_types[T_INT8])->symt;
     cv_basic_types[T_32PUINT8]  = &symt_new_pointer(module, cv_basic_types[T_UINT8])->symt;
     cv_basic_types[T_32PHRESULT]= &symt_new_pointer(module, cv_basic_types[T_HRESULT])->symt;
+
+    /* The .pdb file can refer to 64 bit pointers values even on 32 bits applications. */
+    udt = symt_new_udt(module, "PVOID64", 8, UdtStruct);
+    symt_add_udt_element(module, udt, "ptr64_low", cv_basic_types[T_LONG], 0, 32);
+    symt_add_udt_element(module, udt, "ptr64_high", cv_basic_types[T_LONG], 32, 32);
+    cv_basic_types[0x603]= &udt->symt;
 }
 
 static int leaf_as_variant(VARIANT* v, const unsigned short int* leaf)




More information about the wine-cvs mailing list