Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Make QUIT work
@ 2004-05-08  3:27 Michael Snyder
  2004-05-08  4:51 ` Daniel Jacobowitz
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Snyder @ 2004-05-08  3:27 UTC (permalink / raw)
  To: gdb-patches, Elena Zannoni

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

Elena, here's something that must have fallen thru the cracks
at some point.  handle_sigint needs to set quit_flag -- or else
QUIT won't quit.  As is currently, QUIT won't work unles
immediate_quit is set -- and I'm pretty sure that's not how
it was intended to work.


[-- Attachment #2: quit --]
[-- Type: text/plain, Size: 704 bytes --]

2004-05-08  Michael Snyder  <msnyder@redhat.com>

	* event-top.c (handle_sigint): Set quit_flag, so that QUIT
	will work the next time it's invoked.

Index: event-top.c
===================================================================
RCS file: /cvs/src/src/gdb/event-top.c,v
retrieving revision 1.33
diff -p -r1.33 event-top.c
*** event-top.c	28 Feb 2004 18:04:36 -0000	1.33
--- event-top.c	8 May 2004 03:22:55 -0000
*************** void
*** 950,955 ****
--- 950,956 ----
  handle_sigint (int sig)
  {
    signal (sig, handle_sigint);
+   quit_flag=1;
  
    /* If immediate_quit is set, we go ahead and process the SIGINT right
       away, even if we usually would defer this to the event loop. The

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFA] Make QUIT work
  2004-05-08  3:27 [RFA] Make QUIT work Michael Snyder
@ 2004-05-08  4:51 ` Daniel Jacobowitz
  2004-05-08  6:16   ` Joel Brobecker
  2004-05-11  1:11   ` Andrew Cagney
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2004-05-08  4:51 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches, Elena Zannoni

On Sat, May 08, 2004 at 03:27:16AM +0000, Michael Snyder wrote:
> Elena, here's something that must have fallen thru the cracks
> at some point.  handle_sigint needs to set quit_flag -- or else
> QUIT won't quit.  As is currently, QUIT won't work unles
> immediate_quit is set -- and I'm pretty sure that's not how
> it was intended to work.
> 

See the patch Joel submitted for this last August.  Elena deferred it
to after 6.1 because just setting quit_flag invokes both sets of event
handling machinery, potentially quitting twice.

