convert to_get_raw_trace_data
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 21:11:12 +0000 (14:11 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:47:55 +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_get_raw_trace_data.
* target.h (struct target_ops) <to_get_raw_trace_data>: Use
TARGET_DEFAULT_NORETURN.

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

index 056e56bb59832e12145cb831097fd5b98b4fa0f3..d560ad6419b113cf4ebde1038f0300e3b1eee101 100644 (file)
@@ -1,3 +1,11 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target-delegates.c: Rebuild.
+       * target.c (update_current_target): Don't inherit or default
+       to_get_raw_trace_data.
+       * target.h (struct target_ops) <to_get_raw_trace_data>: Use
+       TARGET_DEFAULT_NORETURN.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target-delegates.c: Rebuild.
index 4d5ca9916c486e4dad3985f578bafe46a4cabe1c..cdf29053d041a44491d8ef5468836ee8798c0b0a 100644 (file)
@@ -845,6 +845,19 @@ tdefault_upload_trace_state_variables (struct target_ops *self, struct uploaded_
   return 0;
 }
 
+static LONGEST
+delegate_get_raw_trace_data (struct target_ops *self, gdb_byte *arg1, ULONGEST arg2, LONGEST arg3)
+{
+  self = self->beneath;
+  return self->to_get_raw_trace_data (self, arg1, arg2, arg3);
+}
+
+static LONGEST
+tdefault_get_raw_trace_data (struct target_ops *self, gdb_byte *arg1, ULONGEST arg2, LONGEST arg3)
+{
+  tcomplain ();
+}
+
 static int
 delegate_supports_btrace (struct target_ops *self)
 {
@@ -1005,6 +1018,8 @@ install_delegators (struct target_ops *ops)
     ops->to_upload_tracepoints = delegate_upload_tracepoints;
   if (ops->to_upload_trace_state_variables == NULL)
     ops->to_upload_trace_state_variables = delegate_upload_trace_state_variables;
+  if (ops->to_get_raw_trace_data == NULL)
+    ops->to_get_raw_trace_data = delegate_get_raw_trace_data;
   if (ops->to_supports_btrace == NULL)
     ops->to_supports_btrace = delegate_supports_btrace;
 }
@@ -1084,5 +1099,6 @@ install_dummy_methods (struct target_ops *ops)
   ops->to_save_trace_data = tdefault_save_trace_data;
   ops->to_upload_tracepoints = tdefault_upload_tracepoints;
   ops->to_upload_trace_state_variables = tdefault_upload_trace_state_variables;
+  ops->to_get_raw_trace_data = tdefault_get_raw_trace_data;
   ops->to_supports_btrace = tdefault_supports_btrace;
 }
index 38d8ddae01b691db93ac0350e134bedcdbf3132d..8caa720d5b458de58f050f5870bfcadbc06f7c83 100644 (file)
@@ -704,7 +704,7 @@ update_current_target (void)
       /* Do not inherit to_save_trace_data.  */
       /* Do not inherit to_upload_tracepoints.  */
       /* Do not inherit to_upload_trace_state_variables.  */
-      INHERIT (to_get_raw_trace_data, t);
+      /* Do not inherit to_get_raw_trace_data.  */
       INHERIT (to_get_min_fast_tracepoint_insn_len, t);
       INHERIT (to_set_disconnected_tracing, t);
       INHERIT (to_set_circular_trace_buffer, 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_get_raw_trace_data,
-           (LONGEST (*) (struct target_ops *, gdb_byte *, ULONGEST, LONGEST))
-           tcomplain);
   de_fault (to_get_min_fast_tracepoint_insn_len,
            (int (*) (struct target_ops *))
            return_minus_one);
index 11e716c245c385894d8f5e71c5ce025d25ac1c16..9fe5991809b37a2df24e107e41cf5c98051576cc 100644 (file)
@@ -881,7 +881,8 @@ struct target_ops
       TARGET_DEFAULT_RETURN (0);
 
     LONGEST (*to_get_raw_trace_data) (struct target_ops *, gdb_byte *buf,
-                                     ULONGEST offset, LONGEST len);
+                                     ULONGEST offset, LONGEST len)
+      TARGET_DEFAULT_NORETURN (tcomplain ());
 
     /* Get the minimum length of instruction on which a fast tracepoint
        may be set on the target.  If this operation is unsupported,
This page took 0.067367 seconds and 4 git commands to generate.