From a7aba2668a7b392182e296392d8e19516e1a6ec5 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 2 Oct 2020 10:46:38 -0400 Subject: 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 : Remove parameters. Update all listeners. * inferior.h (post_create_inferior): Remove target parameter. Update all callers. Change-Id: I8944cefdc4447ed5347dc927b75abf1e7a0e27e6 --- gdb/infcmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/infcmd.c') 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. */ -- cgit v1.1