gdb: remove arguments from inferior_created observable
I noticed that non of the listeners of the inferior_created observable used either of the arguments. Remove them. This in turn allows removing the target parameter of post_create_inferior. Tested only by rebuilding. gdb/ChangeLog: * observable.h <inferior_created>: Remove parameters. Update all listeners. * inferior.h (post_create_inferior): Remove target parameter. Update all callers. Change-Id: I8944cefdc4447ed5347dc927b75abf1e7a0e27e6
This commit is contained in:
parent
3ee6f75d05
commit
a7aba2668a
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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. */
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
@ -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 ();
|
||||
|
@ -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). */
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user