public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: archer@sourceware.org, utrace-devel@redhat.com
Subject: Re: gdbstub initial code, v5
Date: Tue, 24 Aug 2010 23:36:00 -0000	[thread overview]
Message-ID: <20100824233600.4A3184048C@magilla.sf.frob.com> (raw)
In-Reply-To: Oleg Nesterov's message of  Friday, 20 August 2010 19:37:49 +0200 <20100820173749.GA24358@redhat.com>

> When the main thread exits, gdbserver still exposes it to gdb as
> a running process. It is visible via "info threads", you can switch
> to this thread, $Tp or $Hx result in "OK" as if this thread is alive.
> gdbserver even pretends that $vCont;x:DEAD_THEAD works, although
> this thread obviously can never report something.

This is sort of consistent with the kernel treatment.  The main thread
stays around as a zombie, acting as a moniker for the whole process.  But
indeed that is not actually useful for any thread-granularity control or
information (well, there is the dead thread's usage stats, but that's all).

> I don't think this is really right. This just confuses the user, and
> imho this should be considered like the minor bug.

I tend to agree, but don't think it's a big issue either way, really.

> ugdb doesn't do this. If the main thread exits - it exits like any
> other thread. I played with gdb, it seems to handle this case fine.

Sounds good to me!

> 	- The exit code (Wxx) can be wrong in mt-case.
> 
> 	  The problem is, ->report_death can't safely access
> 	  ->group_exit_code with kernel < 2.6.35. This is
> 	  solveable.

Don't even worry about it.  If there is something trivial to do that makes
it better for earlier kernels, then go ahead.  But if the easy thing to do
gives correct results on >=2.6.35 and racily wrong or random results on
older kernels, then we can just live with that.


Thanks,
Roland

      parent reply	other threads:[~2010-08-24 23:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 17:41 Oleg Nesterov
2010-08-23 18:55 ` Oleg Nesterov
2010-08-24 17:10   ` Oleg Nesterov
2010-08-24 23:36 ` Roland McGrath [this message]

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=20100824233600.4A3184048C@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=archer@sourceware.org \
    --cc=oleg@redhat.com \
    --cc=utrace-devel@redhat.com \
    /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).