aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:37:32 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:46:07 -0700
commit2bfc0540a2dd04b011509c9cd8d0db695f7cc115 (patch)
tree14cfb0a291a9fa5b0bc74e9f069924a8bec35097
parent7d178d6aa5a0f88080be7a0b7ebc03fc8b6262fc (diff)
downloadgdb-2bfc0540a2dd04b011509c9cd8d0db695f7cc115.zip
gdb-2bfc0540a2dd04b011509c9cd8d0db695f7cc115.tar.gz
gdb-2bfc0540a2dd04b011509c9cd8d0db695f7cc115.tar.bz2
Add target_ops argument to to_supports_disable_randomization
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.
-rw-r--r--gdb/ChangeLog16
-rw-r--r--gdb/linux-nat.c2
-rw-r--r--gdb/remote.c6
-rw-r--r--gdb/target.c6
-rw-r--r--gdb/target.h2
5 files changed, 24 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ad04f80..9d11dff 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,6 +1,22 @@
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)
<to_supports_enable_disable_tracepoint>: Add argument.
(target_supports_enable_disable_tracepoint): Add argument.
* target.c (update_current_target): Update.
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 6befbac..ff800a9 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -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;
diff --git a/gdb/remote.c b/gdb/remote.c
index 77a5166..60d505f 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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;
diff --git a/gdb/target.c b/gdb/target.c
index f65f8be..26d1074 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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;
}
diff --git a/gdb/target.h b/gdb/target.h
index a196fe4..c25235b 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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);