DW_CFA_restore state without a matching DW_CFA_remember_state
instead of aborting. Fixes PR backtrace/1589.
+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.
{
struct dwarf2_frame_state_reg_info *old_rs = fs->regs.prev;
- gdb_assert (old_rs);
-
- xfree (fs->regs.reg);
- fs->regs = *old_rs;
- xfree (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;