Commit 5aa859de authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

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

parent 4ce6c90c
...@@ -328,8 +328,8 @@ extern int display_enable(int displaynum, int enable); ...@@ -328,8 +328,8 @@ extern int display_enable(int displaynum, int enable);
extern void expr_free_all(void); extern void expr_free_all(void);
extern struct expr* expr_alloc_internal_var(const char* name); extern struct expr* expr_alloc_internal_var(const char* name);
extern struct expr* expr_alloc_symbol(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_sconstant(long int val);
extern struct expr* expr_alloc_uconstant(unsigned val); extern struct expr* expr_alloc_uconstant(long unsigned val);
extern struct expr* expr_alloc_string(const char* str); 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_binary_op(int oper, struct expr*, struct expr*);
extern struct expr* expr_alloc_unary_op(int oper, struct expr*); extern struct expr* expr_alloc_unary_op(int oper, struct expr*);
......
...@@ -37,12 +37,12 @@ struct expr ...@@ -37,12 +37,12 @@ struct expr
{ {
struct struct
{ {
int value; long int value;
} s_const; } s_const;
struct struct
{ {
unsigned int value; long unsigned int value;
} u_const; } u_const;
struct struct
...@@ -165,7 +165,7 @@ struct expr* expr_alloc_symbol(const char* name) ...@@ -165,7 +165,7 @@ struct expr* expr_alloc_symbol(const char* name)
return ex; return ex;
} }
struct expr* expr_alloc_sconstant(int value) struct expr* expr_alloc_sconstant(long int value)
{ {
struct expr* ex; struct expr* ex;
...@@ -176,7 +176,7 @@ struct expr* expr_alloc_sconstant(int value) ...@@ -176,7 +176,7 @@ struct expr* expr_alloc_sconstant(int value)
return ex; return ex;
} }
struct expr* expr_alloc_uconstant(unsigned int value) struct expr* expr_alloc_uconstant(long unsigned int value)
{ {
struct expr* ex; struct expr* ex;
...@@ -350,13 +350,13 @@ struct dbg_lvalue expr_eval(struct expr* exp) ...@@ -350,13 +350,13 @@ struct dbg_lvalue expr_eval(struct expr* exp)
break; break;
case EXPR_TYPE_U_CONST: case EXPR_TYPE_U_CONST:
rtn.cookie = DLV_HOST; rtn.cookie = DLV_HOST;
rtn.type.id = dbg_itype_unsigned_int; rtn.type.id = dbg_itype_unsigned_long_int;
rtn.type.module = 0; rtn.type.module = 0;
rtn.addr.Offset = (ULONG_PTR)&exp->un.u_const.value; rtn.addr.Offset = (ULONG_PTR)&exp->un.u_const.value;
break; break;
case EXPR_TYPE_S_CONST: case EXPR_TYPE_S_CONST:
rtn.cookie = DLV_HOST; rtn.cookie = DLV_HOST;
rtn.type.id = dbg_itype_signed_int; rtn.type.id = dbg_itype_signed_long_int;
rtn.type.module = 0; rtn.type.module = 0;
rtn.addr.Offset = (ULONG_PTR)&exp->un.s_const.value; rtn.addr.Offset = (ULONG_PTR)&exp->un.s_const.value;
break; break;
...@@ -690,10 +690,10 @@ int expr_print(const struct expr* exp) ...@@ -690,10 +690,10 @@ int expr_print(const struct expr* exp)
dbg_printf("$%s", exp->un.intvar.name); dbg_printf("$%s", exp->un.intvar.name);
break; break;
case EXPR_TYPE_U_CONST: case EXPR_TYPE_U_CONST:
dbg_printf("%u", exp->un.u_const.value); dbg_printf("%lu", exp->un.u_const.value);
break; break;
case EXPR_TYPE_S_CONST: case EXPR_TYPE_S_CONST:
dbg_printf("%d", exp->un.s_const.value); dbg_printf("%ld", exp->un.s_const.value);
break; break;
case EXPR_TYPE_STRING: case EXPR_TYPE_STRING:
dbg_printf("\"%s\"", exp->un.string.str); dbg_printf("\"%s\"", exp->un.string.str);
......
...@@ -784,6 +784,24 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v ...@@ -784,6 +784,24 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v
switch (type->id) 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: case dbg_itype_unsigned_int:
switch (ti) switch (ti)
{ {
...@@ -851,7 +869,7 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v ...@@ -851,7 +869,7 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v
switch (ti) switch (ti)
{ {
case TI_GET_SYMTAG: X(DWORD) = SymTagPointerType; break; 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; case TI_GET_TYPE: X(DWORD) = dbg_itype_char; break;
default: WINE_FIXME("unsupported %u for a string\n", ti); return FALSE; default: WINE_FIXME("unsupported %u for a string\n", ti); return FALSE;
} }
......
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