aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2-frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r--gdb/dwarf2-frame.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index b648aa3..8fb2ac7 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -1025,7 +1025,6 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
struct dwarf2_frame_cache *cache;
struct dwarf2_frame_state *fs;
struct dwarf2_fde *fde;
- volatile struct gdb_exception ex;
CORE_ADDR entry_pc;
const gdb_byte *instr;
@@ -1102,7 +1101,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
execute_cfa_program (fde, instr, fde->end, gdbarch,
get_frame_address_in_block (this_frame), fs);
- TRY_CATCH (ex, RETURN_MASK_ERROR)
+ TRY
{
/* Calculate the CFA. */
switch (fs->regs.cfa_how)
@@ -1126,7 +1125,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
internal_error (__FILE__, __LINE__, _("Unknown CFA rule."));
}
}
- if (ex.reason < 0)
+ CATCH (ex, RETURN_MASK_ERROR)
{
if (ex.error == NOT_AVAILABLE_ERROR)
{
@@ -1138,6 +1137,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
throw_exception (ex);
}
+ END_CATCH
/* Initialize the register state. */
{
@@ -2269,7 +2269,6 @@ dwarf2_build_frame_info (struct objfile *objfile)
struct dwarf2_cie_table cie_table;
struct dwarf2_fde_table fde_table;
struct dwarf2_fde_table *fde_table2;
- volatile struct gdb_exception e;
cie_table.num_entries = 0;
cie_table.entries = NULL;
@@ -2311,7 +2310,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
if (txt)
unit->tbase = txt->vma;
- TRY_CATCH (e, RETURN_MASK_ERROR)
+ TRY
{
frame_ptr = unit->dwarf_frame_buffer;
while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
@@ -2320,7 +2319,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
EH_CIE_OR_FDE_TYPE_ID);
}
- if (e.reason < 0)
+ CATCH (e, RETURN_MASK_ERROR)
{
warning (_("skipping .eh_frame info of %s: %s"),
objfile_name (objfile), e.message);
@@ -2333,6 +2332,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
}
/* The cie_table is discarded by the next if. */
}
+ END_CATCH
if (cie_table.num_entries != 0)
{
@@ -2352,7 +2352,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
{
int num_old_fde_entries = fde_table.num_entries;
- TRY_CATCH (e, RETURN_MASK_ERROR)
+ TRY
{
frame_ptr = unit->dwarf_frame_buffer;
while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size)
@@ -2360,7 +2360,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
&cie_table, &fde_table,
EH_CIE_OR_FDE_TYPE_ID);
}
- if (e.reason < 0)
+ CATCH (e, RETURN_MASK_ERROR)
{
warning (_("skipping .debug_frame info of %s: %s"),
objfile_name (objfile), e.message);
@@ -2383,6 +2383,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
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. */