]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
convert to_set_permissions
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 21:16:24 +0000 (14:16 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:48:00 +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_set_permissions.
* target.h (struct target_ops) <to_set_permissions>: Use
TARGET_DEFAULT_IGNORE.

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

index 782b46a4b165b9559ae25187c686d17431f189dd..51db79ca57a51966a7a1a50c50feac5ab76d8d41 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_set_permissions.
+       * target.h (struct target_ops) <to_set_permissions>: Use
+       TARGET_DEFAULT_IGNORE.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target-delegates.c: Rebuild.
index ba89740a73072f8a7ec913ed86b77df4cee1e799..0b0659338dc1c22cd60260998733d23df684ccad 100644 (file)
@@ -933,6 +933,18 @@ tdefault_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2)
   tcomplain ();
 }
 
+static void
+delegate_set_permissions (struct target_ops *self)
+{
+  self = self->beneath;
+  self->to_set_permissions (self);
+}
+
+static void
+tdefault_set_permissions (struct target_ops *self)
+{
+}
+
 static int
 delegate_supports_btrace (struct target_ops *self)
 {
@@ -1107,6 +1119,8 @@ install_delegators (struct target_ops *ops)
     ops->to_set_trace_notes = delegate_set_trace_notes;
   if (ops->to_get_tib_address == NULL)
     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_supports_btrace == NULL)
     ops->to_supports_btrace = delegate_supports_btrace;
 }
@@ -1193,5 +1207,6 @@ install_dummy_methods (struct target_ops *ops)
   ops->to_set_trace_buffer_size = tdefault_set_trace_buffer_size;
   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_supports_btrace = tdefault_supports_btrace;
 }
index eb6d2bd30fdae25e51c15c2b9b985019d9ee7a51..25017acf76190ab09ddc250f75efc4a62cb91a9a 100644 (file)
@@ -709,7 +709,7 @@ update_current_target (void)
       /* Do not inherit to_set_trace_buffer_size.  */
       /* Do not inherit to_set_trace_notes.  */
       /* Do not inherit to_get_tib_address.  */
-      INHERIT (to_set_permissions, t);
+      /* Do not inherit to_set_permissions.  */
       INHERIT (to_static_tracepoint_marker_at, t);
       INHERIT (to_static_tracepoint_markers_by_strid, t);
       INHERIT (to_traceframe_info, t);
@@ -750,9 +750,6 @@ update_current_target (void)
            (void (*) (struct target_ops *, ptid_t))
            target_ignore);
   current_target.to_read_description = NULL;
-  de_fault (to_set_permissions,
-           (void (*) (struct target_ops *))
-           target_ignore);
   de_fault (to_static_tracepoint_marker_at,
            (int (*) (struct target_ops *,
                      CORE_ADDR, struct static_tracepoint_marker *))
index 7bc6d32c7628729234814acddf412b0b9c391800..896b563ab9f25e8534010f40acf8ad8d32b12190 100644 (file)
@@ -931,7 +931,8 @@ struct target_ops
       TARGET_DEFAULT_NORETURN (tcomplain ());
 
     /* Send the new settings of write permission variables.  */
-    void (*to_set_permissions) (struct target_ops *);
+    void (*to_set_permissions) (struct target_ops *)
+      TARGET_DEFAULT_IGNORE ();
 
     /* Look for a static tracepoint marker at ADDR, and fill in MARKER
        with its details.  Return 1 on success, 0 on failure.  */