Commit b1641554 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Added a couple of missing CodeView base types (used in 64bit compilation).

parent 229d753b
......@@ -95,7 +95,7 @@ static void dump(const void* ptr, unsigned len)
* Process CodeView type information.
*/
#define MAX_BUILTIN_TYPES 0x0604
#define MAX_BUILTIN_TYPES 0x06FF
#define FIRST_DEFINABLE_TYPE 0x1000
static struct symt* cv_basic_types[MAX_BUILTIN_TYPES];
......@@ -145,37 +145,68 @@ static void codeview_init_basic_types(struct module* module)
cv_basic_types[T_UINT8] = &symt_new_basic(module, btUInt, "UINT8", 8)->symt;
cv_basic_types[T_HRESULT]= &symt_new_basic(module, btUInt, "HRESULT", 4)->symt;
cv_basic_types[T_32PVOID] = &symt_new_pointer(module, cv_basic_types[T_VOID])->symt;
cv_basic_types[T_32PCHAR] = &symt_new_pointer(module, cv_basic_types[T_CHAR])->symt;
cv_basic_types[T_32PSHORT] = &symt_new_pointer(module, cv_basic_types[T_SHORT])->symt;
cv_basic_types[T_32PLONG] = &symt_new_pointer(module, cv_basic_types[T_LONG])->symt;
cv_basic_types[T_32PQUAD] = &symt_new_pointer(module, cv_basic_types[T_QUAD])->symt;
cv_basic_types[T_32PUCHAR] = &symt_new_pointer(module, cv_basic_types[T_UCHAR])->symt;
cv_basic_types[T_32PUSHORT] = &symt_new_pointer(module, cv_basic_types[T_USHORT])->symt;
cv_basic_types[T_32PULONG] = &symt_new_pointer(module, cv_basic_types[T_ULONG])->symt;
cv_basic_types[T_32PUQUAD] = &symt_new_pointer(module, cv_basic_types[T_UQUAD])->symt;
cv_basic_types[T_32PBOOL08] = &symt_new_pointer(module, cv_basic_types[T_BOOL08])->symt;
cv_basic_types[T_32PBOOL16] = &symt_new_pointer(module, cv_basic_types[T_BOOL16])->symt;
cv_basic_types[T_32PBOOL32] = &symt_new_pointer(module, cv_basic_types[T_BOOL32])->symt;
cv_basic_types[T_32PBOOL64] = &symt_new_pointer(module, cv_basic_types[T_BOOL64])->symt;
cv_basic_types[T_32PREAL32] = &symt_new_pointer(module, cv_basic_types[T_REAL32])->symt;
cv_basic_types[T_32PREAL64] = &symt_new_pointer(module, cv_basic_types[T_REAL64])->symt;
cv_basic_types[T_32PREAL80] = &symt_new_pointer(module, cv_basic_types[T_REAL80])->symt;
cv_basic_types[T_32PRCHAR] = &symt_new_pointer(module, cv_basic_types[T_RCHAR])->symt;
cv_basic_types[T_32PWCHAR] = &symt_new_pointer(module, cv_basic_types[T_WCHAR])->symt;
cv_basic_types[T_32PINT2] = &symt_new_pointer(module, cv_basic_types[T_INT2])->symt;
cv_basic_types[T_32PUINT2] = &symt_new_pointer(module, cv_basic_types[T_UINT2])->symt;
cv_basic_types[T_32PINT4] = &symt_new_pointer(module, cv_basic_types[T_INT4])->symt;
cv_basic_types[T_32PUINT4] = &symt_new_pointer(module, cv_basic_types[T_UINT4])->symt;
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;
if (sizeof(void*) == 4)
{
cv_basic_types[T_32PVOID] = &symt_new_pointer(module, cv_basic_types[T_VOID])->symt;
cv_basic_types[T_32PCHAR] = &symt_new_pointer(module, cv_basic_types[T_CHAR])->symt;
cv_basic_types[T_32PSHORT] = &symt_new_pointer(module, cv_basic_types[T_SHORT])->symt;
cv_basic_types[T_32PLONG] = &symt_new_pointer(module, cv_basic_types[T_LONG])->symt;
cv_basic_types[T_32PQUAD] = &symt_new_pointer(module, cv_basic_types[T_QUAD])->symt;
cv_basic_types[T_32PUCHAR] = &symt_new_pointer(module, cv_basic_types[T_UCHAR])->symt;
cv_basic_types[T_32PUSHORT] = &symt_new_pointer(module, cv_basic_types[T_USHORT])->symt;
cv_basic_types[T_32PULONG] = &symt_new_pointer(module, cv_basic_types[T_ULONG])->symt;
cv_basic_types[T_32PUQUAD] = &symt_new_pointer(module, cv_basic_types[T_UQUAD])->symt;
cv_basic_types[T_32PBOOL08] = &symt_new_pointer(module, cv_basic_types[T_BOOL08])->symt;
cv_basic_types[T_32PBOOL16] = &symt_new_pointer(module, cv_basic_types[T_BOOL16])->symt;
cv_basic_types[T_32PBOOL32] = &symt_new_pointer(module, cv_basic_types[T_BOOL32])->symt;
cv_basic_types[T_32PBOOL64] = &symt_new_pointer(module, cv_basic_types[T_BOOL64])->symt;
cv_basic_types[T_32PREAL32] = &symt_new_pointer(module, cv_basic_types[T_REAL32])->symt;
cv_basic_types[T_32PREAL64] = &symt_new_pointer(module, cv_basic_types[T_REAL64])->symt;
cv_basic_types[T_32PREAL80] = &symt_new_pointer(module, cv_basic_types[T_REAL80])->symt;
cv_basic_types[T_32PRCHAR] = &symt_new_pointer(module, cv_basic_types[T_RCHAR])->symt;
cv_basic_types[T_32PWCHAR] = &symt_new_pointer(module, cv_basic_types[T_WCHAR])->symt;
cv_basic_types[T_32PINT2] = &symt_new_pointer(module, cv_basic_types[T_INT2])->symt;
cv_basic_types[T_32PUINT2] = &symt_new_pointer(module, cv_basic_types[T_UINT2])->symt;
cv_basic_types[T_32PINT4] = &symt_new_pointer(module, cv_basic_types[T_INT4])->symt;
cv_basic_types[T_32PUINT4] = &symt_new_pointer(module, cv_basic_types[T_UINT4])->symt;
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[T_64PVOID]= &udt->symt;
}
else
{
cv_basic_types[T_64PVOID] = &symt_new_pointer(module, cv_basic_types[T_VOID])->symt;
cv_basic_types[T_64PCHAR] = &symt_new_pointer(module, cv_basic_types[T_CHAR])->symt;
cv_basic_types[T_64PSHORT] = &symt_new_pointer(module, cv_basic_types[T_SHORT])->symt;
cv_basic_types[T_64PLONG] = &symt_new_pointer(module, cv_basic_types[T_LONG])->symt;
cv_basic_types[T_64PQUAD] = &symt_new_pointer(module, cv_basic_types[T_QUAD])->symt;
cv_basic_types[T_64PUCHAR] = &symt_new_pointer(module, cv_basic_types[T_UCHAR])->symt;
cv_basic_types[T_64PUSHORT] = &symt_new_pointer(module, cv_basic_types[T_USHORT])->symt;
cv_basic_types[T_64PULONG] = &symt_new_pointer(module, cv_basic_types[T_ULONG])->symt;
cv_basic_types[T_64PUQUAD] = &symt_new_pointer(module, cv_basic_types[T_UQUAD])->symt;
cv_basic_types[T_64PBOOL08] = &symt_new_pointer(module, cv_basic_types[T_BOOL08])->symt;
cv_basic_types[T_64PBOOL16] = &symt_new_pointer(module, cv_basic_types[T_BOOL16])->symt;
cv_basic_types[T_64PBOOL32] = &symt_new_pointer(module, cv_basic_types[T_BOOL32])->symt;
cv_basic_types[T_64PBOOL64] = &symt_new_pointer(module, cv_basic_types[T_BOOL64])->symt;
cv_basic_types[T_64PREAL32] = &symt_new_pointer(module, cv_basic_types[T_REAL32])->symt;
cv_basic_types[T_64PREAL64] = &symt_new_pointer(module, cv_basic_types[T_REAL64])->symt;
cv_basic_types[T_64PREAL80] = &symt_new_pointer(module, cv_basic_types[T_REAL80])->symt;
cv_basic_types[T_64PRCHAR] = &symt_new_pointer(module, cv_basic_types[T_RCHAR])->symt;
cv_basic_types[T_64PWCHAR] = &symt_new_pointer(module, cv_basic_types[T_WCHAR])->symt;
cv_basic_types[T_64PINT2] = &symt_new_pointer(module, cv_basic_types[T_INT2])->symt;
cv_basic_types[T_64PUINT2] = &symt_new_pointer(module, cv_basic_types[T_UINT2])->symt;
cv_basic_types[T_64PINT4] = &symt_new_pointer(module, cv_basic_types[T_INT4])->symt;
cv_basic_types[T_64PUINT4] = &symt_new_pointer(module, cv_basic_types[T_UINT4])->symt;
cv_basic_types[T_64PINT8] = &symt_new_pointer(module, cv_basic_types[T_INT8])->symt;
cv_basic_types[T_64PUINT8] = &symt_new_pointer(module, cv_basic_types[T_UINT8])->symt;
cv_basic_types[T_64PHRESULT]= &symt_new_pointer(module, cv_basic_types[T_HRESULT])->symt;
}
}
static int leaf_as_variant(VARIANT* v, const unsigned short int* leaf)
......
......@@ -996,6 +996,7 @@ union codeview_fieldtype
/* 32-bit far pointers to basic types */
#define T_32PFVOID 0x0503 /* 32-bit far pointer to void */
#define T_32PFHRESULT 0x0508 /* 16:32 far pointer to HRESULT - or error code ??? */
#define T_32PFCHAR 0x0510 /* 16:32 far pointer to 8-bit signed */
#define T_32PFSHORT 0x0511 /* 16:32 far pointer to 16-bit signed */
#define T_32PFLONG 0x0512 /* 16:32 far pointer to 32-bit signed */
......@@ -1026,6 +1027,38 @@ union codeview_fieldtype
#define T_32PFINT8 0x0576 /* 16:32 far pointer to 64-bit signed int */
#define T_32PFUINT8 0x0577 /* 16:32 far pointer to 64-bit unsigned int */
/* 64-bit near pointers to basic types */
#define T_64PVOID 0x0603 /* 64-bit near pointer to void */
#define T_64PHRESULT 0x0608 /* 64 near pointer to HRESULT - or error code ??? */
#define T_64PCHAR 0x0610 /* 64 near pointer to 8-bit signed */
#define T_64PSHORT 0x0611 /* 64 near pointer to 16-bit signed */
#define T_64PLONG 0x0612 /* 64 near pointer to 32-bit signed */
#define T_64PQUAD 0x0613 /* 64 near pointer to 64-bit signed */
#define T_64PUCHAR 0x0620 /* 64 near pointer to 8-bit unsigned */
#define T_64PUSHORT 0x0621 /* 64 near pointer to 16-bit unsigned */
#define T_64PULONG 0x0622 /* 64 near pointer to 32-bit unsigned */
#define T_64PUQUAD 0x0623 /* 64 near pointer to 64-bit unsigned */
#define T_64PBOOL08 0x0630 /* 64 near pointer to 8-bit Boolean */
#define T_64PBOOL16 0x0631 /* 64 near pointer to 16-bit Boolean */
#define T_64PBOOL32 0x0632 /* 64 near pointer to 32-bit Boolean */
#define T_64PBOOL64 0x0633 /* 64 near pointer to 64-bit Boolean */
#define T_64PREAL32 0x0640 /* 64 near pointer to 32-bit real */
#define T_64PREAL64 0x0641 /* 64 near pointer to 64-bit real */
#define T_64PREAL80 0x0642 /* 64 near pointer to 80-bit real */
#define T_64PREAL128 0x0643 /* 64 near pointer to 128-bit real */
#define T_64PREAL48 0x0644 /* 64 near pointer to 48-bit real */
#define T_64PCPLX32 0x0650 /* 64 near pointer to 32-bit complex */
#define T_64PCPLX64 0x0651 /* 64 near pointer to 64-bit complex */
#define T_64PCPLX80 0x0652 /* 64 near pointer to 80-bit complex */
#define T_64PCPLX128 0x0653 /* 64 near pointer to 128-bit complex */
#define T_64PRCHAR 0x0670 /* 64 near pointer to a real char */
#define T_64PWCHAR 0x0671 /* 64 near pointer to a wide char */
#define T_64PINT2 0x0672 /* 64 near pointer to 16-bit signed int */
#define T_64PUINT2 0x0673 /* 64 near pointer to 16-bit unsigned int */
#define T_64PINT4 0x0674 /* 64 near pointer to 32-bit signed int */
#define T_64PUINT4 0x0675 /* 64 near pointer to 32-bit unsigned int */
#define T_64PINT8 0x0676 /* 64 near pointer to 64-bit signed int */
#define T_64PUINT8 0x0677 /* 64 near pointer to 64-bit unsigned int */
/* counts, bit masks, and shift values needed to access various parts of the built-in type numbers */
#define T_MAXPREDEFINEDTYPE 0x0580 /* maximum type index for all built-in types */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment