+2014-02-19 Tom Tromey <tromey@redhat.com>
+
+ * target.h (struct target_ops) <to_terminal_save_ours>: Add
+ argument.
+ (target_terminal_save_ours): Add argument.
+ * target.c (debug_to_terminal_save_ours): Add argument.
+ (update_current_target): Update.
+ * inflow.c (terminal_save_ours): Add 'self' argument.
+ * inferior.h (terminal_save_ours): Add 'self' argument.
+
2014-02-19 Tom Tromey <tromey@redhat.com>
* target.h (struct target_ops) <to_terminal_ours>: Add argument.
extern void generic_mourn_inferior (void);
-extern void terminal_save_ours (void);
+extern void terminal_save_ours (struct target_ops *self);
extern void terminal_ours (struct target_ops *self);
and gdb must be able to restore it correctly. */
void
-terminal_save_ours (void)
+terminal_save_ours (struct target_ops *self)
{
if (gdb_has_a_terminal ())
{
static void debug_to_terminal_ours_for_output (struct target_ops *self);
-static void debug_to_terminal_save_ours (void);
+static void debug_to_terminal_save_ours (struct target_ops *self);
static void debug_to_terminal_ours (struct target_ops *self);
(void (*) (struct target_ops *))
target_ignore);
de_fault (to_terminal_save_ours,
- (void (*) (void))
+ (void (*) (struct target_ops *))
target_ignore);
de_fault (to_terminal_info,
default_terminal_info);
}
static void
-debug_to_terminal_save_ours (void)
+debug_to_terminal_save_ours (struct target_ops *self)
{
- debug_target.to_terminal_save_ours ();
+ debug_target.to_terminal_save_ours (&debug_target);
fprintf_unfiltered (gdb_stdlog, "target_terminal_save_ours ()\n");
}
void (*to_terminal_inferior) (struct target_ops *);
void (*to_terminal_ours_for_output) (struct target_ops *);
void (*to_terminal_ours) (struct target_ops *);
- void (*to_terminal_save_ours) (void);
+ void (*to_terminal_save_ours) (struct target_ops *);
void (*to_terminal_info) (const char *, int);
void (*to_kill) (struct target_ops *);
void (*to_load) (char *, int);
to take this change into account. */
#define target_terminal_save_ours() \
- (*current_target.to_terminal_save_ours) ()
+ (*current_target.to_terminal_save_ours) (¤t_target)
/* Print useful information about our terminal status, if such a thing
exists. */