aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/bsd-uthread.c2
-rw-r--r--gdb/corelow.c2
-rw-r--r--gdb/dummy-frame.c2
-rw-r--r--gdb/infcmd.c8
-rw-r--r--gdb/inferior.h2
-rw-r--r--gdb/infrun.c2
-rw-r--r--gdb/jit.c2
-rw-r--r--gdb/linux-thread-db.c2
-rw-r--r--gdb/m68k-linux-tdep.c2
-rw-r--r--gdb/observable.h3
-rw-r--r--gdb/ravenscar-thread.c2
-rw-r--r--gdb/symfile-mem.c2
-rw-r--r--gdb/tracectf.c2
-rw-r--r--gdb/tracefile-tfile.c2
15 files changed, 24 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9dd2123..8788c60 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * observable.h <inferior_created>: Remove parameters. Update all
+ listeners.
+ * inferior.h (post_create_inferior): Remove target parameter.
+ Update all callers.
+
2020-10-02 Nitika Achra <Nitika.Achra@amd.com>
* dwarf2/macro.c (dwarf_decode_macro_bytes): Handle DW_MACRO_define_strx
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c
index 144e8b9..e83707f 100644
--- a/gdb/bsd-uthread.c
+++ b/gdb/bsd-uthread.c
@@ -263,7 +263,7 @@ bsd_uthread_deactivate (void)
}
static void
-bsd_uthread_inferior_created (struct target_ops *ops, int from_tty)
+bsd_uthread_inferior_created ()
{
bsd_uthread_activate (NULL);
}
diff --git a/gdb/corelow.c b/gdb/corelow.c
index de15895..e82c183 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -516,7 +516,7 @@ core_target_open (const char *arg, int from_tty)
if (exec_bfd == nullptr)
locate_exec_from_corefile_build_id (core_bfd, from_tty);
- post_create_inferior (target, from_tty);
+ post_create_inferior (from_tty);
/* Now go through the target stack looking for threads since there
may be a thread_stratum target loaded on top of target core by
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index d47cfd2..1952d2e 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -273,7 +273,7 @@ find_dummy_frame_dtor (dummy_frame_dtor_ftype *dtor, void *dtor_data)
them up at least once whenever we start a new inferior. */
static void
-cleanup_dummy_frames (struct target_ops *target, int from_tty)
+cleanup_dummy_frames ()
{
while (dummy_frame_stack != NULL)
remove_dummy_frame (&dummy_frame_stack);
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 81ce36d..d8f9597 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -279,7 +279,7 @@ strip_bg_char (const char *args, int *bg_char_p)
should be stopped. */
void
-post_create_inferior (struct target_ops *target, int from_tty)
+post_create_inferior (int from_tty)
{
/* Be sure we own the terminal in case write operations are performed. */
@@ -347,7 +347,7 @@ post_create_inferior (struct target_ops *target, int from_tty)
if the now pushed target supports hardware watchpoints. */
breakpoint_re_set ();
- gdb::observers::inferior_created.notify (target, from_tty);
+ gdb::observers::inferior_created.notify ();
}
/* Kill the inferior if already running. This function is designed
@@ -520,7 +520,7 @@ run_command_1 (const char *args, int from_tty, enum run_how run_how)
/* Pass zero for FROM_TTY, because at this point the "run" command
has done its thing; now we are setting up the running program. */
- post_create_inferior (current_top_target (), 0);
+ post_create_inferior (0);
/* Queue a pending event so that the program stops immediately. */
if (run_how == RUN_STOP_AT_FIRST_INSN)
@@ -2432,7 +2432,7 @@ setup_inferior (int from_tty)
/* Take any necessary post-attaching actions for this platform. */
target_post_attach (inferior_ptid.pid ());
- post_create_inferior (current_top_target (), from_tty);
+ post_create_inferior (from_tty);
}
/* What to do after the first program stops after attaching. */
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 70edf21..d016161 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -196,7 +196,7 @@ extern ptid_t gdb_startup_inferior (pid_t pid, int num_traps);
extern void setup_inferior (int from_tty);
-extern void post_create_inferior (struct target_ops *, int);
+extern void post_create_inferior (int from_tty);
extern void attach_command (const char *, int);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index daf1041..a150585 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3185,7 +3185,7 @@ start_remote (int from_tty)
/* Now that the inferior has stopped, do any bookkeeping like
loading shared libraries. We want to do this before normal_stop,
so that the displayed frame is up to date. */
- post_create_inferior (current_top_target (), from_tty);
+ post_create_inferior (from_tty);
normal_stop ();
}
diff --git a/gdb/jit.c b/gdb/jit.c
index 5634c9e..9298ac0 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -1232,7 +1232,7 @@ jit_inferior_init (struct gdbarch *gdbarch)
/* inferior_created observer. */
static void
-jit_inferior_created (struct target_ops *ops, int from_tty)
+jit_inferior_created ()
{
jit_inferior_created_hook ();
}
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 878e7bd..c625cef 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1310,7 +1310,7 @@ check_pid_namespace_match (void)
This handles the case of debugging statically linked executables. */
static void
-thread_db_inferior_created (struct target_ops *target, int from_tty)
+thread_db_inferior_created ()
{
check_pid_namespace_match ();
check_for_thread_db ();
diff --git a/gdb/m68k-linux-tdep.c b/gdb/m68k-linux-tdep.c
index dcc7e08..e4fc2fa 100644
--- a/gdb/m68k-linux-tdep.c
+++ b/gdb/m68k-linux-tdep.c
@@ -211,7 +211,7 @@ struct m68k_linux_sigtramp_info
static int target_is_uclinux;
static void
-m68k_linux_inferior_created (struct target_ops *objfile, int from_tty)
+m68k_linux_inferior_created ()
{
/* Record that we will need to re-evaluate whether we are running on a
uClinux or normal GNU/Linux target (see m68k_linux_get_sigtramp_info). */
diff --git a/gdb/observable.h b/gdb/observable.h
index da0a9b1..d9d0f14 100644
--- a/gdb/observable.h
+++ b/gdb/observable.h
@@ -87,8 +87,7 @@ extern observable<> executable_changed;
instruction. For 'attach' and 'core', gdb calls this observer
immediately after connecting to the inferior, and before any
information on the inferior has been printed. */
-extern observable<struct target_ops */* target */,
- int /* from_tty */> inferior_created;
+extern observable<> inferior_created;
/* The status of process record for inferior inferior in gdb has
changed. The process record is started if STARTED is true, and
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index cc94ff8..a7c59ad 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -657,7 +657,7 @@ ravenscar_thread_target::xfer_partial (enum target_object object,
/* Observer on inferior_created: push ravenscar thread stratum if needed. */
static void
-ravenscar_inferior_created (struct target_ops *target, int from_tty)
+ravenscar_inferior_created ()
{
const char *err_msg;
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c
index 78096fc..5f212e1 100644
--- a/gdb/symfile-mem.c
+++ b/gdb/symfile-mem.c
@@ -157,7 +157,7 @@ add_symbol_file_from_memory_command (const char *args, int from_tty)
This function is called via the inferior_created observer. */
static void
-add_vsyscall_page (struct target_ops *target, int from_tty)
+add_vsyscall_page ()
{
struct mem_range vsyscall_range;
diff --git a/gdb/tracectf.c b/gdb/tracectf.c
index 2c9a749..0c4f66d 100644
--- a/gdb/tracectf.c
+++ b/gdb/tracectf.c
@@ -1175,7 +1175,7 @@ ctf_target_open (const char *dirname, int from_tty)
merge_uploaded_trace_state_variables (&uploaded_tsvs);
merge_uploaded_tracepoints (&uploaded_tps);
- post_create_inferior (&ctf_ops, from_tty);
+ post_create_inferior (from_tty);
}
/* This is the implementation of target_ops method to_close. Destroy
diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c
index fd7bab8..9cf68c5 100644
--- a/gdb/tracefile-tfile.c
+++ b/gdb/tracefile-tfile.c
@@ -571,7 +571,7 @@ tfile_target_open (const char *arg, int from_tty)
merge_uploaded_tracepoints (&uploaded_tps);
- post_create_inferior (&tfile_ops, from_tty);
+ post_create_inferior (from_tty);
}
/* Interpret the given line from the definitions part of the trace