Add target_ops argument to to_terminal_inferior

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target.h (struct target_ops) <to_terminal_inferior>: 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.
This commit is contained in:
Tom Tromey 2013-12-17 21:30:23 -07:00
parent c42bf2866f
commit d2f640d43a
8 changed files with 26 additions and 13 deletions

View file

@ -1,3 +1,16 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_terminal_inferior>: 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 <tromey@redhat.com>
* target.h (struct target_ops) <to_terminal_init>: Add argument.

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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)

View file

@ -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. */

View file

@ -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) (&current_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");
}

View file

@ -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);