+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.
}
}
-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. */
}
\f
-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);
}
\f
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. */
}
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. */
#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;
}
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));
}
/* 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;
(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))
}
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));
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);
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