Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch:MI] Observer for thread-changed
Date: Wed, 11 Jun 2008 00:08:00 -0000	[thread overview]
Message-ID: <18510.64049.562871.546098@kahikatea.snap.net.nz> (raw)
In-Reply-To: <200806101232.37186.ghost@cs.msu.su>

 > >  > Are you planning to write tests, and document the new notification?
 > > 
 > > There certainly should be tests and documentation, and I will do write
 > > some, but I don't see any for the existing notifications, namely
 > > "thread-created" and "thread-exited".
 > 
 > You probably missed those. Here's what my checkout of gdb.texinfo reads:
 > 
 > 	@item =thread-created,id="@var{id}"
 > 	@itemx =thread-exited,id="@var{id}"
 > 	A thread either was created, or has exited.  The @var{id} field
 > 	contains the @value{GDBN} identifier of the thread.

OK.  Are there any tests?

I think that event notifications should have their own node.  I also think that
the manual should be restructured so that the node "GDB/MI Output Records"
comes _under_ the node "GDB/MI Command Syntax" and that the nodes in "GDB/MI
Output Records" are linked with their description in "GDB/MI Output Syntax"


 > > You could say the same about user-defined functions that use the "threads"
 > > command.

 > No, because user-defined functions are typed by the user and passed through
 > to GDB, and if those commands change thread, UI should update. On the
 > contrary, if the frontend sent -thread-select, it means it wanted to set GDB
 > current thread to be the same as the current thread presently shown in the
 > UI, so I see no point for frontend to be notified. Can you outline a use case
 > where frontend would actually like to be notified about the thing it just
 > did?

In my scenario the frontend would automatically display the selected thread,
not select the thread that is displayed.


 > > I don't think MI should be used as a programming language.  I don't think
 > > -thread-select should be used by the front end except when the user
 > > explicitly requests to change threads.  In fact, I would even suggest that
 > > there should be no -thread-select and that all MI commands should be
 > > reflective

 > What is "reflective"?

Maybe it's not the right word.  Perhaps I mean introspective, i.e., just
reports the state like -break-list or -environment-pwd and doesn't change it
like -thread-select or -stack-select-frame, for example.

 
> > With a complete set of notifications, the usual CLI commands could be used
 > > to change state and the front end could just parse the MI output.

 > Could be used where? If in GDB console, then sure, but that does not require
 > that -thread-select output notification.

I mean the front end could just use CLI commands to change the state provided
there were MI notifications that would report that change.


 > > But the first patch was wrong for other reasons, as Pedro pointed out.

 > IIUC, the primary objection was that we'd emit notification even if
 > gdb_thread_select caught an exception. Can we protect against this by
 > checking that inferior_ptid actually changed?

Pedro says he has a patch that splits the notion of user/frontend selected
thread and frame, from the internally selected thread and frame.  Let's wait
to see how that fits in.


-- 
Nick                                           http://www.inet.net.nz/~nickrob


  reply	other threads:[~2008-06-10 22:04 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-09 12:16 Nick Roberts
2008-06-09 13:36 ` Pedro Alves
2008-06-09 13:28   ` Pedro Alves
2008-06-09 15:06   ` Pedro Alves
2008-06-09 14:15     ` Pedro Alves
2008-06-09 23:35   ` Nick Roberts
2008-06-10  1:40     ` Pedro Alves
2008-06-10  2:30       ` Nick Roberts
2008-06-10  3:13         ` Pedro Alves
2008-06-10  6:39           ` Nick Roberts
2009-01-17  0:10             ` [PATCH]:annotations [was Re: [patch:MI] Observer for thread-changed] Nick Roberts
2009-01-17 17:54               ` [PATCH]:annotations Tom Tromey
2008-06-10  8:26         ` [patch:MI] Observer for thread-changed Vladimir Prus
2008-06-10  9:24           ` Nick Roberts
2008-06-10 10:26             ` Vladimir Prus
2008-06-10 17:23           ` Daniel Jacobowitz
2008-06-14 18:52             ` Vladimir Prus
2008-06-14 19:13               ` Tom Tromey
2008-06-14 19:22                 ` Bob Rossi
2008-06-15  3:20                   ` Nick Roberts
2008-06-14 20:04                 ` Vladimir Prus
2008-06-15 21:51                   ` Tom Tromey
2008-06-14 19:43               ` Daniel Jacobowitz
2008-06-15  0:44                 ` Nick Roberts
2008-06-15 21:03                   ` Vladimir Prus
2008-06-15 22:31                     ` Nick Roberts
2008-06-16 22:28                     ` Daniel Jacobowitz
2008-06-15 17:58                 ` Vladimir Prus
2008-06-10  8:40 ` Vladimir Prus
2008-06-10  9:19   ` Nick Roberts
2008-06-10  9:36     ` Vladimir Prus
2008-06-11  0:08       ` Nick Roberts [this message]
2008-06-11  7:46         ` Eli Zaretskii

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=18510.64049.562871.546098@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    /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