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

* target.h (struct target_ops)
<to_supports_disable_randomization>: Add argument.
* target.c (find_default_supports_disable_randomization): Add
argument.
(target_supports_disable_randomization): Add argument.
(find_default_supports_disable_randomization): Add 'self'
argument.
* remote.c (extended_remote_supports_disable_randomization): Add
'self' argument.
(remote_supports_disable_randomization): Add 'self' argument.
(extended_remote_create_inferior): Update.
* linux-nat.c (linux_nat_supports_disable_randomization): Add
'self' argument.

gdb/ChangeLog
gdb/linux-nat.c
gdb/remote.c
gdb/target.c
gdb/target.h

index ad04f80843381b7d63b5d2e43a378c5ad0fcdab7..9d11dff96565a3d2cacdfbd28e8bb9654188fe1e 100644 (file)
@@ -1,3 +1,19 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops)
+       <to_supports_disable_randomization>: Add argument.
+       * target.c (find_default_supports_disable_randomization): Add
+       argument.
+       (target_supports_disable_randomization): Add argument.
+       (find_default_supports_disable_randomization): Add 'self'
+       argument.
+       * remote.c (extended_remote_supports_disable_randomization): Add
+       'self' argument.
+       (remote_supports_disable_randomization): Add 'self' argument.
+       (extended_remote_create_inferior): Update.
+       * linux-nat.c (linux_nat_supports_disable_randomization): Add
+       'self' argument.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target.h (struct target_ops)
index 6befbac064cd570b946d211e1a3c8564c9d521c1..ff800a9a6679a17c1c7c2efa3222e36c0f1716c0 100644 (file)
@@ -4572,7 +4572,7 @@ linux_nat_supports_multi_process (struct target_ops *self)
 }
 
 static int
-linux_nat_supports_disable_randomization (void)
+linux_nat_supports_disable_randomization (struct target_ops *self)
 {
 #ifdef HAVE_PERSONALITY
   return 1;
index 77a5166fc3711ee7313dff9681a2ccdbd87eb154..60d505f9b14183dd2acdeb45c6bb2b49cf338c32 100644 (file)
@@ -7834,7 +7834,7 @@ extended_remote_mourn (struct target_ops *ops)
 }
 
 static int
-extended_remote_supports_disable_randomization (void)
+extended_remote_supports_disable_randomization (struct target_ops *self)
 {
   return (remote_protocol_packets[PACKET_QDisableRandomization].support
          == PACKET_ENABLE);
@@ -7940,7 +7940,7 @@ extended_remote_create_inferior (struct target_ops *ops,
     target_async (inferior_event_handler, 0);
 
   /* Disable address space randomization if requested (and supported).  */
-  if (extended_remote_supports_disable_randomization ())
+  if (extended_remote_supports_disable_randomization (ops))
     extended_remote_disable_randomization (disable_randomization);
 
   /* Now restart the remote server.  */
@@ -10231,7 +10231,7 @@ remote_supports_non_stop (struct target_ops *self)
 }
 
 static int
-remote_supports_disable_randomization (void)
+remote_supports_disable_randomization (struct target_ops *self)
 {
   /* Only supported in extended mode.  */
   return 0;
index f65f8befc9008602decec5108cd97fb14aa741bb..26d1074e51ffccdd116a4bd6e8b335811c1d40e5 100644 (file)
@@ -3267,13 +3267,13 @@ target_info_proc (char *args, enum info_proc_what what)
 }
 
 static int
-find_default_supports_disable_randomization (void)
+find_default_supports_disable_randomization (struct target_ops *self)
 {
   struct target_ops *t;
 
   t = find_default_run_target (NULL);
   if (t && t->to_supports_disable_randomization)
-    return (t->to_supports_disable_randomization) ();
+    return (t->to_supports_disable_randomization) (t);
   return 0;
 }
 
@@ -3284,7 +3284,7 @@ target_supports_disable_randomization (void)
 
   for (t = &current_target; t != NULL; t = t->beneath)
     if (t->to_supports_disable_randomization)
-      return t->to_supports_disable_randomization ();
+      return t->to_supports_disable_randomization (t);
 
   return 0;
 }
index a196fe4cd2c6a76695f37e99f59708277f06cfee..c25235badfa5a1b707f6bfb753954b5cb19360ce 100644 (file)
@@ -679,7 +679,7 @@ struct target_ops
     int (*to_supports_enable_disable_tracepoint) (struct target_ops *);
 
     /* Does this target support disabling address space randomization?  */
-    int (*to_supports_disable_randomization) (void);
+    int (*to_supports_disable_randomization) (struct target_ops *);
 
     /* Does this target support the tracenz bytecode for string collection?  */
     int (*to_supports_string_tracing) (void);
This page took 0.039362 seconds and 4 git commands to generate.