Add target_ops argument to to_set_permissions
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:44:20 +0000 (21:44 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:46:36 +0000 (07:46 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target.h (struct target_ops) <to_set_permissions>: Add argument.
(target_set_permissions): Add argument.
* target.c (update_current_target): Update.
* remote.c (remote_set_permissions): Add 'self' argument.
(remote_start_remote): Update.

gdb/ChangeLog
gdb/remote.c
gdb/target.c
gdb/target.h

index 108c750ca66fd8d9bf037c183b0dc69743878598..2b9fa7f3103ca2b29f37bd598e87cf66364d058e 100644 (file)
@@ -1,3 +1,11 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_set_permissions>: Add argument.
+       (target_set_permissions): Add argument.
+       * target.c (update_current_target): Update.
+       * remote.c (remote_set_permissions): Add 'self' argument.
+       (remote_start_remote): Update.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * windows-nat.c (windows_get_tib_address): Add 'self' argument.
index bd420aa16996c663dedb9f033b0772700d462dca..7a62fdc569cb8575f5a74cebd05ae8b4e2c10de7 100644 (file)
@@ -196,7 +196,7 @@ static void show_remote_protocol_packet_cmd (struct ui_file *file,
 static char *write_ptid (char *buf, const char *endbuf, ptid_t ptid);
 static ptid_t read_ptid (char *buf, char **obuf);
 
-static void remote_set_permissions (void);
+static void remote_set_permissions (struct target_ops *self);
 
 struct remote_state;
 static int remote_get_trace_status (struct target_ops *self,
@@ -3357,7 +3357,7 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
 
   /* If the stub wants to get a QAllow, compose one and send it.  */
   if (remote_protocol_packets[PACKET_QAllow].support != PACKET_DISABLE)
-    remote_set_permissions ();
+    remote_set_permissions (target);
 
   /* Next, we possibly activate noack mode.
 
@@ -3757,7 +3757,7 @@ remote_serial_open (char *name)
    permissions.  */
 
 void
-remote_set_permissions (void)
+remote_set_permissions (struct target_ops *self)
 {
   struct remote_state *rs = get_remote_state ();
 
index e020add615b946a3ac8ddc97a860d8d71b39b4c5..2cf7055bb14060e139f346c3a53606f3efe03ee1 100644 (file)
@@ -921,7 +921,7 @@ update_current_target (void)
            (int (*) (struct target_ops *, ptid_t, CORE_ADDR *))
            tcomplain);
   de_fault (to_set_permissions,
-           (void (*) (void))
+           (void (*) (struct target_ops *))
            target_ignore);
   de_fault (to_static_tracepoint_marker_at,
            (int (*) (CORE_ADDR, struct static_tracepoint_marker *))
index d4620f358c62f25df6ed8a06781497cab16f1714..8220d57428fea7f23fd27c37cba07a155efc1327 100644 (file)
@@ -863,7 +863,7 @@ struct target_ops
                               ptid_t ptid, CORE_ADDR *addr);
 
     /* Send the new settings of write permission variables.  */
-    void (*to_set_permissions) (void);
+    void (*to_set_permissions) (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.  */
@@ -1865,7 +1865,7 @@ extern char *target_fileio_read_stralloc (const char *filename);
   (*current_target.to_get_tib_address) (&current_target, (ptid), (addr))
 
 #define target_set_permissions() \
-  (*current_target.to_set_permissions) ()
+  (*current_target.to_set_permissions) (&current_target)
 
 #define target_static_tracepoint_marker_at(addr, marker) \
   (*current_target.to_static_tracepoint_marker_at) (addr, marker)
This page took 0.041278 seconds and 4 git commands to generate.