gdb/arm: Unwind Non-Secure callbacks from Secure
[binutils-gdb.git] / gdb / break-catch-exec.c
index 5cb08bde184480bf01fb21f2227deca8f049aed3..07417ee499ca2d8cae81457f3340ac28651e2423 100644 (file)
    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<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);
 }