From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Ensure internal_vproblem always prints the message
Date: Tue, 05 Aug 2014 09:56:00 -0000 [thread overview]
Message-ID: <1407232590-23899-1-git-send-email-gbenson@redhat.com> (raw)
Hi all,
While working on internal_vproblem I noticed that the error/warning
message is suppressed if problem->should_quit is internal_problem_yes
or internal_problem_no. This behaviour seems wrong. This commit
modifies internal_vproblem to emit the message regardless of the
user's settings.
Built and regtested on RHEL6.5 x86_64.
Is this ok to commit?
Thanks,
Gary
--
gdb/
2014-08-05 Gary Benson <gbenson@redhat.com>
* utils.c (internal_vproblem): Always print the message.
---
gdb/ChangeLog | 4 ++++
gdb/utils.c | 11 +++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/gdb/utils.c b/gdb/utils.c
index a4b5937..15b4abe 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -736,18 +736,17 @@ internal_vproblem (struct internal_problem *problem,
make_cleanup (xfree, reason);
}
+ /* Emit the message unless query will emit it below. */
+ if (problem->should_quit != internal_problem_ask || !confirm)
+ fprintf_unfiltered (gdb_stderr, "%s\n", reason);
+
if (problem->should_quit == internal_problem_ask)
{
/* Default (yes/batch case) is to quit GDB. When in batch mode
this lessens the likelihood of GDB going into an infinite
loop. */
if (!confirm)
- {
- /* Emit the message and quit. */
- fputs_unfiltered (reason, gdb_stderr);
- fputs_unfiltered ("\n", gdb_stderr);
- quit_p = 1;
- }
+ quit_p = 1;
else
quit_p = query (_("%s\nQuit this debugging session? "), reason);
}
--
1.7.1
next reply other threads:[~2014-08-05 9:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-05 9:56 Gary Benson [this message]
2014-08-19 7:35 ` Joel Brobecker
2014-08-19 8:46 ` Gary Benson
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=1407232590-23899-1-git-send-email-gbenson@redhat.com \
--to=gbenson@redhat.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