Add target_ops argument to to_terminal_init

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

	* target.h (struct target_ops) <to_terminal_init>: Add argument.
	(target_terminal_init): Add argument.
	* target.c (debug_to_terminal_init): Add argument.
	(update_current_target): Update.
	* inflow.c (terminal_init_inferior): Add 'self' argument.
	* inferior.h (terminal_init_inferior): Add 'self' argument.
	* go32-nat.c (go32_terminal_init): Add 'self' argument.
	* gnu-nat.c (gnu_terminal_init_inferior): Add 'self' argument.
This commit is contained in:
Tom Tromey 2013-12-17 21:30:10 -07:00
parent c3a5ff8963
commit c42bf2866f
7 changed files with 21 additions and 10 deletions

View File

@ -1,3 +1,14 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_terminal_init>: Add argument.
(target_terminal_init): Add argument.
* target.c (debug_to_terminal_init): Add argument.
(update_current_target): Update.
* inflow.c (terminal_init_inferior): Add 'self' argument.
* inferior.h (terminal_init_inferior): Add 'self' argument.
* go32-nat.c (go32_terminal_init): Add 'self' argument.
* gnu-nat.c (gnu_terminal_init_inferior): Add 'self' argument.
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops)

View File

@ -2257,7 +2257,7 @@ gnu_detach (struct target_ops *ops, const char *args, int from_tty)
}
static void
gnu_terminal_init_inferior (void)
gnu_terminal_init_inferior (struct target_ops *self)
{
gdb_assert (gnu_current_inf);
terminal_init_inferior_with_pgrp (gnu_current_inf->pid);

View File

@ -845,7 +845,7 @@ static int inf_terminal_mode;
static int terminal_is_ours = 1;
static void
go32_terminal_init (void)
go32_terminal_init (struct target_ops *self)
{
inf_mode_valid = 0; /* Reinitialize, in case they are restarting child. */
terminal_is_ours = 1;

View File

@ -178,7 +178,7 @@ extern void terminal_ours_for_output (void);
extern void terminal_inferior (void);
extern void terminal_init_inferior (void);
extern void terminal_init_inferior (struct target_ops *self);
extern void terminal_init_inferior_with_pgrp (int pgrp);

View File

@ -255,7 +255,7 @@ terminal_save_ours (void)
}
void
terminal_init_inferior (void)
terminal_init_inferior (struct target_ops *self)
{
#ifdef PROCESS_GROUP_TYPE
/* This is for Lynx, and should be cleaned up by having Lynx be a separate

View File

@ -132,7 +132,7 @@ static int debug_to_can_accel_watchpoint_condition (struct target_ops *self,
CORE_ADDR, int, int,
struct expression *);
static void debug_to_terminal_init (void);
static void debug_to_terminal_init (struct target_ops *self);
static void debug_to_terminal_inferior (void);
@ -769,7 +769,7 @@ update_current_target (void)
struct expression *))
return_zero);
de_fault (to_terminal_init,
(void (*) (void))
(void (*) (struct target_ops *))
target_ignore);
de_fault (to_terminal_inferior,
(void (*) (void))
@ -4799,9 +4799,9 @@ debug_to_remove_watchpoint (struct target_ops *self,
}
static void
debug_to_terminal_init (void)
debug_to_terminal_init (struct target_ops *self)
{
debug_target.to_terminal_init ();
debug_target.to_terminal_init (&debug_target);
fprintf_unfiltered (gdb_stdlog, "target_terminal_init ()\n");
}

View File

@ -487,7 +487,7 @@ struct target_ops
struct expression *);
int (*to_masked_watch_num_registers) (struct target_ops *,
CORE_ADDR, CORE_ADDR);
void (*to_terminal_init) (void);
void (*to_terminal_init) (struct target_ops *);
void (*to_terminal_inferior) (void);
void (*to_terminal_ours_for_output) (void);
void (*to_terminal_ours) (void);
@ -1222,7 +1222,7 @@ extern int target_remove_breakpoint (struct gdbarch *gdbarch,
before we actually run the inferior. */
#define target_terminal_init() \
(*current_target.to_terminal_init) ()
(*current_target.to_terminal_init) (&current_target)
/* Put the inferior's terminal settings into effect.
This is preparation for starting or resuming the inferior. */