mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
gdb: remove unused fetch_inferior_event and inferior_event_handler parameters
I noticed that fetch_inferior_event receives the client_data parameter from its caller, inferior_event_handler, but doesn't actually need it. This patch removes it. In turn, inferior_event_handler doesn't use its parameter, so remove it too. The `data` argument used when registering remote_async_inferior_event_handler is changed to NULL, to avoid confusion. It could make people think that the value passed is used somewhere, when in fact it's not. gdb/ChangeLog: * inf-loop.c (inferior_event_handler): Remove client_data param. * inf-loop.h (inferior_event_handler): Likewise. * infcmd.c (step_1): Adjust. * infrun.c (proceed): Adjust. (fetch_inferior_event): Remove client_data param. (infrun_async_inferior_event_handler): Adjust. * infrun.h (fetch_inferior_event): Remove `void *` param. * linux-nat.c (handle_target_event): Adjust. * record-btrace.c (record_btrace_handle_async_inferior_event): Adjust. * record-full.c (record_full_async_inferior_event_handler): Adjust. * remote.c (remote_async_inferior_event_handler): Adjust. Change-Id: I3c2aa1eb0ea3e0985df096660d2dcd794674f2ea
This commit is contained in:
parent
0942c7ab94
commit
b1a35af270
@ -1,3 +1,19 @@
|
||||
2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
|
||||
|
||||
* inf-loop.c (inferior_event_handler): Remove client_data param.
|
||||
* inf-loop.h (inferior_event_handler): Likewise.
|
||||
* infcmd.c (step_1): Adjust.
|
||||
* infrun.c (proceed): Adjust.
|
||||
(fetch_inferior_event): Remove client_data param.
|
||||
(infrun_async_inferior_event_handler): Adjust.
|
||||
* infrun.h (fetch_inferior_event): Remove `void *` param.
|
||||
* linux-nat.c (handle_target_event): Adjust.
|
||||
* record-btrace.c (record_btrace_handle_async_inferior_event):
|
||||
Adjust.
|
||||
* record-full.c (record_full_async_inferior_event_handler):
|
||||
Adjust.
|
||||
* remote.c (remote_async_inferior_event_handler): Adjust.
|
||||
|
||||
2020-07-01 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
|
||||
|
@ -34,13 +34,12 @@
|
||||
/* General function to handle events in the inferior. */
|
||||
|
||||
void
|
||||
inferior_event_handler (enum inferior_event_type event_type,
|
||||
gdb_client_data client_data)
|
||||
inferior_event_handler (enum inferior_event_type event_type)
|
||||
{
|
||||
switch (event_type)
|
||||
{
|
||||
case INF_REG_EVENT:
|
||||
fetch_inferior_event (client_data);
|
||||
fetch_inferior_event ();
|
||||
break;
|
||||
|
||||
case INF_EXEC_COMPLETE:
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "target.h" /* For enum inferior_event_type. */
|
||||
|
||||
extern void inferior_event_handler (enum inferior_event_type event_type,
|
||||
void* client_data);
|
||||
extern void inferior_event_handler (enum inferior_event_type event_type);
|
||||
|
||||
#endif /* #ifndef INF_LOOP_H */
|
||||
|
@ -907,7 +907,7 @@ step_1 (int skip_subroutines, int single_inst, const char *count_string)
|
||||
thr->thread_fsm->clean_up (thr);
|
||||
proceeded = normal_stop ();
|
||||
if (!proceeded)
|
||||
inferior_event_handler (INF_EXEC_COMPLETE, NULL);
|
||||
inferior_event_handler (INF_EXEC_COMPLETE);
|
||||
all_uis_check_sync_execution_done ();
|
||||
}
|
||||
}
|
||||
|
@ -2968,7 +2968,7 @@ proceed (CORE_ADDR addr, enum gdb_signal siggnal)
|
||||
/* The target for some reason decided not to resume. */
|
||||
normal_stop ();
|
||||
if (target_can_async_p ())
|
||||
inferior_event_handler (INF_EXEC_COMPLETE, NULL);
|
||||
inferior_event_handler (INF_EXEC_COMPLETE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3933,7 +3933,7 @@ all_uis_on_sync_execution_starting (void)
|
||||
necessary cleanups. */
|
||||
|
||||
void
|
||||
fetch_inferior_event (void *client_data)
|
||||
fetch_inferior_event ()
|
||||
{
|
||||
struct execution_control_state ecss;
|
||||
struct execution_control_state *ecs = &ecss;
|
||||
@ -4050,7 +4050,7 @@ fetch_inferior_event (void *client_data)
|
||||
|
||||
if (!proceeded)
|
||||
{
|
||||
inferior_event_handler (INF_EXEC_COMPLETE, NULL);
|
||||
inferior_event_handler (INF_EXEC_COMPLETE);
|
||||
cmd_done = 1;
|
||||
}
|
||||
|
||||
@ -9422,7 +9422,7 @@ static const struct internalvar_funcs siginfo_funcs =
|
||||
static void
|
||||
infrun_async_inferior_event_handler (gdb_client_data data)
|
||||
{
|
||||
inferior_event_handler (INF_REG_EVENT, NULL);
|
||||
inferior_event_handler (INF_REG_EVENT);
|
||||
}
|
||||
|
||||
void _initialize_infrun ();
|
||||
|
@ -130,7 +130,7 @@ extern void stop_all_threads (void);
|
||||
|
||||
extern void prepare_for_detach (void);
|
||||
|
||||
extern void fetch_inferior_event (void *);
|
||||
extern void fetch_inferior_event ();
|
||||
|
||||
extern void init_wait_for_inferior (void);
|
||||
|
||||
|
@ -4232,7 +4232,7 @@ sigchld_handler (int signo)
|
||||
static void
|
||||
handle_target_event (int error, gdb_client_data client_data)
|
||||
{
|
||||
inferior_event_handler (INF_REG_EVENT, NULL);
|
||||
inferior_event_handler (INF_REG_EVENT);
|
||||
}
|
||||
|
||||
/* Create/destroy the target events pipe. Returns previous state. */
|
||||
|
@ -325,7 +325,7 @@ record_btrace_auto_disable (void)
|
||||
static void
|
||||
record_btrace_handle_async_inferior_event (gdb_client_data data)
|
||||
{
|
||||
inferior_event_handler (INF_REG_EVENT, NULL);
|
||||
inferior_event_handler (INF_REG_EVENT);
|
||||
}
|
||||
|
||||
/* See record-btrace.h. */
|
||||
|
@ -905,7 +905,7 @@ static struct async_event_handler *record_full_async_inferior_event_token;
|
||||
static void
|
||||
record_full_async_inferior_event_handler (gdb_client_data data)
|
||||
{
|
||||
inferior_event_handler (INF_REG_EVENT, NULL);
|
||||
inferior_event_handler (INF_REG_EVENT);
|
||||
}
|
||||
|
||||
/* Open the process record target for 'core' files. */
|
||||
|
@ -5605,8 +5605,7 @@ remote_target::open_1 (const char *name, int from_tty, int extended_p)
|
||||
|
||||
/* Register extra event sources in the event loop. */
|
||||
rs->remote_async_inferior_event_token
|
||||
= create_async_event_handler (remote_async_inferior_event_handler,
|
||||
remote);
|
||||
= create_async_event_handler (remote_async_inferior_event_handler, NULL);
|
||||
rs->notif_state = remote_notif_state_allocate (remote);
|
||||
|
||||
/* Reset the target state; these things will be queried either by
|
||||
@ -14158,13 +14157,13 @@ remote_async_serial_handler (struct serial *scb, void *context)
|
||||
{
|
||||
/* Don't propogate error information up to the client. Instead let
|
||||
the client find out about the error by querying the target. */
|
||||
inferior_event_handler (INF_REG_EVENT, NULL);
|
||||
inferior_event_handler (INF_REG_EVENT);
|
||||
}
|
||||
|
||||
static void
|
||||
remote_async_inferior_event_handler (gdb_client_data data)
|
||||
{
|
||||
inferior_event_handler (INF_REG_EVENT, data);
|
||||
inferior_event_handler (INF_REG_EVENT);
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user