Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: ppluzhnikov@google.com (Paul Pluzhnikov)
To: gdb-patches@sourceware.org
Cc: ppluzhnikov@google.com
Subject: [patch] Emit failed assertion when 'set confirm off' is in effect.
Date: Tue, 21 Jul 2009 18:09:00 -0000	[thread overview]
Message-ID: <20090721180701.03C3F76BC0@localhost> (raw)

Greetings,

I run GDB with 'set confirm off' in ~/.gdbinit.

Unfortunately, with this setting GDB *silently* aborts on internal error,
and I have to run GDB under itself to find out what happened.

Attached patch changes this so that internal_error reason is printed even
with 'set confirm off'.

Thanks,
--
Paul Pluzhnikov

2009-07-21  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* util.c (internal_vproblem): Always print failure message.


Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.214
diff -u -p -u -r1.214 utils.c
--- utils.c	21 Jul 2009 03:31:18 -0000	1.214
+++ utils.c	21 Jul 2009 17:58:43 -0000
@@ -933,7 +933,15 @@ further debugging may prove unreliable."
       /* Default (yes/batch case) is to quit GDB.  When in batch mode
 	 this lessens the likelihood of GDB going into an infinite
 	 loop.  */
-      quit_p = query (_("%s\nQuit this debugging session? "), reason);
+      if (caution == 0)
+        {
+          /* Emit the message and quit.  */
+          fputs_unfiltered (reason, gdb_stderr);
+          fputs_unfiltered ("\n", gdb_stderr);
+          quit_p = 1;
+        }
+      else
+        quit_p = query (_("%s\nQuit this debugging session? "), reason);
     }
   else if (problem->should_quit == internal_problem_yes)
     quit_p = 1;


             reply	other threads:[~2009-07-21 18:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 18:09 Paul Pluzhnikov [this message]
2009-07-21 18:55 ` Daniel Jacobowitz

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=20090721180701.03C3F76BC0@localhost \
    --to=ppluzhnikov@google.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