convert to_static_tracepoint_markers_by_strid
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 21:17:35 +0000 (14:17 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:48:01 +0000 (07:48 -0700)
Note that this patch reformats the
to_static_tracepoint_markers_by_strid field declaration in struct
target_ops.  This was needed because make-target-delegates requires
the opening paren for the parameters to be on the same line as the
method name, and I didn't see an easy way to fix this.

2014-02-19  Tom Tromey  <tromey@redhat.com>

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

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

index 840e15dea2c5b38676f9034cc8a8fc961ae98c0f..535040c071c53a397cb9b4e7dd946b5a7a71c8c0 100644 (file)
@@ -1,3 +1,12 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target-delegates.c: Rebuild.
+       * target.c (update_current_target): Don't inherit or default
+       to_static_tracepoint_markers_by_strid.
+       * target.h (struct target_ops)
+       <to_static_tracepoint_markers_by_strid>: Use
+       TARGET_DEFAULT_NORETURN.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target-delegates.c: Rebuild.
index 2aea888372702962c321ec225860b16528e63f19..b0ada5cc2374e99b5fe1b85cf2b571d024d8ecfe 100644 (file)
@@ -958,6 +958,19 @@ tdefault_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, s
   return 0;
 }
 
+static VEC(static_tracepoint_marker_p) *
+delegate_static_tracepoint_markers_by_strid (struct target_ops *self, const char *arg1)
+{
+  self = self->beneath;
+  return self->to_static_tracepoint_markers_by_strid (self, arg1);
+}
+
+static VEC(static_tracepoint_marker_p) *
+tdefault_static_tracepoint_markers_by_strid (struct target_ops *self, const char *arg1)
+{
+  tcomplain ();
+}
+
 static int
 delegate_supports_btrace (struct target_ops *self)
 {
@@ -1136,6 +1149,8 @@ install_delegators (struct target_ops *ops)
     ops->to_set_permissions = delegate_set_permissions;
   if (ops->to_static_tracepoint_marker_at == NULL)
     ops->to_static_tracepoint_marker_at = delegate_static_tracepoint_marker_at;
+  if (ops->to_static_tracepoint_markers_by_strid == NULL)
+    ops->to_static_tracepoint_markers_by_strid = delegate_static_tracepoint_markers_by_strid;
   if (ops->to_supports_btrace == NULL)
     ops->to_supports_btrace = delegate_supports_btrace;
 }
@@ -1224,5 +1239,6 @@ install_dummy_methods (struct target_ops *ops)
   ops->to_get_tib_address = tdefault_get_tib_address;
   ops->to_set_permissions = tdefault_set_permissions;
   ops->to_static_tracepoint_marker_at = tdefault_static_tracepoint_marker_at;
+  ops->to_static_tracepoint_markers_by_strid = tdefault_static_tracepoint_markers_by_strid;
   ops->to_supports_btrace = tdefault_supports_btrace;
 }
index ca7ed5e5a660ecf564364b4ecad6f2c0159d791e..cd10f2fbb5df3b3cc09c733cee62d30597606242 100644 (file)
@@ -711,7 +711,7 @@ update_current_target (void)
       /* Do not inherit to_get_tib_address.  */
       /* Do not inherit to_set_permissions.  */
       /* Do not inherit to_static_tracepoint_marker_at.  */
-      INHERIT (to_static_tracepoint_markers_by_strid, t);
+      /* Do not inherit to_static_tracepoint_markers_by_strid.  */
       INHERIT (to_traceframe_info, t);
       INHERIT (to_use_agent, t);
       INHERIT (to_can_use_agent, t);
@@ -750,10 +750,6 @@ update_current_target (void)
            (void (*) (struct target_ops *, ptid_t))
            target_ignore);
   current_target.to_read_description = NULL;
-  de_fault (to_static_tracepoint_markers_by_strid,
-           (VEC(static_tracepoint_marker_p) * (*) (struct target_ops *,
-                                                   const char *))
-           tcomplain);
   de_fault (to_traceframe_info,
            (struct traceframe_info * (*) (struct target_ops *))
            return_null);
index 0969a82b2d0f78db8bb02e8180b1c3d83910d754..457479e10207a0a8bf737e151839ad4781a76182 100644 (file)
@@ -942,8 +942,8 @@ struct target_ops
 
     /* Return a vector of all tracepoints markers string id ID, or all
        markers if ID is NULL.  */
-    VEC(static_tracepoint_marker_p) *(*to_static_tracepoint_markers_by_strid)
-      (struct target_ops *, const char *id);
+    VEC(static_tracepoint_marker_p) *(*to_static_tracepoint_markers_by_strid) (struct target_ops *, const char *id)
+      TARGET_DEFAULT_NORETURN (tcomplain ());
 
     /* Return a traceframe info object describing the current
        traceframe's contents.  If the target doesn't support