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;
enum print_stop_action print_it (const bpstat *bs) const override;
bool print_one (bp_location **) const override;
void print_mention () const override;
- void print_recreate (struct ui_file *fp) 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
/* 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);
}