From: Tom Tromey Date: Wed, 18 Dec 2013 04:30:36 +0000 (-0700) Subject: Add target_ops argument to to_terminal_ours_for_output X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e1e1a193c4207779a53ef02753cf7cbec3cf38c;p=binutils-gdb.git Add target_ops argument to to_terminal_ours_for_output 2014-02-19 Pedro Alves Tom Tromey * target.h (struct target_ops) : Add argument. (target_terminal_ours_for_output): Add argument. * target.c (debug_to_terminal_ours_for_output): Add argument. (update_current_target): Update. * inflow.c (terminal_ours_for_output): Add 'self' argument. * inferior.h (terminal_ours_for_output): Add 'self' argument. * go32-nat.c (go32_terminal_ours): Add 'self' argument. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a817e1b175c..175f9f43ab7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2014-02-19 Pedro Alves + Tom Tromey + + * target.h (struct target_ops) : Add + argument. + (target_terminal_ours_for_output): Add argument. + * target.c (debug_to_terminal_ours_for_output): Add argument. + (update_current_target): Update. + * inflow.c (terminal_ours_for_output): Add 'self' argument. + * inferior.h (terminal_ours_for_output): Add 'self' argument. + * go32-nat.c (go32_terminal_ours): Add 'self' argument. + 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add diff --git a/gdb/inferior.h b/gdb/inferior.h index 5acbee4cb6a..f2984032970 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -174,7 +174,7 @@ extern void child_terminal_info (const char *, int); extern void term_info (char *, int); -extern void terminal_ours_for_output (void); +extern void terminal_ours_for_output (struct target_ops *self); extern void terminal_inferior (struct target_ops *self); diff --git a/gdb/inflow.c b/gdb/inflow.c index 72706f57efb..8d9a7f38b9f 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -353,7 +353,7 @@ terminal_inferior (struct target_ops *self) should be called to get back to a normal state of affairs. */ void -terminal_ours_for_output (void) +terminal_ours_for_output (struct target_ops *self) { terminal_ours_1 (1); } diff --git a/gdb/target.c b/gdb/target.c index f3a6b8012e7..1f56a0a4918 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -136,7 +136,7 @@ static void debug_to_terminal_init (struct target_ops *self); static void debug_to_terminal_inferior (struct target_ops *self); -static void debug_to_terminal_ours_for_output (void); +static void debug_to_terminal_ours_for_output (struct target_ops *self); static void debug_to_terminal_save_ours (void); @@ -775,7 +775,7 @@ update_current_target (void) (void (*) (struct target_ops *)) target_ignore); de_fault (to_terminal_ours_for_output, - (void (*) (void)) + (void (*) (struct target_ops *)) target_ignore); de_fault (to_terminal_ours, (void (*) (void)) @@ -4815,9 +4815,9 @@ debug_to_terminal_inferior (struct target_ops *self) } static void -debug_to_terminal_ours_for_output (void) +debug_to_terminal_ours_for_output (struct target_ops *self) { - debug_target.to_terminal_ours_for_output (); + debug_target.to_terminal_ours_for_output (&debug_target); fprintf_unfiltered (gdb_stdlog, "target_terminal_ours_for_output ()\n"); } diff --git a/gdb/target.h b/gdb/target.h index bb68ac0bedf..ffe49190e44 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -489,7 +489,7 @@ struct target_ops CORE_ADDR, CORE_ADDR); void (*to_terminal_init) (struct target_ops *); void (*to_terminal_inferior) (struct target_ops *); - void (*to_terminal_ours_for_output) (void); + void (*to_terminal_ours_for_output) (struct target_ops *); void (*to_terminal_ours) (void); void (*to_terminal_save_ours) (void); void (*to_terminal_info) (const char *, int); @@ -1238,7 +1238,7 @@ extern void target_terminal_inferior (void); should be called to get back to a normal state of affairs. */ #define target_terminal_ours_for_output() \ - (*current_target.to_terminal_ours_for_output) () + (*current_target.to_terminal_ours_for_output) (¤t_target) /* Put our terminal settings into effect. First record the inferior's terminal settings