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.
This commit is contained in:
parent
7d178d6aa5
commit
2bfc0540a2
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 = ¤t_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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user