public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "pedro at codesourcery dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/9747] Quit and "(running)" bug
Date: Tue, 20 Jan 2009 12:57:00 -0000	[thread overview]
Message-ID: <20090120125709.15158.qmail@sourceware.org> (raw)
In-Reply-To: <20090115160028.9747.muller@ics.u-strasbg.fr>


------- 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.


  parent reply	other threads:[~2009-01-20 12:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 16:00 [Bug gdb/9747] New: " muller at ics dot u-strasbg dot fr
2009-01-15 16:05 ` [Bug gdb/9747] " pedro at codesourcery dot com
2009-01-18 17:42 ` cvs-commit at gcc dot gnu dot org
2009-01-18 17:58 ` pedro at codesourcery dot com
2009-01-20 12:34 ` luisgpm at linux dot vnet dot ibm dot com
2009-01-20 12:57 ` pedro at codesourcery dot com [this message]
2009-01-20 19:26 ` luisgpm at linux dot vnet dot ibm dot com
2009-01-22 15:54 ` pedro at codesourcery dot com
2009-01-22 15:56 ` pedro at codesourcery dot com
2009-01-26 13:05 ` luisgpm at linux dot vnet dot ibm dot com
     [not found] <bug-9747-4717@http.sourceware.org/bugzilla/>
2014-03-22  0:09 ` dje at google dot com
2023-10-10 12:44 ` tromey at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090120125709.15158.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).