Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: Vladimir Prus <ghost@cs.msu.su>, <gdb-patches@sources.redhat.com>
Subject: Re: [PATCH 3/3] suppress notification
Date: Tue, 28 Aug 2012 13:50:00 -0000	[thread overview]
Message-ID: <503CCC7A.8040805@codesourcery.com> (raw)
In-Reply-To: <503CCA27.7070607@redhat.com>

On 08/28/2012 09:39 PM, Pedro Alves wrote:
>
> Alternatively, set the notification suppression down in the command callback itself.
> I mention it for completeness.  Maybe you've considered it, and decided against it.
>

Are you suggesting that we can set breakpoint suppression flag in each 
breakpoint related CLI commands, such as "delete breakpoint", "disable 
breakpoint", and so forth?

>> >
>> >Ideally, we can do this in a more-OO'ed manner,
>> >
>> >   1 add a new field 'int called' in 'struct mi_cmd',
>> >   2 set 'parse->cmd->called' in mi_cmd_execute to 1 and set it back to 0 when it is done.
>> >   3 pass 'struct mi_cmd *' to each MI command function, for example change function mi_breakpoint_created to
>> >
>> >   mi_breakpoint_created (struct mi_cmd *self, struct breakpoint *b)
>> >
>> >   4 inside each MI command function, return early if self->called is 1.  Then, we can get rid of mi_suppress_notification completely.
> Confused.  mi_breakpoint_created is not a MI command function, but rather a
> notification observer.  Whoever calls the observers (observer_notify_breakpoint_created)
> is disconnected from commands, and I don't see that the coupling would be a good idea.
>

Oops, my brain stopped working at that moment.  Sorry for the confusion, 
and please ignore it.

-- 
Yao


  reply	other threads:[~2012-08-28 13:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27  9:46 [PATCH 0/3] Factor code on suppress MI notification Yao Qi
2012-08-27  9:46 ` [PATCH 1/3] add static to mi_cmds Yao Qi
2012-08-27  9:46 ` [PATCH 3/3] suppress notification Yao Qi
2012-08-27 20:20   ` Tom Tromey
2012-08-27 21:01   ` Vladimir Prus
2012-08-28  2:06     ` Tom Tromey
2012-08-28  4:50       ` Vladimir Prus
2012-08-28  7:58     ` Yao Qi
2012-08-28 11:57       ` Vladimir Prus
2012-08-28 13:09         ` Yao Qi
2012-08-28 13:40           ` Pedro Alves
2012-08-28 13:50             ` Yao Qi [this message]
2012-08-28 14:09               ` Pedro Alves
2012-08-31  8:07     ` Yao Qi
2012-08-31  8:22       ` Vladimir Prus
2012-08-31  8:49         ` [committed]: " Yao Qi
2012-08-27  9:46 ` [PATCH 2/3] new macro DEF_MI_CMD_CLI and DEF_MI_CMD_MI Yao Qi
2012-08-27 20:18   ` Tom Tromey

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=503CCC7A.8040805@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    --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