convert to_trace_stop
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 21:07:28 +0000 (14:07 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:47:50 +0000 (07:47 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target-delegates.c: Rebuild.
* target.c (update_current_target): Don't inherit or default
to_trace_stop.
* target.h (struct target_ops) <to_trace_stop>: Use
TARGET_DEFAULT_NORETURN.

gdb/ChangeLog
gdb/target-delegates.c
gdb/target.c
gdb/target.h

index 9c294de..a8c76c8 100644 (file)
@@ -2,6 +2,14 @@
 
        * target-delegates.c: Rebuild.
        * target.c (update_current_target): Don't inherit or default
+       to_trace_stop.
+       * target.h (struct target_ops) <to_trace_stop>: Use
+       TARGET_DEFAULT_NORETURN.
+
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target-delegates.c: Rebuild.
+       * target.c (update_current_target): Don't inherit or default
        to_get_tracepoint_status.
        * target.h (struct target_ops) <to_get_tracepoint_status>: Use
        TARGET_DEFAULT_NORETURN.
index 898ee44..62fda4c 100644 (file)
@@ -767,6 +767,19 @@ tdefault_get_tracepoint_status (struct target_ops *self, struct breakpoint *arg1
   tcomplain ();
 }
 
+static void
+delegate_trace_stop (struct target_ops *self)
+{
+  self = self->beneath;
+  self->to_trace_stop (self);
+}
+
+static void
+tdefault_trace_stop (struct target_ops *self)
+{
+  tcomplain ();
+}
+
 static int
 delegate_supports_btrace (struct target_ops *self)
 {
@@ -915,6 +928,8 @@ install_delegators (struct target_ops *ops)
     ops->to_get_trace_status = delegate_get_trace_status;
   if (ops->to_get_tracepoint_status == NULL)
     ops->to_get_tracepoint_status = delegate_get_tracepoint_status;
+  if (ops->to_trace_stop == NULL)
+    ops->to_trace_stop = delegate_trace_stop;
   if (ops->to_supports_btrace == NULL)
     ops->to_supports_btrace = delegate_supports_btrace;
 }
@@ -988,5 +1003,6 @@ install_dummy_methods (struct target_ops *ops)
   ops->to_trace_start = tdefault_trace_start;
   ops->to_get_trace_status = tdefault_get_trace_status;
   ops->to_get_tracepoint_status = tdefault_get_tracepoint_status;
+  ops->to_trace_stop = tdefault_trace_stop;
   ops->to_supports_btrace = tdefault_supports_btrace;
 }
index 6da6cf8..02981e2 100644 (file)
@@ -698,7 +698,7 @@ update_current_target (void)
       /* Do not inherit to_trace_start.  */
       /* Do not inherit to_get_trace_status.  */
       /* Do not inherit to_get_tracepoint_status.  */
-      INHERIT (to_trace_stop, t);
+      /* Do not inherit to_trace_stop.  */
       INHERIT (to_trace_find, t);
       INHERIT (to_get_trace_state_variable_value, t);
       INHERIT (to_save_trace_data, t);
@@ -752,9 +752,6 @@ update_current_target (void)
            (void (*) (struct target_ops *, ptid_t))
            target_ignore);
   current_target.to_read_description = NULL;
-  de_fault (to_trace_stop,
-           (void (*) (struct target_ops *))
-           tcomplain);
   de_fault (to_trace_find,
            (int (*) (struct target_ops *,
                      enum trace_find_type, int, CORE_ADDR, CORE_ADDR, int *))
index 2caa891..ad644a5 100644 (file)
@@ -849,7 +849,8 @@ struct target_ops
       TARGET_DEFAULT_NORETURN (tcomplain ());
 
     /* Stop a trace run.  */
-    void (*to_trace_stop) (struct target_ops *);
+    void (*to_trace_stop) (struct target_ops *)
+      TARGET_DEFAULT_NORETURN (tcomplain ());
 
    /* Ask the target to find a trace frame of the given type TYPE,
       using NUM, ADDR1, and ADDR2 as search parameters.  Returns the