* dwarf2cfi.c: Include "gdb_assert.h".

(frame_state_for): Use gdb_assert to check that fde->cie_ptr is
non-NULL.
(update_context): Do not use __func__.  Add missing ``break''.
(update_context): Do not use __func__.
This commit is contained in:
Andrew Cagney
2002-07-15 16:01:31 +00:00
parent 9364a0ef8a
commit 7c43edc1d2
2 changed files with 25 additions and 21 deletions

View File

@ -1,3 +1,11 @@
2002-07-15 Andrew Cagney <ac131313@redhat.com>
* dwarf2cfi.c: Include "gdb_assert.h".
(frame_state_for): Use gdb_assert to check that fde->cie_ptr is
non-NULL.
(update_context): Do not use __func__. Add missing ``break''.
(update_context): Do not use __func__.
2002-07-15 Elena Zannoni <ezannoni@redhat.com> 2002-07-15 Elena Zannoni <ezannoni@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): Remove variable print_insn * rs6000-tdep.c (rs6000_gdbarch_init): Remove variable print_insn

View File

@ -30,6 +30,7 @@
#include "inferior.h" #include "inferior.h"
#include "regcache.h" #include "regcache.h"
#include "dwarf2cfi.h" #include "dwarf2cfi.h"
#include "gdb_assert.h"
/* Common Information Entry - holds information that is shared among many /* Common Information Entry - holds information that is shared among many
Frame Descriptors. */ Frame Descriptors. */
@ -844,8 +845,8 @@ frame_state_for (struct context *context, struct frame_state *fs)
fs->pc = fde->initial_location; fs->pc = fde->initial_location;
if (fde->cie_ptr) gdb_assert (fde->cie_ptr != NULL);
{
cie = fde->cie_ptr; cie = fde->cie_ptr;
fs->code_align = cie->code_align; fs->code_align = cie->code_align;
@ -858,10 +859,6 @@ frame_state_for (struct context *context, struct frame_state *fs)
cie->data + cie->data_length, context, fs); cie->data + cie->data_length, context, fs);
execute_cfa_program (cie->objfile, fde->data, execute_cfa_program (cie->objfile, fde->data,
fde->data + fde->data_length, context, fs); fde->data + fde->data_length, context, fs);
}
else
internal_error (__FILE__, __LINE__,
"%s(): Internal error: fde->cie_ptr==NULL !", __func__);
} }
static void static void
@ -1349,9 +1346,9 @@ update_context (struct context *context, struct frame_state *fs, int chain)
context->reg[i].how = REG_CTX_SAVED_ADDR; context->reg[i].how = REG_CTX_SAVED_ADDR;
context->reg[i].loc.addr = context->reg[i].loc.addr =
orig_context->reg[fs->regs.reg[i].loc.reg].loc.addr; orig_context->reg[fs->regs.reg[i].loc.reg].loc.addr;
break;
default: default:
internal_error (__FILE__, __LINE__, internal_error (__FILE__, __LINE__, "bad switch");
"%s: unknown register rule", __func__);
} }
break; break;
case REG_SAVED_EXP: case REG_SAVED_EXP:
@ -1368,8 +1365,7 @@ update_context (struct context *context, struct frame_state *fs, int chain)
} }
break; break;
default: default:
internal_error (__FILE__, __LINE__, internal_error (__FILE__, __LINE__, "bad switch");
"%s: unknown register rule", __func__);
} }
get_reg ((char *) &context->ra, context, fs->retaddr_column); get_reg ((char *) &context->ra, context, fs->retaddr_column);
unwind_tmp_obstack_free (); unwind_tmp_obstack_free ();