+2013-09-29 Mark Wielaard <mjw@redhat.com>
+
+ * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to
+ uintptr_t before casting to char *.
+ (__libdw_intern_expression): Cast data to uintptr_t before casting
+ to Dwarf_Word.
+ * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast
+ op->number2 to uintptr_t before casting to char *.
+
2013-09-24 Josh Stone <jistone@redhat.com>
* libdw_visit_scopes.c (classify_die): Removed.
{
struct loc_block_s *block = libdw_alloc (dbg, struct loc_block_s,
sizeof (struct loc_block_s), 1);
- const unsigned char *data = (const unsigned char *) op->number2;
+ const unsigned char *data = (const unsigned char *) (uintptr_t) op->number2;
Dwarf_Word blength; // Ignored, equal to op->number.
get_uleb128 (blength, data);
block->addr = op;
if (unlikely (dbg == NULL))
goto invalid;
- newloc->number2 = (Dwarf_Word) data; /* start of block inc. len. */
+ /* start of block inc. len. */
+ newloc->number2 = (Dwarf_Word) (uintptr_t) data;
/* XXX Check size. */
get_uleb128 (newloc->number, data); /* Block length. */
if (unlikely ((Dwarf_Word) (end_data - data) < newloc->number))
if (unlikely (data >= end_data))
goto invalid;
- newloc->number2 = (Dwarf_Word) data; /* start of block inc. len. */
+ /* start of block inc. len. */
+ newloc->number2 = (Dwarf_Word) (uintptr_t) data;
size = *data++;
if (unlikely ((Dwarf_Word) (end_data - data) < size))
goto invalid;
case DW_OP_implicit_value:
result->code = DW_AT_const_value;
result->form = DW_FORM_block;
- result->valp = (unsigned char *) op->number2;
+ result->valp = (unsigned char *) (uintptr_t) op->number2;
break;
case DW_OP_GNU_entry_value:
result->code = DW_AT_location;
result->form = DW_FORM_exprloc;
- result->valp = (unsigned char *) op->number2;
+ result->valp = (unsigned char *) (uintptr_t) op->number2;
break;
case DW_OP_GNU_const_type:
result->code = DW_AT_const_value;
result->form = DW_FORM_block1;
- result->valp = (unsigned char *) op->number2;
+ result->valp = (unsigned char *) (uintptr_t) op->number2;
break;
case DW_OP_call2: