convert to_static_tracepoint_marker_at
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 21:16:51 +0000 (14:16 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:48:01 +0000 (07:48 -0700)
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_marker_at.
* target.h (struct target_ops) <to_static_tracepoint_marker_at>:
Use TARGET_DEFAULT_RETURN.

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

index 51db79ca57a51966a7a1a50c50feac5ab76d8d41..840e15dea2c5b38676f9034cc8a8fc961ae98c0f 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_static_tracepoint_marker_at.
+       * target.h (struct target_ops) <to_static_tracepoint_marker_at>:
+       Use TARGET_DEFAULT_RETURN.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target-delegates.c: Rebuild.
index 0b0659338dc1c22cd60260998733d23df684ccad..2aea888372702962c321ec225860b16528e63f19 100644 (file)
@@ -945,6 +945,19 @@ tdefault_set_permissions (struct target_ops *self)
 {
 }
 
+static int
+delegate_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, struct static_tracepoint_marker *arg2)
+{
+  self = self->beneath;
+  return self->to_static_tracepoint_marker_at (self, arg1, arg2);
+}
+
+static int
+tdefault_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, struct static_tracepoint_marker *arg2)
+{
+  return 0;
+}
+
 static int
 delegate_supports_btrace (struct target_ops *self)
 {
@@ -1121,6 +1134,8 @@ install_delegators (struct target_ops *ops)
     ops->to_get_tib_address = delegate_get_tib_address;
   if (ops->to_set_permissions == NULL)
     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_supports_btrace == NULL)
     ops->to_supports_btrace = delegate_supports_btrace;
 }
@@ -1208,5 +1223,6 @@ install_dummy_methods (struct target_ops *ops)
   ops->to_set_trace_notes = tdefault_set_trace_notes;
   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_supports_btrace = tdefault_supports_btrace;
 }
index 25017acf76190ab09ddc250f75efc4a62cb91a9a..ca7ed5e5a660ecf564364b4ecad6f2c0159d791e 100644 (file)
@@ -710,7 +710,7 @@ update_current_target (void)
       /* Do not inherit to_set_trace_notes.  */
       /* Do not inherit to_get_tib_address.  */
       /* Do not inherit to_set_permissions.  */
-      INHERIT (to_static_tracepoint_marker_at, t);
+      /* Do not inherit to_static_tracepoint_marker_at.  */
       INHERIT (to_static_tracepoint_markers_by_strid, t);
       INHERIT (to_traceframe_info, t);
       INHERIT (to_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_marker_at,
-           (int (*) (struct target_ops *,
-                     CORE_ADDR, struct static_tracepoint_marker *))
-           return_zero);
   de_fault (to_static_tracepoint_markers_by_strid,
            (VEC(static_tracepoint_marker_p) * (*) (struct target_ops *,
                                                    const char *))
index 896b563ab9f25e8534010f40acf8ad8d32b12190..0969a82b2d0f78db8bb02e8180b1c3d83910d754 100644 (file)
@@ -937,7 +937,8 @@ struct target_ops
     /* Look for a static tracepoint marker at ADDR, and fill in MARKER
        with its details.  Return 1 on success, 0 on failure.  */
     int (*to_static_tracepoint_marker_at) (struct target_ops *, CORE_ADDR,
-                                          struct static_tracepoint_marker *marker);
+                                          struct static_tracepoint_marker *marker)
+      TARGET_DEFAULT_RETURN (0);
 
     /* Return a vector of all tracepoints markers string id ID, or all
        markers if ID is NULL.  */
This page took 0.036563 seconds and 4 git commands to generate.