X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fbreak-catch-exec.c;h=07417ee499ca2d8cae81457f3340ac28651e2423;hb=8c9ae6df3c244a7a738085ab461cb098df1d46f6;hp=5cb08bde184480bf01fb21f2227deca8f049aed3;hpb=b713485d666a822a9e65c0272c8d7de51baa8b5f;p=binutils-gdb.git diff --git a/gdb/break-catch-exec.c b/gdb/break-catch-exec.c index 5cb08bde184..07417ee499c 100644 --- a/gdb/break-catch-exec.c +++ b/gdb/break-catch-exec.c @@ -34,8 +34,13 @@ 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; @@ -46,7 +51,7 @@ struct exec_catchpoint : public breakpoint 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 @@ -141,7 +146,7 @@ exec_catchpoint::print_mention () const /* 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); @@ -203,9 +208,8 @@ catch_exec_command_1 (const char *arg, int from_tty, if ((*arg != '\0') && !isspace (*arg)) error (_("Junk at end of arguments.")); - std::unique_ptr c (new exec_catchpoint ()); - init_catchpoint (c.get (), gdbarch, temp, cond_string); - c->exec_pathname.reset (); + std::unique_ptr c + (new exec_catchpoint (gdbarch, temp, cond_string)); install_breakpoint (0, std::move (c), 1); }