Correctly save and recall the CFA saved register state.
PR binutils/16252 * dwarf.c (display_debug_frames): Remember the state of the cfa_offset, cfa_reg, ra and cfa_exp field
This commit is contained in:
parent
203e84589f
commit
d71ad7fcb8
|
@ -1,3 +1,9 @@
|
||||||
|
2014-06-09 Romain Chastenet <romain.chastenet@free.fr>
|
||||||
|
|
||||||
|
PR binutils/16252
|
||||||
|
* dwarf.c (display_debug_frames): Remember the state of the
|
||||||
|
cfa_offset, cfa_reg, ra and cfa_exp field
|
||||||
|
|
||||||
2014-06-05 Joel Brobecker <brobecker@adacore.com>
|
2014-06-05 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
|
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
|
||||||
|
|
|
@ -5829,12 +5829,16 @@ display_debug_frames (struct dwarf_section *section,
|
||||||
if (! do_debug_frames_interp)
|
if (! do_debug_frames_interp)
|
||||||
printf (" DW_CFA_remember_state\n");
|
printf (" DW_CFA_remember_state\n");
|
||||||
rs = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk));
|
rs = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk));
|
||||||
|
rs->cfa_offset = fc->cfa_offset;
|
||||||
|
rs->cfa_reg = fc->cfa_reg;
|
||||||
|
rs->ra = fc->ra;
|
||||||
|
rs->cfa_exp = fc->cfa_exp;
|
||||||
rs->ncols = fc->ncols;
|
rs->ncols = fc->ncols;
|
||||||
rs->col_type = (short int *) xcmalloc (rs->ncols,
|
rs->col_type = (short int *) xcmalloc (rs->ncols,
|
||||||
sizeof (short int));
|
sizeof (* rs->col_type));
|
||||||
rs->col_offset = (int *) xcmalloc (rs->ncols, sizeof (int));
|
rs->col_offset = (int *) xcmalloc (rs->ncols, sizeof (* rs->col_offset));
|
||||||
memcpy (rs->col_type, fc->col_type, rs->ncols);
|
memcpy (rs->col_type, fc->col_type, rs->ncols * sizeof (* fc->col_type));
|
||||||
memcpy (rs->col_offset, fc->col_offset, rs->ncols * sizeof (int));
|
memcpy (rs->col_offset, fc->col_offset, rs->ncols * sizeof (* fc->col_offset));
|
||||||
rs->next = remembered_state;
|
rs->next = remembered_state;
|
||||||
remembered_state = rs;
|
remembered_state = rs;
|
||||||
break;
|
break;
|
||||||
|
@ -5846,10 +5850,14 @@ display_debug_frames (struct dwarf_section *section,
|
||||||
if (rs)
|
if (rs)
|
||||||
{
|
{
|
||||||
remembered_state = rs->next;
|
remembered_state = rs->next;
|
||||||
|
fc->cfa_offset = rs->cfa_offset;
|
||||||
|
fc->cfa_reg = rs->cfa_reg;
|
||||||
|
fc->ra = rs->ra;
|
||||||
|
fc->cfa_exp = rs->cfa_exp;
|
||||||
frame_need_space (fc, rs->ncols - 1);
|
frame_need_space (fc, rs->ncols - 1);
|
||||||
memcpy (fc->col_type, rs->col_type, rs->ncols);
|
memcpy (fc->col_type, rs->col_type, rs->ncols * sizeof (* rs->col_type));
|
||||||
memcpy (fc->col_offset, rs->col_offset,
|
memcpy (fc->col_offset, rs->col_offset,
|
||||||
rs->ncols * sizeof (int));
|
rs->ncols * sizeof (* rs->col_offset));
|
||||||
free (rs->col_type);
|
free (rs->col_type);
|
||||||
free (rs->col_offset);
|
free (rs->col_offset);
|
||||||
free (rs);
|
free (rs);
|
||||||
|
|
Loading…
Reference in New Issue