diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2018-08-22 11:09:45 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2018-08-22 11:09:45 -0400 |
commit | ae739fe7b8cffac2332666d62ad37cab679a7758 (patch) | |
tree | f0669586a670a4ce8fe223dbd47a0c728d38994a /gdb/inf-child.c | |
parent | 467dc1e2ea5a8b300b61194aa8565829ce7d65bc (diff) | |
download | binutils-ae739fe7b8cffac2332666d62ad37cab679a7758.zip binutils-ae739fe7b8cffac2332666d62ad37cab679a7758.tar.gz binutils-ae739fe7b8cffac2332666d62ad37cab679a7758.tar.bz2 |
Fix restoring of inferior terminal settings
I noticed that the child_terminal_save_inferior function was not used
since the commit f6ac5f3d63e0 ("Convert struct target_ops to C++"). I
was able to make a little test program to illustrate the problem (see
test case).
I think we're just missing the override of the terminal_save_inferior
method in inf_child_target (along with the other terminal-related
methods).
Instead of creating a new test, I thought that gdb.base/term.exp was a
good candidate for testing that gdb restores properly the inferior's
terminal settings.
gdb/ChangeLog:
* inf-child.h (inf_child_target) <terminal_save_inferior>: New.
* inf-child.c (inf_child_target::terminal_save_inferior): New.
gdb/testsuite/ChangeLog:
* gdb.base/term.exp: Compare terminal settings with values from
the inferior.
* gdb.base/term.c: Get and set terminal settings.
Diffstat (limited to 'gdb/inf-child.c')
-rw-r--r-- | gdb/inf-child.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/inf-child.c b/gdb/inf-child.c index 2f5babe..44aa2f6 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -114,6 +114,12 @@ inf_child_target::terminal_inferior () } void +inf_child_target::terminal_save_inferior () +{ + child_terminal_save_inferior (this); +} + +void inf_child_target::terminal_ours_for_output () { child_terminal_ours_for_output (this); |