From: Patrick Palka <patrick@parcs.ath.cx>
To: gdb-patches@sourceware.org
Cc: Patrick Palka <patrick@parcs.ath.cx>
Subject: [PATCH] Initialize terminal_state to terminal_is_ours
Date: Tue, 28 Jul 2015 18:18:00 -0000 [thread overview]
Message-ID: <1438107473-10965-1-git-send-email-patrick@parcs.ath.cx> (raw)
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 only gets called when an inferiro is first
created. In the meantime however, terminal_state would wrongly remain
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.
---
gdb/target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/target.c b/gdb/target.c
index 4e2d005..a39201d 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. */
--
2.5.0.rc2.22.g69b1679.dirty
next reply other threads:[~2015-07-28 18:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 18:18 Patrick Palka [this message]
2015-07-28 23:24 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438107473-10965-1-git-send-email-patrick@parcs.ath.cx \
--to=patrick@parcs.ath.cx \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox