aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:31:01 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:45:40 -0700
commitae3bd4315d0b1746d43b132decf3a14f91775061 (patch)
treeb3932ca90ab5460ffd8f319b3d91b7f72cd9a9f5 /gdb
parente3594fd196c8d629129af9cdc9d00ba08b62a928 (diff)
downloadgdb-ae3bd4315d0b1746d43b132decf3a14f91775061.zip
gdb-ae3bd4315d0b1746d43b132decf3a14f91775061.tar.gz
gdb-ae3bd4315d0b1746d43b132decf3a14f91775061.tar.bz2
Add target_ops argument to to_terminal_save_ours
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/inferior.h2
-rw-r--r--gdb/inflow.c2
-rw-r--r--gdb/target.c8
-rw-r--r--gdb/target.h4
5 files changed, 18 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f7a5d30..6447a39 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
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.
(target_terminal_ours): Add argument.
* target.c (debug_to_terminal_ours): Add argument.
diff --git a/gdb/inferior.h b/gdb/inferior.h
index c577fb4..938933f 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -125,7 +125,7 @@ extern int disable_randomization;
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);
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 087cc60..fc5a716 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -245,7 +245,7 @@ terminal_init_inferior_with_pgrp (int pgrp)
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 ())
{
diff --git a/gdb/target.c b/gdb/target.c
index ddb7c63..9a0dfc3 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -138,7 +138,7 @@ static void debug_to_terminal_inferior (struct target_ops *self);
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);
@@ -781,7 +781,7 @@ update_current_target (void)
(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);
@@ -4831,9 +4831,9 @@ debug_to_terminal_ours (struct target_ops *self)
}
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");
}
diff --git a/gdb/target.h b/gdb/target.h
index e835029..c4a52fb 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -491,7 +491,7 @@ struct target_ops
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);
@@ -1253,7 +1253,7 @@ extern void target_terminal_inferior (void);
to take this change into account. */
#define target_terminal_save_ours() \
- (*current_target.to_terminal_save_ours) ()
+ (*current_target.to_terminal_save_ours) (&current_target)
/* Print useful information about our terminal status, if such a thing
exists. */