From: Adrian Sendroiu <adrian.sendroiu@freescale.com>
To: <gdb-patches@sourceware.org>
Cc: Adrian Sendroiu <adrian.sendroiu@freescale.com>
Subject: [PATCH 1/2] cli/cli-logging.c: don't call ui_out_redirect for MI when disabling logging
Date: Wed, 23 Jul 2014 14:37:00 -0000 [thread overview]
Message-ID: <1406125575-28311-2-git-send-email-adrian.sendroiu@freescale.com> (raw)
In-Reply-To: <1406125575-28311-1-git-send-email-adrian.sendroiu@freescale.com>
When logging is set up, the code skips the call to ui_out_redirect if the
current interpreter is MI, but still calls it unconditionally when logging
is turned off. Since the number of "redirect"/"unredirect" calls must match,
this patch ensures that the ui_out_redirect call is also skipped when logging
is turned off.
gdb/
2014-07-23 Adrian Sendroiu <adrian.sendroiu@freescale.com>
* cli/cli-logging.c (pop_output_files): Don't call ui_out_redirect
if the current interpreter is MI.
---
gdb/cli/cli-logging.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c
index aae0039..e51bb95 100644
--- a/gdb/cli/cli-logging.c
+++ b/gdb/cli/cli-logging.c
@@ -180,7 +180,8 @@ pop_output_files (void)
saved_output.targ = NULL;
saved_output.targerr = NULL;
- ui_out_redirect (current_uiout, NULL);
+ if (!ui_out_is_mi_like_p (current_uiout))
+ ui_out_redirect (current_uiout, NULL);
}
/* This is a helper for the `set logging' command. */
--
1.7.9.5
next prev parent reply other threads:[~2014-07-23 14:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 14:26 [PATCH 0/2] Reimplement redirection for MI Adrian Sendroiu
2014-07-23 14:26 ` [PATCH 2/2] mi-out: Implement mi redirection using a stack Adrian Sendroiu
2014-07-24 20:34 ` Tom Tromey
2014-07-25 11:43 ` [PATCH v2 " Adrian Sendroiu
2014-07-29 15:16 ` Pedro Alves
2014-07-30 8:38 ` Adrian Sendroiu
2014-07-30 12:05 ` Pedro Alves
2014-07-31 16:23 ` Adrian Sendroiu
2014-07-31 17:11 ` Pedro Alves
2014-08-05 13:54 ` Adrian Sendroiu
2014-08-28 11:33 ` Adrian Sendroiu
2014-09-05 16:06 ` Pedro Alves
2014-09-07 15:45 ` Adrian Sendroiu
2014-09-08 13:19 ` Pedro Alves
2014-09-08 18:59 ` Sergio Durigan Junior
2014-09-09 14:03 ` Adrian Sendroiu
2014-09-26 9:25 ` Adrian Sendroiu
2014-09-26 12:51 ` Pedro Alves
2014-07-23 14:37 ` Adrian Sendroiu [this message]
2014-07-24 18:19 ` [PATCH 1/2] cli/cli-logging.c: don't call ui_out_redirect for MI when disabling logging Tom Tromey
2015-08-17 18:47 ` [PATCH 0/2] Reimplement redirection for MI Doug Evans
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=1406125575-28311-2-git-send-email-adrian.sendroiu@freescale.com \
--to=adrian.sendroiu@freescale.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).