public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Nick Bull <nicholaspbull@gmail.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Events when inferior is modified
Date: Sun, 01 Dec 2013 15:23:00 -0000	[thread overview]
Message-ID: <CABbKtXsCHz_aDihw5X0dwnv=wmOe=YUqbkLqut+tZ6D4FiLVfg@mail.gmail.com> (raw)
In-Reply-To: <52931CEC.7040407@redhat.com>

On 25 November 2013 09:48, Phil Muldoon <pmuldoon@redhat.com> wrote:
> On 18/11/13 12:39, Nick Bull wrote:
>
>> This patch adds new observers, and corresponding Python events, for
>> various actions on an inferior: calling a function (by hand),
>> modifying registers or modifying memory.
>
> Thanks just a few nits and some questions. I did not see tests for
> these, and also, documentation?  In any case, both are needed.

Phil,

Thanks for looking at this. All the nits make sense, and I'll fix them and
add tests.

> I'm kind of on the fence about the inferior_altered naming.  A lot of
> things can alter an inferior which would make this a very broad event
> category. Like single stepping I would consider altering the inferior.
>
> With your memory changed event, would it fire on a breakpoint
> insertion? GDB does a lot of installing/uninstalling of breakpoints
> behind the scene in the inferior.
>
> Also, it would be super if we could split up the register
> and memory events with read/write events.  What do you think?

I'm going to revise the memory change event to use the existing
memory_changed observer, which I had overlooked because it doesn't
have a Python event. It's closer to what I wanted anyway, which is
to track only modifications to the program that are made explicitly by
the GDB user.

Given this I would give it a separate MemoryChangedEvent type so
that the name matches the corresponding observer. Then the other
events would be RegisterChanged and InferiorCall.

I suppose we might want to somehow distinguish that these events are
about explicit changes to program state rather than the 'behind-the-scenes'
work that GDB does, in case we ever want to create events of the
latter type. But I don't have any great suggestions for names just now.

Nick

  reply	other threads:[~2013-12-01 15:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 17:07 Nick Bull
2013-07-30 21:04 ` Tom Tromey
2013-08-01 15:47   ` Pedro Alves
2013-08-07 14:41   ` Nick Bull
2013-11-18 12:51     ` [PATCH v2] " Nick Bull
2013-11-18 15:15       ` Eli Zaretskii
2013-11-25 11:50       ` Phil Muldoon
2013-12-01 15:23         ` Nick Bull [this message]
2013-12-09 17:48           ` Nick Bull
2013-12-10 11:04             ` Phil Muldoon
2013-12-12 17:12               ` Nick Bull
2013-12-21 21:26                 ` Nick Bull

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='CABbKtXsCHz_aDihw5X0dwnv=wmOe=YUqbkLqut+tZ6D4FiLVfg@mail.gmail.com' \
    --to=nicholaspbull@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@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).