This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug gdb/9747] Quit and "(running)" bug


------- Additional Comments From pedro at codesourcery dot com  2009-01-20 12:57 -------
Thanks.  Hmm, I hadn't placed the cleanup around target_create_inferior,
because, run_command_1 doesn't know about the inferior's ptid yet at that point,
but, it will be in inferior_ptid, so I think this particular case can be fixed
easily.

However, a thought has crossed my mind.  I'm considering removing the
is_executing property from the core, and pushing it down to the target.  Of the
non-stop and/or async aware targets, linux-nat.h/c already manages the
lwp->stopped flag; remote.c doesn't have anything of the sort yet though.  Other
targets could also default to false, I think.

I'm thinking about the case where an exception is thrown from target_wait (it is
documented as an invalid thing to do, but, targets do that.).  In that case,
considering the linux target, we can end up with is_executing == true,
lwp->stopped = 1, which is out of sync.

We could also go the other way around, get rid of lwp->stopped, in
favour of is_executing.  That is, make all targets use the core facility.

This getting stuck bug happens always when the inferior was told to resume, then
it stops in some internal event, then an exception is thrown which brings us to
the CLI again.  The core side will believe that the thread is
still running.  A case of information being stored in several places, which can
get out of sync.

I need to:

 1) see if there's a better place to put an exception catcher that drops to the cli
 2) see if I can do something to reduce information duplication.

The hurdle is async mode.  There is no good central place for #1 right now that
I can think of.  There aren't that many places that resume the target, though.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=9747

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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