> 2004-05-08  Michael Snyder  <msnyder@redhat.com>
> 
> 	* event-top.c (handle_sigint): Set quit_flag, so that QUIT
> 	will work the next time it's invoked.
> 
> Index: event-top.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/event-top.c,v
> retrieving revision 1.33
> diff -p -r1.33 event-top.c
> *** event-top.c	28 Feb 2004 18:04:36 -0000	1.33
> --- event-top.c	8 May 2004 03:22:55 -0000
> *************** void
> *** 950,955 ****
> --- 950,956 ----
>   handle_sigint (int sig)
>   {
>     signal (sig, handle_sigint);
> +   quit_flag=1;
>   
>     /* If immediate_quit is set, we go ahead and process the SIGINT right
>        away, even if we usually would defer this to the event loop. The


-- 
Daniel Jacobowitz


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFA] Make QUIT work
  2004-05-08  4:51 ` Daniel Jacobowitz
@ 2004-05-08  6:16   ` Joel Brobecker
  2004-05-10 23:07     ` Michael Snyder
  2004-05-11  1:11   ` Andrew Cagney
  1 sibling, 1 reply; 10+ messages in thread
From: Joel Brobecker @ 2004-05-08  6:16 UTC (permalink / raw)
  To: Michael Snyder, gdb-patches, Elena Zannoni

> See the patch Joel submitted for this last August.  Elena deferred it
> to after 6.1 because just setting quit_flag invokes both sets of event
> handling machinery, potentially quitting twice.

Yes, I look at this a little bit more after you reviewed my patch,
and omigod yes, it quits twice. And unfortunately, I wasn't too sure
by reading the code how this should be made to work (wasn't able to
deduce the design, CRC too weak :-).

We're after 6.1 BTW :-) but poor Elena seems to be drowned with other
stuff, we've hardly seen any message from her for a while :-/.

-- 
Joel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFA] Make QUIT work
  2004-05-08  6:16   ` Joel Brobecker
@ 2004-05-10 23:07     ` Michael Snyder
  2004-05-10 23:09       ` Joel Brobecker
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Snyder @ 2004-05-10 23:07 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches, Elena Zannoni

Joel Brobecker wrote:
See the patch Joel submitted for this last August.  Elena deferred it
to after 6.1 because just setting quit_flag invokes both sets of event
handling machinery, potentially quitting twice.


Yes, I look at this a little bit more after you reviewed my patch,
and omigod yes, it quits twice. And unfortunately, I wasn't too sure
by reading the code how this should be made to work (wasn't able to
deduce the design, CRC too weak :-).
We're after 6.1 BTW :-) but poor Elena seems to be drowned with other
stuff, we've hardly seen any message from her for a while :-/.
OK, I see the "quit twice" problem too, but it leads one to ask:
which is worse?  Quitting once too often, or not quitting at all?
Right now, in some situations at least, you can't quit at all.
That's bad.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFA] Make QUIT work
  2004-05-10 23:07     ` Michael Snyder
@ 2004-05-10 23:09       ` Joel Brobecker
  0 siblings, 0 replies; 10+ messages in thread
From: Joel Brobecker @ 2004-05-10 23:09 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches, Elena Zannoni

> OK, I see the "quit twice" problem too, but it leads one to ask:
> which is worse?  Quitting once too often, or not quitting at all?
> 
> Right now, in some situations at least, you can't quit at all.
> That's bad.

I agree.

-- 
Joel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFA] Make QUIT work
  2004-05-08  4:51 ` Daniel Jacobowitz
  2004-05-08  6:16   ` Joel Brobecker
@ 2004-05-11  1:11   ` Andrew Cagney
  2004-05-11  1:38     ` Michael Snyder
  1 sibling, 1 reply; 10+ messages in thread
From: Andrew Cagney @ 2004-05-11  1:11 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Michael Snyder, gdb-patches, Elena Zannoni

On Sat, May 08, 2004 at 03:27:16AM +0000, Michael Snyder wrote:

Elena, here's something that must have fallen thru the cracks
at some point.  handle_sigint needs to set quit_flag -- or else
QUIT won't quit.  As is currently, QUIT won't work unles
immediate_quit is set -- and I'm pretty sure that's not how
it was intended to work.


See the patch Joel submitted for this last August.  Elena deferred it
to after 6.1 because just setting quit_flag invokes both sets of event
handling machinery, potentially quitting twice.
http://sources.redhat.com/ml/gdb-patches/2004-02/msg00530.html

given quit_flag hasn't worked for 4+ years, we might as well delete 
that.  At least that way there won't be confusion over what needs to be 
fixed.

Andrew




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFA] Make QUIT work
  2004-05-11  1:11   ` Andrew Cagney
@ 2004-05-11  1:38     ` Michael Snyder
  2004-05-11  2:19       ` Daniel Jacobowitz
  2004-05-11 15:07       ` Andrew Cagney
  0 siblings, 2 replies; 10+ messages in thread
From: Michael Snyder @ 2004-05-11  1:38 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Daniel Jacobowitz, gdb-patches, Elena Zannoni

Andrew Cagney wrote:
On Sat, May 08, 2004 at 03:27:16AM +0000, Michael Snyder wrote:

Elena, here's something that must have fallen thru the cracks
at some point.  handle_sigint needs to set quit_flag -- or else
QUIT won't quit.  As is currently, QUIT won't work unles
immediate_quit is set -- and I'm pretty sure that's not how
it was intended to work.


See the patch Joel submitted for this last August.  Elena deferred it
to after 6.1 because just setting quit_flag invokes both sets of event
handling machinery, potentially quitting twice.


http://sources.redhat.com/ml/gdb-patches/2004-02/msg00530.html

given quit_flag hasn't worked for 4+ years, we might as well delete 
that.  At least that way there won't be confusion over what needs to be 
fixed.
I don't agree.  If gdb hangs and you can't quit by typing ^C,
that's a bug.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFA] Make QUIT work
  2004-05-11  1:38     ` Michael Snyder
@ 2004-05-11  2:19       ` Daniel Jacobowitz
  2004-05-11 15:07       ` Andrew Cagney
  1 sibling, 0 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2004-05-11  2:19 UTC (permalink / raw)
  To: Michael Snyder; +Cc: Andrew Cagney, gdb-patches, Elena Zannoni

On Tue, May 11, 2004 at 01:38:24AM +0000, Michael Snyder wrote:
> Andrew Cagney wrote:
> >>On Sat, May 08, 2004 at 03:27:16AM +0000, Michael Snyder wrote:
> >>
> >>>>Elena, here's something that must have fallen thru the cracks
> >>>>at some point.  handle_sigint needs to set quit_flag -- or else
> >>>>QUIT won't quit.  As is currently, QUIT won't work unles
> >>>>immediate_quit is set -- and I'm pretty sure that's not how
> >>>>it was intended to work.
> >>>>
> >>
> >>
> >>See the patch Joel submitted for this last August.  Elena deferred it
> >>to after 6.1 because just setting quit_flag invokes both sets of event
> >>handling machinery, potentially quitting twice.
> >
> >
> > http://sources.redhat.com/ml/gdb-patches/2004-02/msg00530.html
> >
> >given quit_flag hasn't worked for 4+ years, we might as well delete 
> >that.  At least that way there won't be confusion over what needs to be 
> >fixed.
> 
> I don't agree.  If gdb hangs and you can't quit by typing ^C,
> that's a bug.

In fact, I've gotten multiple bug reports about it.

-- 
Daniel Jacobowitz


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFA] Make QUIT work
  2004-05-11  1:38     ` Michael Snyder
  2004-05-11  2:19       ` Daniel Jacobowitz
@ 2004-05-11 15:07       ` Andrew Cagney
  2004-05-11 18:37         ` Michael Snyder
  1 sibling, 1 reply; 10+ messages in thread
From: Andrew Cagney @ 2004-05-11 15:07 UTC (permalink / raw)
  To: Michael Snyder; +Cc: Daniel Jacobowitz, gdb-patches, Elena Zannoni

Andrew Cagney wrote:

On Sat, May 08, 2004 at 03:27:16AM +0000, Michael Snyder wrote:

Elena, here's something that must have fallen thru the cracks
at some point.  handle_sigint needs to set quit_flag -- or else
QUIT won't quit.  As is currently, QUIT won't work unles
immediate_quit is set -- and I'm pretty sure that's not how
it was intended to work.


See the patch Joel submitted for this last August.  Elena deferred it
to after 6.1 because just setting quit_flag invokes both sets of event
handling machinery, potentially quitting twice.


http://sources.redhat.com/ml/gdb-patches/2004-02/msg00530.html

given quit_flag hasn't worked for 4+ years, we might as well delete that.  At least that way there won't be confusion over what needs to be fixed.


I don't agree.  If gdb hangs and you can't quit by typing ^C,
that's a bug. 
(Hmm, no one is saying that this isn't a bug.)

Anyway, lets not drop this again.  Given that you appear to have been 
tasked with the problem, can I leave it to you to to submit the 
correct-fix (as sketched out in the above discussion thread)?

Andrew




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFA] Make QUIT work
  2004-05-11 15:07       ` Andrew Cagney
@ 2004-05-11 18:37         ` Michael Snyder
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Snyder @ 2004-05-11 18:37 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Daniel Jacobowitz, gdb-patches, Elena Zannoni

Andrew Cagney wrote:
Andrew Cagney wrote:

On Sat, May 08, 2004 at 03:27:16AM +0000, Michael Snyder wrote:

Elena, here's something that must have fallen thru the cracks
at some point.  handle_sigint needs to set quit_flag -- or else
QUIT won't quit.  As is currently, QUIT won't work unles
immediate_quit is set -- and I'm pretty sure that's not how
it was intended to work.


See the patch Joel submitted for this last August.  Elena deferred it
to after 6.1 because just setting quit_flag invokes both sets of event
handling machinery, potentially quitting twice.




http://sources.redhat.com/ml/gdb-patches/2004-02/msg00530.html

given quit_flag hasn't worked for 4+ years, we might as well delete 
that.  At least that way there won't be confusion over what needs to 
be fixed.


I don't agree.  If gdb hangs and you can't quit by typing ^C,
that's a bug. 


(Hmm, no one is saying that this isn't a bug.)

Anyway, lets not drop this again.  Given that you appear to have been 
tasked with the problem,
???

can I leave it to you to to submit the 
correct-fix (as sketched out in the above discussion thread)?
No, sorry, I had nothing to do with this.  I'm just the latest
to notice that it is broken.



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-05-11 18:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-08  3:27 [RFA] Make QUIT work Michael Snyder
2004-05-08  4:51 ` Daniel Jacobowitz
2004-05-08  6:16   ` Joel Brobecker
2004-05-10 23:07     ` Michael Snyder
2004-05-10 23:09       ` Joel Brobecker
2004-05-11  1:11   ` Andrew Cagney
2004-05-11  1:38     ` Michael Snyder
2004-05-11  2:19       ` Daniel Jacobowitz
2004-05-11 15:07       ` Andrew Cagney
2004-05-11 18:37         ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox