* Should internal-error default to dumping core?
@ 2001-10-01 8:01 Andrew Cagney
2001-10-01 8:30 ` Fernando Nasser
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2001-10-01 8:01 UTC (permalink / raw)
To: gdb
Hello,
At preset an internal-error interaction looks like:
> (gdb) maint internal-error
> /home/scratch/GDB/src/gdb/maint.c:119: gdb-internal-error: internal maintenance
> An internal GDB error was detected. This may make further
> debugging unreliable. Continue this debugging session? (y or n) n
>
> Create a core file containing the current state of GDB? (y or n) n
> $
that is the default/no case is to not dump core.
At present, if GDB encounters an internal error (from say a NULL pointer
reference) it doesn't leave any physical evidence around in the form of
a core dump. I'm thinking it should. Hence, I'd like to change the
second prompt to be one that defaults to a core dump.
Looking back through the notes it appears that the [my] rationale for
the current behavour was somewhat arbitrary.
thoughts?
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Should internal-error default to dumping core?
2001-10-01 8:01 Should internal-error default to dumping core? Andrew Cagney
@ 2001-10-01 8:30 ` Fernando Nasser
2001-10-01 8:49 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2001-10-01 8:30 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
Andrew Cagney wrote:
>
> Hello,
>
> At preset an internal-error interaction looks like:
>
> > (gdb) maint internal-error
> > /home/scratch/GDB/src/gdb/maint.c:119: gdb-internal-error: internal maintenance
> > An internal GDB error was detected. This may make further
> > debugging unreliable. Continue this debugging session? (y or n) n
> >
> > Create a core file containing the current state of GDB? (y or n) n
> > $
>
> that is the default/no case is to not dump core.
>
> At present, if GDB encounters an internal error (from say a NULL pointer
> reference) it doesn't leave any physical evidence around in the form of
> a core dump. I'm thinking it should. Hence, I'd like to change the
> second prompt to be one that defaults to a core dump.
>
> Looking back through the notes it appears that the [my] rationale for
> the current behavour was somewhat arbitrary.
>
> thoughts?
> Andrew
I think as long as the default when not running interactively is to dump
core
we are OK.
Having the two defaults being reversed (n followed by a y) would be a
little
uncomfortable. But you could change the wording instead if you really
want
to change the interactive default (I sincerely hope people are not used
to
answer this question already ;-), so there wouldn't be much impact with
the
change).
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Should internal-error default to dumping core?
2001-10-01 8:30 ` Fernando Nasser
@ 2001-10-01 8:49 ` Andrew Cagney
2001-10-01 9:08 ` Fernando Nasser
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2001-10-01 8:49 UTC (permalink / raw)
To: Fernando Nasser; +Cc: gdb
>
> I think as long as the default when not running interactively is to dump
> core
> we are OK.
>
> Having the two defaults being reversed (n followed by a y) would be a
> little
> uncomfortable. But you could change the wording instead if you really
> want
> to change the interactive default (I sincerely hope people are not used
> to
> answer this question already [;-)] , so there wouldn't be much impact with
> the
> change).
Sorry you've lost me here. query() returns false if there is no tty.
So ``n'' ``n'' would still be the default. I'll need to change the
question so that a ``no'' indicates a core dump.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Should internal-error default to dumping core?
2001-10-01 8:49 ` Andrew Cagney
@ 2001-10-01 9:08 ` Fernando Nasser
2002-01-13 12:22 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2001-10-01 9:08 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
Andrew Cagney wrote:
>
> Sorry you've lost me here. query() returns false if there is no tty.
> So ``n'' ``n'' would still be the default. I'll need to change the
> question so that a ``no'' indicates a core dump.
>
That was how I was suggesting it should be, so it is OK with me.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Should internal-error default to dumping core?
2001-10-01 9:08 ` Fernando Nasser
@ 2002-01-13 12:22 ` Andrew Cagney
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2002-01-13 12:22 UTC (permalink / raw)
To: Fernando Nasser; +Cc: gdb
> Andrew Cagney wrote:
>
>>
>> Sorry you've lost me here. query() returns false if there is no tty.
>> So ``n'' ``n'' would still be the default. I'll need to change the
>> question so that a ``no'' indicates a core dump.
>>
>
>
> That was how I was suggesting it should be, so it is OK with me.
>
Turns out I'm 180 degrees out here. query() returns true when no TTY.
Consequently I need to reverse first query() not the second.
Andrew
> Hello,
>
> At preset an internal-error interaction looks like:
>
> (gdb) maint internal-error
> /home/scratch/GDB/src/gdb/maint.c:119: gdb-internal-error: internal maintenance
> An internal GDB error was detected. This may make further
> debugging unreliable. Continue this debugging session? (y or n) n
>
> Create a core file containing the current state of GDB? (y or n) n
>> $
>
> that is the default/no case is to not dump core.
>
> At present, if GDB encounters an internal error (from say a NULL pointer reference) it doesn't leave any physical evidence around in the form of a core dump. I'm thinking it should. Hence, I'd like to change the second prompt to be one that defaults to a core dump.
>
> Looking back through the notes it appears that the [my] rationale for the current behavour was somewhat arbitrary.
>
> thoughts?
> Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-01-13 20:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-01 8:01 Should internal-error default to dumping core? Andrew Cagney
2001-10-01 8:30 ` Fernando Nasser
2001-10-01 8:49 ` Andrew Cagney
2001-10-01 9:08 ` Fernando Nasser
2002-01-13 12:22 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox