aboutsummaryrefslogtreecommitdiff
path: root/gdb/inf-child.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2018-08-22 11:09:45 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2018-08-22 11:09:45 -0400
commitae739fe7b8cffac2332666d62ad37cab679a7758 (patch)
treef0669586a670a4ce8fe223dbd47a0c728d38994a /gdb/inf-child.h
parent467dc1e2ea5a8b300b61194aa8565829ce7d65bc (diff)
downloadgdb-ae739fe7b8cffac2332666d62ad37cab679a7758.zip
gdb-ae739fe7b8cffac2332666d62ad37cab679a7758.tar.gz
gdb-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.h')
-rw-r--r--gdb/inf-child.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/inf-child.h b/gdb/inf-child.h
index 6316f30..98969bc 100644
--- a/gdb/inf-child.h
+++ b/gdb/inf-child.h
@@ -46,6 +46,7 @@ public:
bool supports_terminal_ours () override;
void terminal_init () override;
void terminal_inferior () override;
+ void terminal_save_inferior () override;
void terminal_ours_for_output () override;
void terminal_ours () override;
void terminal_info (const char *, int) override;