Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: gnu@toad.com, mark.kettenis@xs4all.nl, brobecker@adacore.com,
	gdb@sourceware.org
Subject: Re: Time to expand "Program received signal" ?
Date: Thu, 15 Nov 2012 20:58:00 -0000	[thread overview]
Message-ID: <83vcd6shw7.fsf@gnu.org> (raw)
In-Reply-To: <50A55196.4090303@redhat.com>

> Date: Thu, 15 Nov 2012 20:33:26 +0000
> From: Pedro Alves <palves@redhat.com>
> CC: gnu@toad.com, mark.kettenis@xs4all.nl, brobecker@adacore.com,
>         gdb@sourceware.org
> 
> >>>> It makes no sense to me to have "thread apply all FOO" do nothing
> >>>> for non-threaded inferiors.
> >>>
> >>> No one said it should do nothing.  "Main thread" implies there _is_ a
> >>> thread.
> >>
> >> Yes, and my point is, if people have no problem in calling these special
> >> cases single-threaded (where single implies more than zero), and if
> >> as you say, there _is_ a thread, then the discussion we're having
> >> of whether to say "Thread 1 received ..." is a bit silly.
> > 
> > It's not silly, because these are two different use cases.  In one use
> > case, the _user_ types a thread-related command.  In the other, _GDB_
> > talks about threads in the context of a single-threaded program.  The
> > former case cannot possibly cause user confusion, because it was the
> > user who mentioned threads in the first place.
> > 
> >> Either we assume non-threaded == single-threaded, and admit that in
> >> that case non-threaded inferiors always have at least one thread, or
> >> we don't, and "thread apply all " should not apply to non-threaded
> >> inferiors.  As you called it, it's a matter of self-consistency.
> > 
> > The OP's concern was about the UI, not about GDB's own internal
> > consistency.
> 
> But I'm talking about UI!  "thread apply all" is a user command.
> If you'd expect "thread apply all bt" to produce a backtrace on a
> non-threaded inferior, wouldn't you say that's because there _is_ _a_
> thread in the inferior?  And if so then that thread must have a number
> the user can refer to?  And if so, what is the issue with always
> consistently telling the user the thread that got the signal?
> I can't honestly believe any real user would be confused by this.

We are talking about 2 different users here.  One is who types "thread
apply all SOMETHING" -- this one evidently expects a single-threaded
program to behave as a threaded one with 1 thread.  The other user is
who didn't type any thread-related commands, just had GDB print

  Thread XYZ received signal SIGFOO

This one _might_ be confused.

> Oh well, I'm beginning to consider dropping the patch for now.

That was not my intent.  I don't object to the patch.


  reply	other threads:[~2012-11-15 20:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 18:27 Pedro Alves
2012-11-13 16:25 ` Joel Brobecker
2012-11-13 16:40   ` Mark Kettenis
2012-11-13 17:22     ` Pedro Alves
2012-11-13 22:40       ` John Gilmore
2012-11-14 10:26         ` Pedro Alves
2012-11-14 19:54           ` John Gilmore
2012-11-15 10:36             ` Pedro Alves
2012-11-15 16:58               ` Eli Zaretskii
2012-11-15 17:21                 ` Pedro Alves
2012-11-15 17:51                   ` Joel Brobecker
2012-11-15 18:16                   ` Eli Zaretskii
2012-11-15 18:27                     ` Paul_Koning
2012-11-15 18:27                     ` Pedro Alves
2012-11-15 19:07                       ` Eli Zaretskii
2012-11-15 20:33                         ` Pedro Alves
2012-11-15 20:58                           ` Eli Zaretskii [this message]
2012-11-15 19:27         ` Tom Tromey
2012-11-15 22:21           ` John Gilmore
2012-11-15 22:27             ` Paul_Koning
2012-11-16  0:22               ` John Gilmore
2012-11-16  8:25               ` Eli Zaretskii
2012-11-13 17:23     ` Joel Brobecker

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=83vcd6shw7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=gnu@toad.com \
    --cc=mark.kettenis@xs4all.nl \
    --cc=palves@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