aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-17 21:30:49 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:45:39 -0700
commite3594fd196c8d629129af9cdc9d00ba08b62a928 (patch)
treeeeae87aaf961ccc05533f044eee7cbfeb30aee25 /gdb
parent2e1e1a193c4207779a53ef02753cf7cbec3cf38c (diff)
downloadgdb-e3594fd196c8d629129af9cdc9d00ba08b62a928.zip
gdb-e3594fd196c8d629129af9cdc9d00ba08b62a928.tar.gz
gdb-e3594fd196c8d629129af9cdc9d00ba08b62a928.tar.bz2
Add target_ops argument to to_terminal_ours
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. (update_current_target): Update. * remote.c (remote_terminal_ours): Add 'self' argument. (remote_close): Update. * linux-nat.c (linux_nat_terminal_ours): Add 'self' argument. * inflow.c (terminal_ours): Add 'self' argument. * inferior.h (terminal_ours): Add 'self' argument. * go32-nat.c (go32_terminal_ours): Add 'self' argument.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/go32-nat.c2
-rw-r--r--gdb/inferior.h2
-rw-r--r--gdb/inflow.c2
-rw-r--r--gdb/linux-nat.c6
-rw-r--r--gdb/remote.c6
-rw-r--r--gdb/target.c8
-rw-r--r--gdb/target.h4
8 files changed, 28 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 175f9f4..f7a5d30 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+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.
+ (update_current_target): Update.
+ * remote.c (remote_terminal_ours): Add 'self' argument.
+ (remote_close): Update.
+ * linux-nat.c (linux_nat_terminal_ours): Add 'self' argument.
+ * inflow.c (terminal_ours): Add 'self' argument.
+ * inferior.h (terminal_ours): Add 'self' argument.
+ * go32-nat.c (go32_terminal_ours): Add 'self' argument.
+
2014-02-19 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index 8f911e2..4e0b474 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -903,7 +903,7 @@ go32_terminal_inferior (struct target_ops *self)
}
static void
-go32_terminal_ours (void)
+go32_terminal_ours (struct target_ops *self)
{
/* Switch to cooked mode on the gdb terminal and save the inferior
terminal mode to be restored when it is resumed. */
diff --git a/gdb/inferior.h b/gdb/inferior.h
index f298403..c577fb4 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -127,7 +127,7 @@ extern void generic_mourn_inferior (void);
extern void terminal_save_ours (void);
-extern void terminal_ours (void);
+extern void terminal_ours (struct target_ops *self);
extern CORE_ADDR unsigned_pointer_to_address (struct gdbarch *gdbarch,
struct type *type,
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 8d9a7f3..087cc60 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -363,7 +363,7 @@ terminal_ours_for_output (struct target_ops *self)
so they can be restored properly later. */
void
-terminal_ours (void)
+terminal_ours (struct target_ops *self)
{
terminal_ours_1 (0);
}
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index cd2798a..24cb1b9 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -4606,19 +4606,19 @@ linux_nat_terminal_inferior (struct target_ops *self)
/* target_terminal_ours implementation. */
static void
-linux_nat_terminal_ours (void)
+linux_nat_terminal_ours (struct target_ops *self)
{
if (!target_is_async_p ())
{
/* Async mode is disabled. */
- terminal_ours ();
+ terminal_ours (self);
return;
}
/* GDB should never give the terminal to the inferior if the
inferior is running in the background (run&, continue&, etc.),
but claiming it sure should. */
- terminal_ours ();
+ terminal_ours (self);
if (async_terminal_is_ours)
return;
diff --git a/gdb/remote.c b/gdb/remote.c
index 456cd09..f6163a9 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -220,7 +220,7 @@ static int peek_stop_reply (ptid_t ptid);
static void remote_async_inferior_event_handler (gdb_client_data);
-static void remote_terminal_ours (void);
+static void remote_terminal_ours (struct target_ops *self);
static int remote_read_description_p (struct target_ops *target);
@@ -3000,7 +3000,7 @@ remote_close (struct target_ops *self)
/* Make sure we leave stdin registered in the event loop, and we
don't leave the async SIGINT signal handler installed. */
- remote_terminal_ours ();
+ remote_terminal_ours (self);
serial_close (rs->remote_desc);
rs->remote_desc = NULL;
@@ -5148,7 +5148,7 @@ remote_terminal_inferior (struct target_ops *self)
}
static void
-remote_terminal_ours (void)
+remote_terminal_ours (struct target_ops *self)
{
if (!target_async_permitted)
/* Nothing to do. */
diff --git a/gdb/target.c b/gdb/target.c
index 1f56a0a..ddb7c63 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -140,7 +140,7 @@ 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_ours (void);
+static void debug_to_terminal_ours (struct target_ops *self);
static void debug_to_load (char *, int);
@@ -778,7 +778,7 @@ update_current_target (void)
(void (*) (struct target_ops *))
target_ignore);
de_fault (to_terminal_ours,
- (void (*) (void))
+ (void (*) (struct target_ops *))
target_ignore);
de_fault (to_terminal_save_ours,
(void (*) (void))
@@ -4823,9 +4823,9 @@ debug_to_terminal_ours_for_output (struct target_ops *self)
}
static void
-debug_to_terminal_ours (void)
+debug_to_terminal_ours (struct target_ops *self)
{
- debug_target.to_terminal_ours ();
+ debug_target.to_terminal_ours (&debug_target);
fprintf_unfiltered (gdb_stdlog, "target_terminal_ours ()\n");
}
diff --git a/gdb/target.h b/gdb/target.h
index ffe4919..e835029 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -490,7 +490,7 @@ struct target_ops
void (*to_terminal_init) (struct target_ops *);
void (*to_terminal_inferior) (struct target_ops *);
void (*to_terminal_ours_for_output) (struct target_ops *);
- void (*to_terminal_ours) (void);
+ void (*to_terminal_ours) (struct target_ops *);
void (*to_terminal_save_ours) (void);
void (*to_terminal_info) (const char *, int);
void (*to_kill) (struct target_ops *);
@@ -1245,7 +1245,7 @@ extern void target_terminal_inferior (void);
so they can be restored properly later. */
#define target_terminal_ours() \
- (*current_target.to_terminal_ours) ()
+ (*current_target.to_terminal_ours) (&current_target)
/* Save our terminal settings.
This is called from TUI after entering or leaving the curses