+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
}
static void
-bsd_uthread_inferior_created (struct target_ops *ops, int from_tty)
+bsd_uthread_inferior_created ()
{
bsd_uthread_activate (NULL);
}
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
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);
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. */
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
/* 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)
/* 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. */
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);
/* 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 ();
}
/* inferior_created observer. */
static void
-jit_inferior_created (struct target_ops *ops, int from_tty)
+jit_inferior_created ()
{
jit_inferior_created_hook ();
}
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 ();
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). */
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
/* 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;
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;
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
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