aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog25
-rw-r--r--gdb/aarch64-linux-nat.c8
-rw-r--r--gdb/amd64-linux-nat.c7
-rw-r--r--gdb/i386-linux-nat.c7
-rw-r--r--gdb/inf-child.c2
-rw-r--r--gdb/inf-ptrace.c2
-rw-r--r--gdb/linux-nat.c2
-rw-r--r--gdb/spu-linux-nat.c2
-rw-r--r--gdb/target.c6
-rw-r--r--gdb/target.h4
10 files changed, 47 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3db2aa6..87f2d46 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,30 @@
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.
* target.c (target_load): Add argument.
(debug_to_load): Add argument.
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index c6437fe..28ad38b 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -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. */
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index 55973a6..af84142 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -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);
}
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index fdf5dee..f7be40c 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -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. */
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index c142912..7726470 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -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. */
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index ac4d2a4..048b158 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -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;
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 24cb1b9..0728939 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -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));
}
diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c
index d80b78c..4841bbe 100644
--- a/gdb/spu-linux-nat.c
+++ b/gdb/spu-linux-nat.c
@@ -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;
diff --git a/gdb/target.c b/gdb/target.c
index b1ad4db..699b55e 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -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));
diff --git a/gdb/target.h b/gdb/target.h
index 60e0e16..433925e 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -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) (&current_target, ptid)
/* On some targets, we can catch an inferior fork or vfork event when
it occurs. These functions insert/remove an already-created