From: Tom Tromey Date: Wed, 18 Dec 2013 04:30:23 +0000 (-0700) Subject: Add target_ops argument to to_terminal_inferior X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d2f640d43aee0be2d12eb082ac3d48d99ab5a1ce;p=binutils-gdb.git Add target_ops argument to to_terminal_inferior 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. * target.c (target_terminal_inferior): Add argument. (update_current_target): Update. * remote.c (remote_terminal_inferior): Add 'self' argument. * linux-nat.c (linux_nat_terminal_inferior): Add 'self' argument. * inflow.c (terminal_inferior): Add 'self' argument. * inferior.h (terminal_inferior): Add 'self' argument. * go32-nat.c (go32_terminal_inferior): Add 'self' argument. (go32_terminal_inferior): Add 'self' argument. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 93b0d51db09..a817e1b175c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +2014-02-19 Tom Tromey + + * target.h (struct target_ops) : Add + argument. + * target.c (target_terminal_inferior): Add argument. + (update_current_target): Update. + * remote.c (remote_terminal_inferior): Add 'self' argument. + * linux-nat.c (linux_nat_terminal_inferior): Add 'self' argument. + * inflow.c (terminal_inferior): Add 'self' argument. + * inferior.h (terminal_inferior): Add 'self' argument. + * go32-nat.c (go32_terminal_inferior): Add 'self' argument. + (go32_terminal_inferior): Add 'self' argument. + 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index 25267aace2f..8f911e2e613 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -882,7 +882,7 @@ go32_terminal_info (const char *args, int from_tty) } static void -go32_terminal_inferior (void) +go32_terminal_inferior (struct target_ops *self) { /* Redirect standard handles as child wants them. */ errno = 0; diff --git a/gdb/inferior.h b/gdb/inferior.h index 41e396ac91e..5acbee4cb6a 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -176,7 +176,7 @@ extern void term_info (char *, int); extern void terminal_ours_for_output (void); -extern void terminal_inferior (void); +extern void terminal_inferior (struct target_ops *self); extern void terminal_init_inferior (struct target_ops *self); diff --git a/gdb/inflow.c b/gdb/inflow.c index 236f8f004db..72706f57efb 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -272,7 +272,7 @@ terminal_init_inferior (struct target_ops *self) This is preparation for starting or resuming the inferior. */ void -terminal_inferior (void) +terminal_inferior (struct target_ops *self) { struct inferior *inf; struct terminal_info *tinfo; diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index a6118affb99..cd2798ae776 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -4583,16 +4583,16 @@ static int async_terminal_is_ours = 1; /* target_terminal_inferior implementation. */ static void -linux_nat_terminal_inferior (void) +linux_nat_terminal_inferior (struct target_ops *self) { if (!target_is_async_p ()) { /* Async mode is disabled. */ - terminal_inferior (); + terminal_inferior (self); return; } - terminal_inferior (); + terminal_inferior (self); /* Calls to target_terminal_*() are meant to be idempotent. */ if (!async_terminal_is_ours) diff --git a/gdb/remote.c b/gdb/remote.c index 6424304b5b1..456cd09e67a 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -5125,7 +5125,7 @@ Give up (and stop debugging it)? "))) is required. */ static void -remote_terminal_inferior (void) +remote_terminal_inferior (struct target_ops *self) { if (!target_async_permitted) /* Nothing to do. */ diff --git a/gdb/target.c b/gdb/target.c index bc3176a03b3..f3a6b8012e7 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -134,7 +134,7 @@ static int debug_to_can_accel_watchpoint_condition (struct target_ops *self, static void debug_to_terminal_init (struct target_ops *self); -static void debug_to_terminal_inferior (void); +static void debug_to_terminal_inferior (struct target_ops *self); static void debug_to_terminal_ours_for_output (void); @@ -500,7 +500,7 @@ target_terminal_inferior (void) /* If GDB is resuming the inferior in the foreground, install inferior's terminal modes. */ - (*current_target.to_terminal_inferior) (); + (*current_target.to_terminal_inferior) (¤t_target); } static int @@ -772,7 +772,7 @@ update_current_target (void) (void (*) (struct target_ops *)) target_ignore); de_fault (to_terminal_inferior, - (void (*) (void)) + (void (*) (struct target_ops *)) target_ignore); de_fault (to_terminal_ours_for_output, (void (*) (void)) @@ -4807,9 +4807,9 @@ debug_to_terminal_init (struct target_ops *self) } static void -debug_to_terminal_inferior (void) +debug_to_terminal_inferior (struct target_ops *self) { - debug_target.to_terminal_inferior (); + debug_target.to_terminal_inferior (&debug_target); fprintf_unfiltered (gdb_stdlog, "target_terminal_inferior ()\n"); } diff --git a/gdb/target.h b/gdb/target.h index 661b8e91aab..bb68ac0bedf 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -488,7 +488,7 @@ struct target_ops int (*to_masked_watch_num_registers) (struct target_ops *, CORE_ADDR, CORE_ADDR); void (*to_terminal_init) (struct target_ops *); - void (*to_terminal_inferior) (void); + void (*to_terminal_inferior) (struct target_ops *); void (*to_terminal_ours_for_output) (void); void (*to_terminal_ours) (void); void (*to_terminal_save_ours) (void);