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: [RFC] MI: Event notification
Date: Thu, 04 Jan 2007 20:49:00 -0000	[thread overview]
Message-ID: <17821.26712.100127.455097@kahikatea.snap.net.nz> (raw)
In-Reply-To: <E1H2ZAL-0004Jm-Rr@zigzag.lvk.cs.msu.su>

 > > The general idea is to report changes in program state to the frontend so
 > > that it only updates the parts that need it.  For example, after "up"
 > > frame_changed_hook triggers and the frontend knows it has to update the
 > > locals display.
 > 
 > You mean, after "up" emitted explicitly by the user? If the frontend changes
 > the frame itself, it does not need any notifications.

It might not be by clicking on a button but by typing "up" or even "u" from
the console (GUD buffer).  In such a case how would the frontend know that
the frame has changed?

 > > This means that stepping through a single frame should be much 
 > > quicker.  If GDB enters a new frame during execution, stack_changed_hook
 > > triggers and the frontend knows it has to update the call stack display. 
 > > I would eventually like to add more hooks like target-changed-hook when
 > > the user attaches to/detaches from a process, kills the process, or
 > > selects a new target with the "file" command.
 > 
 > Is this all for user-typed commands? I wonder if notifications for those are
 > really needed. Reloading entire UI state after a user command does not seem
 > too bad -- because user is not likely to enter 10 commands per second anyway
 > -- and is much simpler.

With a large stack and stepping through the program, I think it is very
noticeable, which is why I frequently try to select a line to run to.

 > > The hooks are inserted/removed through "interpreter-exec console
 > > cli-command" 
 > 
 > Sorry, can you clarify?

In mi_cmd_interpreter_exec, there are calls to mi_insert_notify_hooks and
mi_remove_notify_hooks.

 > > so I envisage not using MI commands like -exec-run, 
 > > -exec-next, -stack-select-frame that change that state.

mi_cmd_interpreter_exec only gets called with "interpreter-exec" so there
would be no event notification in this case.

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


  reply	other threads:[~2007-01-04 20:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-01 23:50 Nick Roberts
2007-01-04 20:26 ` Vladimir Prus
2007-01-04 20:49   ` Nick Roberts [this message]
2007-01-04 21:14     ` Vladimir Prus
2007-01-05  1:18       ` Nick Roberts

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=17821.26712.100127.455097@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