Commit 44410651 authored by Alexandre Julliard's avatar Alexandre Julliard

winedbg: Fix pointer cast warnings on 64-bit.

parent 32484769
...@@ -346,19 +346,19 @@ struct dbg_lvalue expr_eval(struct expr* exp) ...@@ -346,19 +346,19 @@ struct dbg_lvalue expr_eval(struct expr* exp)
rtn.cookie = DLV_HOST; rtn.cookie = DLV_HOST;
rtn.type.id = dbg_itype_astring; rtn.type.id = dbg_itype_astring;
rtn.type.module = 0; rtn.type.module = 0;
rtn.addr.Offset = (unsigned int)&exp->un.string.str; rtn.addr.Offset = (ULONG_PTR)&exp->un.string.str;
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_int;
rtn.type.module = 0; rtn.type.module = 0;
rtn.addr.Offset = (unsigned int)&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_int;
rtn.type.module = 0; rtn.type.module = 0;
rtn.addr.Offset = (unsigned int)&exp->un.s_const.value; rtn.addr.Offset = (ULONG_PTR)&exp->un.s_const.value;
break; break;
case EXPR_TYPE_SYMBOL: case EXPR_TYPE_SYMBOL:
switch (symbol_get_lvalue(exp->un.symbol.name, -1, &rtn, FALSE)) switch (symbol_get_lvalue(exp->un.symbol.name, -1, &rtn, FALSE))
...@@ -463,7 +463,7 @@ struct dbg_lvalue expr_eval(struct expr* exp) ...@@ -463,7 +463,7 @@ struct dbg_lvalue expr_eval(struct expr* exp)
rtn.cookie = DLV_HOST; rtn.cookie = DLV_HOST;
/* get return type from function signature tupe */ /* get return type from function signature tupe */
types_get_info(&rtn.type, TI_GET_TYPE, &rtn.type.id); types_get_info(&rtn.type, TI_GET_TYPE, &rtn.type.id);
rtn.addr.Offset = (unsigned int)&exp->un.call.result; rtn.addr.Offset = (ULONG_PTR)&exp->un.call.result;
break; break;
case EXPR_TYPE_INTVAR: case EXPR_TYPE_INTVAR:
rtn.cookie = DLV_HOST; rtn.cookie = DLV_HOST;
...@@ -471,7 +471,7 @@ struct dbg_lvalue expr_eval(struct expr* exp) ...@@ -471,7 +471,7 @@ struct dbg_lvalue expr_eval(struct expr* exp)
RaiseException(DEBUG_STATUS_NO_SYMBOL, 0, 0, NULL); RaiseException(DEBUG_STATUS_NO_SYMBOL, 0, 0, NULL);
rtn.type.id = div->typeid; rtn.type.id = div->typeid;
rtn.type.module = 0; rtn.type.module = 0;
rtn.addr.Offset = (unsigned int)div->pval; rtn.addr.Offset = (ULONG_PTR)div->pval;
break; break;
case EXPR_TYPE_BINOP: case EXPR_TYPE_BINOP:
rtn.cookie = DLV_HOST; rtn.cookie = DLV_HOST;
...@@ -481,7 +481,7 @@ struct dbg_lvalue expr_eval(struct expr* exp) ...@@ -481,7 +481,7 @@ struct dbg_lvalue expr_eval(struct expr* exp)
RaiseException(DEBUG_STATUS_BAD_TYPE, 0, 0, NULL); RaiseException(DEBUG_STATUS_BAD_TYPE, 0, 0, NULL);
rtn.type.id = dbg_itype_signed_int; rtn.type.id = dbg_itype_signed_int;
rtn.type.module = 0; rtn.type.module = 0;
rtn.addr.Offset = (unsigned int)&exp->un.binop.result; rtn.addr.Offset = (ULONG_PTR)&exp->un.binop.result;
type1 = exp1.type; type1 = exp1.type;
type2 = exp2.type; type2 = exp2.type;
switch (exp->un.binop.binop_type) switch (exp->un.binop.binop_type)
...@@ -611,7 +611,7 @@ struct dbg_lvalue expr_eval(struct expr* exp) ...@@ -611,7 +611,7 @@ struct dbg_lvalue expr_eval(struct expr* exp)
rtn.cookie = DLV_HOST; rtn.cookie = DLV_HOST;
exp1 = expr_eval(exp->un.unop.exp1); exp1 = expr_eval(exp->un.unop.exp1);
if (exp1.type.id == dbg_itype_none) RaiseException(DEBUG_STATUS_BAD_TYPE, 0, 0, NULL); if (exp1.type.id == dbg_itype_none) RaiseException(DEBUG_STATUS_BAD_TYPE, 0, 0, NULL);
rtn.addr.Offset = (unsigned int)&exp->un.unop.result; rtn.addr.Offset = (ULONG_PTR)&exp->un.unop.result;
rtn.type.id = dbg_itype_signed_int; rtn.type.id = dbg_itype_signed_int;
rtn.type.module = 0; rtn.type.module = 0;
switch (exp->un.unop.unop_type) switch (exp->un.unop.unop_type)
...@@ -638,7 +638,7 @@ struct dbg_lvalue expr_eval(struct expr* exp) ...@@ -638,7 +638,7 @@ struct dbg_lvalue expr_eval(struct expr* exp)
/* only do it on linear addresses */ /* only do it on linear addresses */
if (exp1.addr.Mode != AddrModeFlat) if (exp1.addr.Mode != AddrModeFlat)
RaiseException(DEBUG_STATUS_CANT_DEREF, 0, 0, NULL); RaiseException(DEBUG_STATUS_CANT_DEREF, 0, 0, NULL);
exp->un.unop.result = (unsigned int)memory_to_linear_addr(&exp1.addr); exp->un.unop.result = (ULONG_PTR)memory_to_linear_addr(&exp1.addr);
rtn.type = types_find_pointer(&exp1.type); rtn.type = types_find_pointer(&exp1.type);
if (rtn.type.id == dbg_itype_none) if (rtn.type.id == dbg_itype_none)
RaiseException(DEBUG_STATUS_CANT_DEREF, 0, 0, NULL); RaiseException(DEBUG_STATUS_CANT_DEREF, 0, 0, NULL);
......
...@@ -182,7 +182,7 @@ unsigned stack_fetch_frames(void) ...@@ -182,7 +182,7 @@ unsigned stack_fetch_frames(void)
/* don't confuse StackWalk by passing in inconsistent addresses */ /* don't confuse StackWalk by passing in inconsistent addresses */
if ((sf.AddrPC.Mode == AddrModeFlat) && (sf.AddrFrame.Mode != AddrModeFlat)) if ((sf.AddrPC.Mode == AddrModeFlat) && (sf.AddrFrame.Mode != AddrModeFlat))
{ {
sf.AddrFrame.Offset = (DWORD)memory_to_linear_addr(&sf.AddrFrame); sf.AddrFrame.Offset = (ULONG_PTR)memory_to_linear_addr(&sf.AddrFrame);
sf.AddrFrame.Mode = AddrModeFlat; sf.AddrFrame.Mode = AddrModeFlat;
} }
......
...@@ -53,7 +53,7 @@ static void dbg_init_current_thread(void* start) ...@@ -53,7 +53,7 @@ static void dbg_init_current_thread(void* start)
break_set_xpoints(FALSE); break_set_xpoints(FALSE);
addr.Mode = AddrModeFlat; addr.Mode = AddrModeFlat;
addr.Offset = (DWORD)start; addr.Offset = (DWORD_PTR)start;
break_add_break(&addr, TRUE, TRUE); break_add_break(&addr, TRUE, TRUE);
break_set_xpoints(TRUE); break_set_xpoints(TRUE);
} }
......
...@@ -114,7 +114,7 @@ LONGLONG types_extract_as_longlong(const struct dbg_lvalue* lvalue, unsigned* ps ...@@ -114,7 +114,7 @@ LONGLONG types_extract_as_longlong(const struct dbg_lvalue* lvalue, unsigned* ps
RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL); RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL);
break; break;
case SymTagFunctionType: case SymTagFunctionType:
rtn = (unsigned)memory_to_linear_addr(&lvalue->addr); rtn = (ULONG_PTR)memory_to_linear_addr(&lvalue->addr);
break; break;
default: default:
WINE_FIXME("Unsupported tag %u\n", tag); WINE_FIXME("Unsupported tag %u\n", tag);
...@@ -230,7 +230,7 @@ static BOOL types_get_udt_element_lvalue(struct dbg_lvalue* lvalue, ...@@ -230,7 +230,7 @@ static BOOL types_get_udt_element_lvalue(struct dbg_lvalue* lvalue,
*tmpbuf &= ~mask; *tmpbuf &= ~mask;
lvalue->cookie = DLV_HOST; lvalue->cookie = DLV_HOST;
lvalue->addr.Offset = (DWORD)tmpbuf; lvalue->addr.Offset = (ULONG_PTR)tmpbuf;
/* /*
* OK, now we have the correct part of the number. * OK, now we have the correct part of the number.
......
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