aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorPatrick Palka <patrick@parcs.ath.cx>2015-07-28 13:58:17 -0400
committerPatrick Palka <patrick@parcs.ath.cx>2015-07-29 07:54:29 -0400
commit7afa63c624ae570472381b8e35ce066bf145844a (patch)
tree1091fe68ce2fc6daf0a5ce7159ad7b3e7533a5f6 /gdb/target.c
parent90074d118de70c5eb2c71ba83e58d96359149d79 (diff)
downloadgdb-7afa63c624ae570472381b8e35ce066bf145844a.zip
gdb-7afa63c624ae570472381b8e35ce066bf145844a.tar.gz
gdb-7afa63c624ae570472381b8e35ce066bf145844a.tar.bz2
Initialize terminal_state to terminal_is_ours
Right now this variable is initialized to 0 i.e. terminal_is_inferior and does not get set to terminal_is_ours until target_terminal_init() is called. This function however only gets called when an inferior is first created. In the meantime, terminal_state would wrongly remain set to terminal_is_inferior. Tested on x86_64 Debian Stretch -- native, gdbserver and extended-gdbserver. gdb/ChangeLog: * target.c (terminal_state): Initialize to terminal_is_ours.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 01bac7e..c671e7c 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -444,7 +444,7 @@ enum terminal_state
terminal_is_ours = 2
};
-static enum terminal_state terminal_state;
+static enum terminal_state terminal_state = terminal_is_ours;
/* See target.h. */