CORE_ADDR get_addr_index (unsigned int index) override
{
- invalid ("DW_OP_GNU_addr_index");
+ invalid ("DW_OP_addrx or DW_OP_GNU_addr_index");
}
private:
execute_cfa_program (fde, instr, fde->end, gdbarch,
get_frame_address_in_block (this_frame), &fs);
- TRY
+ try
{
/* Calculate the CFA. */
switch (fs.regs.cfa_how)
internal_error (__FILE__, __LINE__, _("Unknown CFA rule."));
}
}
- CATCH (ex, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &ex)
{
if (ex.error == NOT_AVAILABLE_ERROR)
{
return cache;
}
- throw_exception (ex);
+ throw;
}
- END_CATCH
/* Initialize the register state. */
{
read_initial_length (bfd *abfd, const gdb_byte *buf,
unsigned int *bytes_read_ptr)
{
- LONGEST result;
+ ULONGEST result;
result = bfd_get_32 (abfd, buf);
if (result == 0xffffffff)
{
struct gdbarch *gdbarch = get_objfile_arch (unit->objfile);
const gdb_byte *buf, *end;
- LONGEST length;
+ ULONGEST length;
unsigned int bytes_read;
int dwarf64_p;
ULONGEST cie_id;
buf = start;
length = read_initial_length (unit->abfd, buf, &bytes_read);
buf += bytes_read;
- end = buf + length;
-
- /* Are we still within the section? */
- if (end > unit->dwarf_frame_buffer + unit->dwarf_frame_size)
- return NULL;
+ end = buf + (size_t) length;
if (length == 0)
return end;
+ /* Are we still within the section? */
+ if (end <= buf || end > unit->dwarf_frame_buffer + unit->dwarf_frame_size)
+ return NULL;
+
/* Distinguish between 32 and 64-bit encoded frame info. */
dwarf64_p = (bytes_read == 12);
if (txt)
unit->tbase = txt->vma;
- TRY
+ try
{
frame_ptr = unit->dwarf_frame_buffer;
while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
EH_CIE_OR_FDE_TYPE_ID);
}
- CATCH (e, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &e)
{
warning (_("skipping .eh_frame info of %s: %s"),
objfile_name (objfile), e.what ());
}
/* The cie_table is discarded by the next if. */
}
- END_CATCH
if (cie_table.num_entries != 0)
{
{
int num_old_fde_entries = fde_table.num_entries;
- TRY
+ try
{
frame_ptr = unit->dwarf_frame_buffer;
while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
&cie_table, &fde_table,
EH_CIE_OR_FDE_TYPE_ID);
}
- CATCH (e, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &e)
{
warning (_("skipping .debug_frame info of %s: %s"),
objfile_name (objfile), e.what ());
fde_table.num_entries = num_old_fde_entries;
/* The cie_table is discarded by the next if. */
}
- END_CATCH
}
/* Discard the cie_table, it is no longer needed. */