* [patch] Emit failed assertion when 'set confirm off' is in effect.
@ 2009-07-21 18:09 Paul Pluzhnikov
2009-07-21 18:55 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Paul Pluzhnikov @ 2009-07-21 18:09 UTC (permalink / raw)
To: gdb-patches; +Cc: ppluzhnikov
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] Emit failed assertion when 'set confirm off' is in effect.
2009-07-21 18:09 [patch] Emit failed assertion when 'set confirm off' is in effect Paul Pluzhnikov
@ 2009-07-21 18:55 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2009-07-21 18:55 UTC (permalink / raw)
To: Paul Pluzhnikov; +Cc: gdb-patches
On Tue, Jul 21, 2009 at 11:07:00AM -0700, Paul Pluzhnikov wrote:
> 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'.
OK, thanks!
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-21 18:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-21 18:09 [patch] Emit failed assertion when 'set confirm off' is in effect Paul Pluzhnikov
2009-07-21 18:55 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox