Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: drow@false.org
Cc: gdb-patches@sources.redhat.com
Subject: Re: remote debugging a multi-threaded program with signal
Date: Fri, 05 Mar 2004 02:25:00 -0000	[thread overview]
Message-ID: <20040305.112722.74754522.nemoto@toshiba-tops.co.jp> (raw)
Message-ID: <20040305022500.a-0nR1eos_D_NGJmdJniPDuOFi2o2P9b2gFjVaE2QDM@z> (raw)
In-Reply-To: <20040304222800.GA29911@nevyn.them.org>

>>>>> On Thu, 4 Mar 2004 17:28:00 -0500, Daniel Jacobowitz <drow@false.org> said:
drow> I thought you said you got the same results without
drow> verbose-resume?  Oh, I suppose you would; without verbose-resume
drow> it's pot-luck which thread gets the signal.

drow> If I use a pre-vCont gdb client with the current gdbserver I
drow> see:

drow> [sigtest:30016:16384]:main
drow> [sigtest:30018:16386]:func
drow> [sigtest:30016:16384]:send SIGUSR1
drow> [sigtest:30016:16384]:send SIGUSR1

Oh yes, I got the same result without verbose-reume, but I did not see
any ':sigwait 10' messages on another machine.

drow> That resumes only the thread in question.  This is in
drow> target-indepenedent code and the only reason that lin-lwp native
drow> execution does not show the same problem is that it shortcuts
drow> around this code completely (see lin_lwp_wait).

You mean following code in lin_lwp_wait (lin-lwp.c:1518) ?

      if (signal_stop_state (signo) == 0
	  && signal_print_state (signo) == 0
	  && signal_pass_state (signo) == 1)
	{
	  /* FIMXE: kettenis/2001-06-06: Should we resume all threads
	     here?  It is not clear we should.  GDB may not expect

It shourcuts the code on "noprint" case, but not on "nostop" case.  So
I suppose native execution also have this problem.

drow> Could you try this instead?

Thank you.  It works well with verbose-resume.

How about when verbose-resume was disabled or unavailable?  If
verbose-resume is necessary to continue with signal, gdb can warn it
for users?  Or gdbserver can resume all threads on this case?

---
Atsushi Nemoto


  parent reply	other threads:[~2004-03-05  2:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-03 15:59 Atsushi Nemoto
2004-03-19  0:09 ` Atsushi Nemoto
2004-03-04 14:58   ` Atsushi Nemoto
2004-03-04 22:28   ` Daniel Jacobowitz
2004-03-19  0:09     ` Atsushi Nemoto
2004-03-05  4:15       ` Atsushi Nemoto
2004-03-19  0:09     ` Atsushi Nemoto [this message]
2004-03-05  2:25       ` Atsushi Nemoto
2004-03-19  0:09       ` Atsushi Nemoto
2004-03-05 16:36         ` Atsushi Nemoto
2004-03-05 16:38         ` Daniel Jacobowitz
2004-03-06 12:42           ` Atsushi Nemoto
2004-03-19  0:09             ` Daniel Jacobowitz
2004-03-06 17:11               ` Daniel Jacobowitz
2004-03-07 14:14               ` Atsushi Nemoto
2004-03-19  0:09                 ` Atsushi Nemoto
2004-03-19  0:09             ` Atsushi Nemoto
2004-03-19  0:09           ` Daniel Jacobowitz
2004-03-19  0:09     ` Daniel Jacobowitz
2004-03-19  0:09 ` Atsushi Nemoto

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=20040305.112722.74754522.nemoto@toshiba-tops.co.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.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