more making TRY/CATCH callers look more like real C++ try/catch blocks

All these were caught by actually making TRY/CATCH use try/catch
behind the scenes, which then resulted in the build failing (on x86_64
Fedora 20) because there was code between the try and catch blocks.

gdb/ChangeLog:
2015-03-07  Pedro Alves  <palves@redhat.com>

	* breakpoint.c (save_breakpoints): Adjust to avoid code between
	TRY and CATCH.
	* gdbtypes.c (safe_parse_type): Remove empty line.
	(types_deeply_equal):
	* guile/scm-frame.c (gdbscm_frame_name):
	* linux-thread-db.c (find_new_threads_once):
	* python/py-breakpoint.c (bppy_get_commands):
	* record-btrace.c (record_btrace_insert_breakpoint)
	(record_btrace_remove_breakpoint, record_btrace_start_replaying)
	(record_btrace_start_replaying): Adjust to avoid code between TRY
	and CATCH.
This commit is contained in:
Pedro Alves
2015-03-07 14:50:05 +00:00
parent 492d29ea1c
commit 6c63c96a22
7 changed files with 52 additions and 33 deletions

View File

@@ -1155,14 +1155,13 @@ record_btrace_insert_breakpoint (struct target_ops *ops,
{
ret = ops->beneath->to_insert_breakpoint (ops->beneath, gdbarch, bp_tgt);
}
replay_memory_access = old;
CATCH (except, RETURN_MASK_ALL)
{
replay_memory_access = old;
throw_exception (except);
}
END_CATCH
replay_memory_access = old;
return ret;
}
@@ -1187,14 +1186,13 @@ record_btrace_remove_breakpoint (struct target_ops *ops,
{
ret = ops->beneath->to_remove_breakpoint (ops->beneath, gdbarch, bp_tgt);
}
replay_memory_access = old;
CATCH (except, RETURN_MASK_ALL)
{
replay_memory_access = old;
throw_exception (except);
}
END_CATCH
replay_memory_access = old;
return ret;
}
@@ -1706,12 +1704,11 @@ record_btrace_start_replaying (struct thread_info *tp)
if (upd_step_stack_frame_id)
tp->control.step_stack_frame_id = frame_id;
}
/* Restore the previous execution state. */
set_executing (tp->ptid, executing);
CATCH (except, RETURN_MASK_ALL)
{
/* Restore the previous execution state. */
set_executing (tp->ptid, executing);
xfree (btinfo->replay);
btinfo->replay = NULL;
@@ -1721,6 +1718,9 @@ record_btrace_start_replaying (struct thread_info *tp)
}
END_CATCH
/* Restore the previous execution state. */
set_executing (tp->ptid, executing);
return replay;
}