* dwarf2-frame.c (execute_cfa_program): Complain if we encounter a

DW_CFA_restore state without a matching DW_CFA_remember_state
instead of aborting.  Fixes PR backtrace/1589.
This commit is contained in:
Mark Kettenis 2004-05-01 09:52:47 +00:00
parent 9a5d7be1ec
commit 50ea776902
2 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2004-05-01 Mark Kettenis <kettenis@gnu.org>
* dwarf2-frame.c (execute_cfa_program): Complain if we encounter a
DW_CFA_restore state without a matching DW_CFA_remember_state
instead of aborting. Fixes PR backtrace/1589.
2004-04-30 Joel Brobecker <brobecker@gnat.com>
* MAINTAINERS: Add self as AIX maintainer.

View File

@ -372,12 +372,18 @@ execute_cfa_program (unsigned char *insn_ptr, unsigned char *insn_end,
{
struct dwarf2_frame_state_reg_info *old_rs = fs->regs.prev;
gdb_assert (old_rs);
if (old_rs == NULL)
{
complaint (&symfile_complaints, "\
bad CFI data; mismatched DW_CFA_restore_state at 0x%s", paddr (fs->pc));
}
else
{
xfree (fs->regs.reg);
fs->regs = *old_rs;
xfree (old_rs);
}
}
break;
case DW_CFA_def_cfa: