2014-02-19 Tom Tromey <tromey@redhat.com>
+ * target.h (struct target_ops) <to_post_attach>: Add argument.
+ (target_post_attach): Add argument.
+ * target.c (debug_to_post_attach): Add argument.
+ (update_current_target): Update.
+ * spu-linux-nat.c (spu_child_post_attach): Add 'self' argument.
+ * nto-procfs.c (procfs_post_attach): Add 'self' argument.
+ * linux-nat.c (linux_child_post_attach): Add 'self' argument.
+ * inf-ptrace.c (inf_ptrace_post_attach): Add 'self' argument.
+ * inf-child.c (inf_child_post_attach): Add 'self' argument.
+
+2014-02-19 Tom Tromey <tromey@redhat.com>
+
* windows-nat.c (windows_close): Add 'self' argument.
* tracepoint.c (tfile_close): Add 'self' argument.
* target.h (struct target_ops) <to_close>: Add argument.
}
static void
-inf_child_post_attach (int pid)
+inf_child_post_attach (struct target_ops *self, int pid)
{
/* This version of Unix doesn't require a meaningful "post attach"
operation by a debugger. */
#ifdef PT_GET_PROCESS_STATE
static void
-inf_ptrace_post_attach (int pid)
+inf_ptrace_post_attach (struct target_ops *self, int pid)
{
ptrace_event_t pe;
}
static void
-linux_child_post_attach (int pid)
+linux_child_post_attach (struct target_ops *self, int pid)
{
linux_init_ptrace (pid);
}
}
static void
-procfs_post_attach (pid_t pid)
+procfs_post_attach (struct target_ops *self, pid_t pid)
{
if (exec_bfd)
solib_create_inferior_hook (0);
/* Override the post_attach routine to try load the SPE executable
file image from its copy inside the target process. */
static void
-spu_child_post_attach (int pid)
+spu_child_post_attach (struct target_ops *self, int pid)
{
int fd;
ULONGEST addr;
(void (*) (struct target_ops *))
target_ignore);
de_fault (to_post_attach,
- (void (*) (int))
+ (void (*) (struct target_ops *, int))
target_ignore);
de_fault (to_prepare_to_store,
(void (*) (struct target_ops *, struct regcache *))
}
static void
-debug_to_post_attach (int pid)
+debug_to_post_attach (struct target_ops *self, int pid)
{
- debug_target.to_post_attach (pid);
+ debug_target.to_post_attach (&debug_target, pid);
fprintf_unfiltered (gdb_stdlog, "target_post_attach (%d)\n", pid);
}
void (*to_xclose) (struct target_ops *targ);
void (*to_close) (struct target_ops *);
void (*to_attach) (struct target_ops *ops, char *, int);
- void (*to_post_attach) (int);
+ void (*to_post_attach) (struct target_ops *, int);
void (*to_detach) (struct target_ops *ops, const char *, int);
void (*to_disconnect) (struct target_ops *, char *, int);
void (*to_resume) (struct target_ops *, ptid_t, int, enum gdb_signal)
This operation provides a target-specific hook that allows the
necessary bookkeeping to be performed after an attach completes. */
#define target_post_attach(pid) \
- (*current_target.to_post_attach) (pid)
+ (*current_target.to_post_attach) (¤t_target, pid)
/* Takes a program previously attached to and detaches it.
The program may resume execution (some targets do, some don't) and will