Add constructor to signal_catchpoint
This adds a constructor to signal_catchpoint and simplifies the caller.
This commit is contained in:
parent
4874f776ca
commit
e02f53e50e
1 changed files with 8 additions and 3 deletions
|
@ -40,6 +40,12 @@
|
||||||
|
|
||||||
struct signal_catchpoint : public breakpoint
|
struct signal_catchpoint : public breakpoint
|
||||||
{
|
{
|
||||||
|
signal_catchpoint (std::vector<gdb_signal> &&sigs, bool catch_all_)
|
||||||
|
: signals_to_be_caught (std::move (sigs)),
|
||||||
|
catch_all (catch_all_)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
int insert_location (struct bp_location *) override;
|
int insert_location (struct bp_location *) override;
|
||||||
int remove_location (struct bp_location *,
|
int remove_location (struct bp_location *,
|
||||||
enum remove_bp_reason reason) override;
|
enum remove_bp_reason reason) override;
|
||||||
|
@ -316,10 +322,9 @@ create_signal_catchpoint (int tempflag, std::vector<gdb_signal> &&filter,
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_current_arch ();
|
struct gdbarch *gdbarch = get_current_arch ();
|
||||||
|
|
||||||
std::unique_ptr<signal_catchpoint> c (new signal_catchpoint ());
|
std::unique_ptr<signal_catchpoint> c
|
||||||
|
(new signal_catchpoint (std::move (filter), catch_all));
|
||||||
init_catchpoint (c.get (), gdbarch, tempflag, nullptr);
|
init_catchpoint (c.get (), gdbarch, tempflag, nullptr);
|
||||||
c->signals_to_be_caught = std::move (filter);
|
|
||||||
c->catch_all = catch_all;
|
|
||||||
|
|
||||||
install_breakpoint (0, std::move (c), 1);
|
install_breakpoint (0, std::move (c), 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue