winedbg: Allow internal (host) integral variables to hold 64bit value on 64bit platforms.

This commit is contained in:
Eric Pouech 2009-12-14 22:05:27 +01:00 committed by Alexandre Julliard
parent 4ce6c90c36
commit 5aa859de72
3 changed files with 29 additions and 11 deletions

View File

@ -328,8 +328,8 @@ extern int display_enable(int displaynum, int enable);
extern void expr_free_all(void);
extern struct expr* expr_alloc_internal_var(const char* name);
extern struct expr* expr_alloc_symbol(const char* name);
extern struct expr* expr_alloc_sconstant(int val);
extern struct expr* expr_alloc_uconstant(unsigned val);
extern struct expr* expr_alloc_sconstant(long int val);
extern struct expr* expr_alloc_uconstant(long unsigned val);
extern struct expr* expr_alloc_string(const char* str);
extern struct expr* expr_alloc_binary_op(int oper, struct expr*, struct expr*);
extern struct expr* expr_alloc_unary_op(int oper, struct expr*);

View File

@ -37,12 +37,12 @@ struct expr
{
struct
{
int value;
long int value;
} s_const;
struct
{
unsigned int value;
long unsigned int value;
} u_const;
struct
@ -165,7 +165,7 @@ struct expr* expr_alloc_symbol(const char* name)
return ex;
}
struct expr* expr_alloc_sconstant(int value)
struct expr* expr_alloc_sconstant(long int value)
{
struct expr* ex;
@ -176,7 +176,7 @@ struct expr* expr_alloc_sconstant(int value)
return ex;
}
struct expr* expr_alloc_uconstant(unsigned int value)
struct expr* expr_alloc_uconstant(long unsigned int value)
{
struct expr* ex;
@ -350,13 +350,13 @@ struct dbg_lvalue expr_eval(struct expr* exp)
break;
case EXPR_TYPE_U_CONST:
rtn.cookie = DLV_HOST;
rtn.type.id = dbg_itype_unsigned_int;
rtn.type.id = dbg_itype_unsigned_long_int;
rtn.type.module = 0;
rtn.addr.Offset = (ULONG_PTR)&exp->un.u_const.value;
break;
case EXPR_TYPE_S_CONST:
rtn.cookie = DLV_HOST;
rtn.type.id = dbg_itype_signed_int;
rtn.type.id = dbg_itype_signed_long_int;
rtn.type.module = 0;
rtn.addr.Offset = (ULONG_PTR)&exp->un.s_const.value;
break;
@ -690,10 +690,10 @@ int expr_print(const struct expr* exp)
dbg_printf("$%s", exp->un.intvar.name);
break;
case EXPR_TYPE_U_CONST:
dbg_printf("%u", exp->un.u_const.value);
dbg_printf("%lu", exp->un.u_const.value);
break;
case EXPR_TYPE_S_CONST:
dbg_printf("%d", exp->un.s_const.value);
dbg_printf("%ld", exp->un.s_const.value);
break;
case EXPR_TYPE_STRING:
dbg_printf("\"%s\"", exp->un.string.str);

View File

@ -784,6 +784,24 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v
switch (type->id)
{
case dbg_itype_unsigned_long_int:
switch (ti)
{
case TI_GET_SYMTAG: X(DWORD) = SymTagBaseType; break;
case TI_GET_LENGTH: X(DWORD64) = ADDRSIZE; break;
case TI_GET_BASETYPE: X(DWORD) = btUInt; break;
default: WINE_FIXME("unsupported %u for u-long int\n", ti); return FALSE;
}
break;
case dbg_itype_signed_long_int:
switch (ti)
{
case TI_GET_SYMTAG: X(DWORD) = SymTagBaseType; break;
case TI_GET_LENGTH: X(DWORD64) = ADDRSIZE; break;
case TI_GET_BASETYPE: X(DWORD) = btInt; break;
default: WINE_FIXME("unsupported %u for s-long int\n", ti); return FALSE;
}
break;
case dbg_itype_unsigned_int:
switch (ti)
{
@ -851,7 +869,7 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v
switch (ti)
{
case TI_GET_SYMTAG: X(DWORD) = SymTagPointerType; break;
case TI_GET_LENGTH: X(DWORD64) = 4; break;
case TI_GET_LENGTH: X(DWORD64) = ADDRSIZE; break;
case TI_GET_TYPE: X(DWORD) = dbg_itype_char; break;
default: WINE_FIXME("unsupported %u for a string\n", ti); return FALSE;
}