This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/RFC] QUIT doesn't seem to be working !?


On Fri, Feb 20, 2004 at 12:51:10PM -0500, Andrew Cagney wrote:
> >>Yes.  I did a quick user poll over lunch and everyone indicated that 
> >>>contrl-c "works for me" (the sample included heavy java and C++ users!).
> >
> >
> >I am a bit surprised by this, because, as far as I can remember, I
> >couldn't understand how this feature could work (no offense meant,
> >just to say that it appeared that this functionality was not just
> >broken under certain circumstances, but instead was never working).
> 
> So was I - a more exact quote of the response was "It's broken!?!?".  It 
> turns out that cntrl-c is being polled sufficiently often for people to 
> not notice that there is a problem vis:
> 
> (gdb) set height 2
> (gdb) info frame
> Stack level 0, frame at 0x7fffe5c0:
> ---Type <return> to continue, or q <return> to quit---Quit
> 
> > For me, Control-C is working when the debugger is waiting for an event
> > from the inferior. However, it is not working when the debugger is
> > busy inside a greedy loop (ie the QUIT macro does not abort the
> > loop).

Right - I think that the "when running" case is the only thing that's
got high user visibility for our average user.  Me, I run into the
problem Joel is patching all the time.  I just did five minutes ago.
I mean to type
(gdb) info addr to_offset
and instead type
(gdb) info var to_offset

which sends GDB off into an expensive (5sec or so on this app) search.

(gdb) info var to_offset
^C^C^Cdarnit
^C
(gdb) Quit
(gdb) Quit
(gdb) Quit
Undefined command: "darnit".  Try "help".
(gdb) Quit
(gdb)


> Just don't try this at home:
> 
> (gdb) while 1
> end
> 
> (but I suspect that's always been broken as well).

Is there even a QUIT in that code path?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]