+2005-06-14 Nathan Sidwell <nathan@codesourcery.com>
+
+ * unwind-dw2-fde-darwin.c (examine_objects): Fix aliasing in
+ read_encoded_value_with_base call.
+ * unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Likewise.
+ * unwind-dw2-fde.c (_Unwind_Find_FDE): Likewise.
+ * unwind-dw2.c (extract_cie_info): Fix aliasing in
+ read_encoded_value call.
+ (execute_cfa_program, uw_frame_state_for): Likewise.
+
2005-06-13 Roger Sayle <roger@eyesopen.com>
PR rtl-optimization/22053
if (result)
{
int encoding;
+ _Unwind_Ptr func;
bases->tbase = ob->tbase;
bases->dbase = ob->dbase;
encoding = get_fde_encoding (result);
read_encoded_value_with_base (encoding,
base_from_object (encoding, ob),
- result->pc_begin,
- (_Unwind_Ptr *)&bases->func);
+ result->pc_begin, &func);
+ bases->func = (void *) func;
break;
}
}
data->ret = linear_search_fdes (&ob, (fde *) eh_frame, (void *) data->pc);
if (data->ret != NULL)
{
+ _Unwind_Ptr func;
unsigned int encoding = get_fde_encoding (data->ret);
+
read_encoded_value_with_base (encoding,
base_from_cb_data (encoding, data),
- data->ret->pc_begin,
- (_Unwind_Ptr *)&data->func);
+ data->ret->pc_begin, &func);
+ data->func = (void *) func;
}
return 1;
}
if (f)
{
int encoding;
+ _Unwind_Ptr func;
bases->tbase = ob->tbase;
bases->dbase = ob->dbase;
if (ob->s.b.mixed_encoding)
encoding = get_fde_encoding (f);
read_encoded_value_with_base (encoding, base_from_object (encoding, ob),
- f->pc_begin, (_Unwind_Ptr *)&bases->func);
+ f->pc_begin, &func);
+ bases->func = (void *) func;
}
return f;
/* "P" indicates a personality routine in the CIE augmentation. */
else if (aug[0] == 'P')
{
- p = read_encoded_value (context, *p, p + 1,
- (_Unwind_Ptr *) &fs->personality);
+ _Unwind_Ptr personality;
+
+ p = read_encoded_value (context, *p, p + 1, &personality);
+ fs->personality = (_Unwind_Personality_Fn) personality;
aug += 1;
}
else switch (insn)
{
case DW_CFA_set_loc:
- insn_ptr = read_encoded_value (context, fs->fde_encoding,
- insn_ptr, (_Unwind_Ptr *) &fs->pc);
+ {
+ _Unwind_Ptr pc;
+
+ insn_ptr = read_encoded_value (context, fs->fde_encoding,
+ insn_ptr, &pc);
+ fs->pc = (void *) pc;
+ }
break;
case DW_CFA_advance_loc1:
insn = aug + i;
}
if (fs->lsda_encoding != DW_EH_PE_omit)
- aug = read_encoded_value (context, fs->lsda_encoding, aug,
- (_Unwind_Ptr *) &context->lsda);
+ {
+ _Unwind_Ptr lsda;
+
+ aug = read_encoded_value (context, fs->lsda_encoding, aug, &lsda);
+ context->lsda = (void *) lsda;
+ }
/* Then the insns in the FDE up to our target PC. */
if (insn == NULL)