A breakpoint is really of this type iff its ops pointer points to
CATCH_EXEC_BREAKPOINT_OPS. */
-struct exec_catchpoint : public breakpoint
+struct exec_catchpoint : public catchpoint
{
+ exec_catchpoint (struct gdbarch *gdbarch, bool temp, const char *cond_string)
+ : catchpoint (gdbarch, temp, cond_string)
+ {
+ }
+
int insert_location (struct bp_location *) override;
int remove_location (struct bp_location *,
enum remove_bp_reason reason) override;
CORE_ADDR bp_addr,
const target_waitstatus &ws) override;
enum print_stop_action print_it (const bpstat *bs) const override;
- bool print_one (struct bp_location **) override;
- void print_mention () override;
- void print_recreate (struct ui_file *fp) override;
+ bool print_one (bp_location **) const override;
+ void print_mention () const override;
+ void print_recreate (struct ui_file *fp) const override;
/* Filename of a program whose exec triggered this catchpoint.
This field is only valid immediately after this catchpoint has
}
bool
-exec_catchpoint::print_one (struct bp_location **last_loc)
+exec_catchpoint::print_one (bp_location **last_loc) const
{
struct value_print_options opts;
struct ui_out *uiout = current_uiout;
}
void
-exec_catchpoint::print_mention ()
+exec_catchpoint::print_mention () const
{
gdb_printf (_("Catchpoint %d (exec)"), number);
}
/* Implement the "print_recreate" method for exec catchpoints. */
void
-exec_catchpoint::print_recreate (struct ui_file *fp)
+exec_catchpoint::print_recreate (struct ui_file *fp) const
{
gdb_printf (fp, "catch exec");
print_recreate_thread (fp);
if ((*arg != '\0') && !isspace (*arg))
error (_("Junk at end of arguments."));
- std::unique_ptr<exec_catchpoint> c (new exec_catchpoint ());
- init_catchpoint (c.get (), gdbarch, temp, cond_string);
- c->exec_pathname.reset ();
+ std::unique_ptr<exec_catchpoint> c
+ (new exec_catchpoint (gdbarch, temp, cond_string));
install_breakpoint (0, std::move (c), 1);
}