This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [BUG] Quit and "(running)" problem
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- Date: Thu, 15 Jan 2009 14:42:26 +0000
- Subject: Re: [BUG] Quit and "(running)" problem
- References: <000001c9770e$5579c160$006d4420$@u-strasbg.fr>
On Thursday 15 January 2009 12:39:39, Pierre Muller wrote:
> I have troubles with CVS HEAD gdb on cygwin,
> related to the "(running)" state. But I don't think that
> this problem is windows specific...
It isn't.
> (top-gdb) set height 1
> (top-gdb) n
> ---Type <return> to continue, or q <return> to quit---q
> Quit
This is one of the reasons I tell people that a pagination
request is an easy way to get exceptions in unexpected
places. In this case, this is comming from normal_stop, I believe.
As a general guideline, we should try to do *_filtered output only
after having done all the side effects we wanted.
> (top-gdb) set height 80
> (top-gdb) inf thr
> 2 Thread 3768.0xb0 (running)
> * 1 Thread 3768.0xd98 (running)
> (top-gdb) cont
> Continuing.
> Cannot execute this command while the selected thread is running.
> (top-gdb)
>
> The problem is the set_running function
> introduced for the non-stop mode probably:
> the fact on Quitting at the --Type <return> question
> bypasses the
> set_running(..,0)
> (I discovered that by adding an printout on
> each set_running call)
> and thus leaves gdb beleaaving that
> the threads are running while non-stop mode is
> not even implemented yet on cygwin native gdb!
Yep.
> This needs a fix!
Believe it or not, I zapped this morning a source tree by mistake
where I had most of the fix for this. :-(
I'm working on it again.
--
Pedro Alves