Add target_ops argument to to_post_startup_inferior
2014-02-19 Tom Tromey <tromey@redhat.com> * target.h (struct target_ops) <to_post_startup_inferior>: Add argument. (target_post_startup_inferior): Add argument. * target.c (debug_to_post_startup_inferior): Add argument. (update_current_target): Update. * spu-linux-nat.c (spu_child_post_startup_inferior): Add 'self' argument. * linux-nat.c (linux_child_post_startup_inferior): Add 'self' argument. * inf-ptrace.c (inf_ptrace_post_startup_inferior): Add 'self' argument. * inf-child.c (inf_child_post_startup_inferior): Add 'self' argument. * i386-linux-nat.c (i386_linux_child_post_startup_inferior): Add 'self' argument. (super_post_startup_inferior): Likewise. * amd64-linux-nat.c (amd64_linux_child_post_startup_inferior): Add 'self' argument. (super_post_startup_inferior): Likewise. * aarch64-linux-nat.c (aarch64_linux_child_post_startup_inferior): Add 'self' argument. (super_post_startup_inferior): Likewise.
This commit is contained in:
parent
71a9f134da
commit
2e97a79e22
10 changed files with 47 additions and 18 deletions
|
@ -1,3 +1,28 @@
|
|||
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* target.h (struct target_ops) <to_post_startup_inferior>: Add
|
||||
argument.
|
||||
(target_post_startup_inferior): Add argument.
|
||||
* target.c (debug_to_post_startup_inferior): Add argument.
|
||||
(update_current_target): Update.
|
||||
* spu-linux-nat.c (spu_child_post_startup_inferior): Add 'self'
|
||||
argument.
|
||||
* linux-nat.c (linux_child_post_startup_inferior): Add 'self'
|
||||
argument.
|
||||
* inf-ptrace.c (inf_ptrace_post_startup_inferior): Add 'self'
|
||||
argument.
|
||||
* inf-child.c (inf_child_post_startup_inferior): Add 'self'
|
||||
argument.
|
||||
* i386-linux-nat.c (i386_linux_child_post_startup_inferior): Add
|
||||
'self' argument.
|
||||
(super_post_startup_inferior): Likewise.
|
||||
* amd64-linux-nat.c (amd64_linux_child_post_startup_inferior): Add
|
||||
'self' argument.
|
||||
(super_post_startup_inferior): Likewise.
|
||||
* aarch64-linux-nat.c (aarch64_linux_child_post_startup_inferior):
|
||||
Add 'self' argument.
|
||||
(super_post_startup_inferior): Likewise.
|
||||
|
||||
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* target.h (struct target_ops) <to_load>: Add argument.
|
||||
|
|
|
@ -828,16 +828,18 @@ aarch64_linux_get_debug_reg_capacity (void)
|
|||
}
|
||||
}
|
||||
|
||||
static void (*super_post_startup_inferior) (ptid_t ptid);
|
||||
static void (*super_post_startup_inferior) (struct target_ops *self,
|
||||
ptid_t ptid);
|
||||
|
||||
/* Implement the "to_post_startup_inferior" target_ops method. */
|
||||
|
||||
static void
|
||||
aarch64_linux_child_post_startup_inferior (ptid_t ptid)
|
||||
aarch64_linux_child_post_startup_inferior (struct target_ops *self,
|
||||
ptid_t ptid)
|
||||
{
|
||||
aarch64_forget_process (ptid_get_pid (ptid));
|
||||
aarch64_linux_get_debug_reg_capacity ();
|
||||
super_post_startup_inferior (ptid);
|
||||
super_post_startup_inferior (self, ptid);
|
||||
}
|
||||
|
||||
/* Implement the "to_read_description" target_ops method. */
|
||||
|
|
|
@ -568,13 +568,14 @@ ps_get_thread_area (const struct ps_prochandle *ph,
|
|||
}
|
||||
|
||||
|
||||
static void (*super_post_startup_inferior) (ptid_t ptid);
|
||||
static void (*super_post_startup_inferior) (struct target_ops *self,
|
||||
ptid_t ptid);
|
||||
|
||||
static void
|
||||
amd64_linux_child_post_startup_inferior (ptid_t ptid)
|
||||
amd64_linux_child_post_startup_inferior (struct target_ops *self, ptid_t ptid)
|
||||
{
|
||||
i386_cleanup_dregs ();
|
||||
super_post_startup_inferior (ptid);
|
||||
super_post_startup_inferior (self, ptid);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -982,13 +982,14 @@ i386_linux_resume (struct target_ops *ops,
|
|||
perror_with_name (("ptrace"));
|
||||
}
|
||||
|
||||
static void (*super_post_startup_inferior) (ptid_t ptid);
|
||||
static void (*super_post_startup_inferior) (struct target_ops *self,
|
||||
ptid_t ptid);
|
||||
|
||||
static void
|
||||
i386_linux_child_post_startup_inferior (ptid_t ptid)
|
||||
i386_linux_child_post_startup_inferior (struct target_ops *self, ptid_t ptid)
|
||||
{
|
||||
i386_cleanup_dregs ();
|
||||
super_post_startup_inferior (ptid);
|
||||
super_post_startup_inferior (self, ptid);
|
||||
}
|
||||
|
||||
/* Get Linux/x86 target description from running target. */
|
||||
|
|
|
@ -112,7 +112,7 @@ inf_child_open (char *arg, int from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
inf_child_post_startup_inferior (ptid_t ptid)
|
||||
inf_child_post_startup_inferior (struct target_ops *self, ptid_t ptid)
|
||||
{
|
||||
/* This version of Unix doesn't require a meaningful "post startup
|
||||
inferior" operation by a debugger. */
|
||||
|
|
|
@ -147,7 +147,7 @@ inf_ptrace_create_inferior (struct target_ops *ops,
|
|||
#ifdef PT_GET_PROCESS_STATE
|
||||
|
||||
static void
|
||||
inf_ptrace_post_startup_inferior (ptid_t pid)
|
||||
inf_ptrace_post_startup_inferior (struct target_ops *self, ptid_t pid)
|
||||
{
|
||||
ptrace_event_t pe;
|
||||
|
||||
|
|
|
@ -335,7 +335,7 @@ linux_child_post_attach (struct target_ops *self, int pid)
|
|||
}
|
||||
|
||||
static void
|
||||
linux_child_post_startup_inferior (ptid_t ptid)
|
||||
linux_child_post_startup_inferior (struct target_ops *self, ptid_t ptid)
|
||||
{
|
||||
linux_init_ptrace (ptid_get_pid (ptid));
|
||||
}
|
||||
|
|
|
@ -401,7 +401,7 @@ spu_symbol_file_add_from_memory (int inferior_fd)
|
|||
/* Override the post_startup_inferior routine to continue running
|
||||
the inferior until the first spu_run system call. */
|
||||
static void
|
||||
spu_child_post_startup_inferior (ptid_t ptid)
|
||||
spu_child_post_startup_inferior (struct target_ops *self, ptid_t ptid)
|
||||
{
|
||||
int fd;
|
||||
ULONGEST addr;
|
||||
|
|
|
@ -789,7 +789,7 @@ update_current_target (void)
|
|||
(void (*) (struct target_ops *, char *, int))
|
||||
tcomplain);
|
||||
de_fault (to_post_startup_inferior,
|
||||
(void (*) (ptid_t))
|
||||
(void (*) (struct target_ops *, ptid_t))
|
||||
target_ignore);
|
||||
de_fault (to_insert_fork_catchpoint,
|
||||
(int (*) (int))
|
||||
|
@ -4857,9 +4857,9 @@ debug_to_load (struct target_ops *self, char *args, int from_tty)
|
|||
}
|
||||
|
||||
static void
|
||||
debug_to_post_startup_inferior (ptid_t ptid)
|
||||
debug_to_post_startup_inferior (struct target_ops *self, ptid_t ptid)
|
||||
{
|
||||
debug_target.to_post_startup_inferior (ptid);
|
||||
debug_target.to_post_startup_inferior (&debug_target, ptid);
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n",
|
||||
ptid_get_pid (ptid));
|
||||
|
|
|
@ -497,7 +497,7 @@ struct target_ops
|
|||
void (*to_load) (struct target_ops *, char *, int);
|
||||
void (*to_create_inferior) (struct target_ops *,
|
||||
char *, char *, char **, int);
|
||||
void (*to_post_startup_inferior) (ptid_t);
|
||||
void (*to_post_startup_inferior) (struct target_ops *, ptid_t);
|
||||
int (*to_insert_fork_catchpoint) (int);
|
||||
int (*to_remove_fork_catchpoint) (int);
|
||||
int (*to_insert_vfork_catchpoint) (int);
|
||||
|
@ -1298,7 +1298,7 @@ void target_create_inferior (char *exec_file, char *args,
|
|||
Such targets will supply an appropriate definition for this function. */
|
||||
|
||||
#define target_post_startup_inferior(ptid) \
|
||||
(*current_target.to_post_startup_inferior) (ptid)
|
||||
(*current_target.to_post_startup_inferior) (¤t_target, ptid)
|
||||
|
||||
/* On some targets, we can catch an inferior fork or vfork event when
|
||||
it occurs. These functions insert/remove an already-created
|
||||
|
|
Loading…
Add table
Reference in a new issue