Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Pedro Alves <palves@redhat.com>,
	Simon Marchi <simon.marchi@polymtl.ca>,
	<gdb-patches@sourceware.org>
Cc: Antoine Tremblay <antoine.tremblay@ericsson.com>
Subject: Re: [PATCH v3 1/2] Emit inferior, thread and frame selection events to all UIs
Date: Mon, 03 Oct 2016 17:40:00 -0000	[thread overview]
Message-ID: <10ca4c2c-29cf-8edb-c9e3-087d2e6461d2@ericsson.com> (raw)
In-Reply-To: <906fc6d1-01f2-c81b-2ff9-ef11b787ec9e@redhat.com>

On 16-10-03 12:47 PM, Pedro Alves wrote:
> Hi Simon,
> 
> This looks good to me now, module a couple minor issues pointed out
> below.  Fix these and you're good to go.
> 
> On 09/24/2016 09:13 PM, Simon Marchi wrote:
>> @@ -1885,7 +1901,19 @@ void
>>  cmd_func (struct cmd_list_element *cmd, char *args, int from_tty)
>>  {
>>    if (cmd_func_p (cmd))
>> -    (*cmd->func) (cmd, args, from_tty);
>> +    {
>> +      struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
>> +
>> +      if (cmd->suppress_notification != NULL)
>> +	{
>> +	  cleanups = make_cleanup_restore_integer (cmd->suppress_notification);
> 
> This will incorrectly leave the null_cleanup not run.
> You should not overwrite "cleanups".  Should be just:
> 
>   +	  make_cleanup_restore_integer (cmd->suppress_notification);

Done, thanks.

>> +	  *cmd->suppress_notification = 1;
>> +	}
>> +
>> +      (*cmd->func) (cmd, args, from_tty);
>> +
>> +      do_cleanups (cleanups);
> 
> 
> 
>> +  else /* MI_COMMAND */
>> +    {
>> +      if (strcmp (command->command, "interpreter-exec") == 0
>> +	  && command->argc > 1)
>> +
> 
> This empty line here made me pause and think that the code
> looks suspicious.  Better would be to wrap the then/else blocks
> in {}s, since they're multi-line.

Right, it's clearer.

>> +@item =thread-selected,id="@var{id}"[,frame="@var{frame}"]
>> +Informs that the selected thread or frame were changed.  This notification
>> +is not emitted as result of the @code{-thread-select} or
>> +@code{-stack-select-frame} commands, but is emitted whenever an MI command
>> +that is not documented to change the selected thread and frame actually
>> +changes them.  In particular, invoking, directly or indirectly
>> +(via user-defined command), the CLI @code{thread} or @code{frame} commands,
>> +will generate this notification.  Changing the thread of frame from another
>> +user interface (see @ref{Interpreters}) will also generate this notification.
>> +
> 
> Typo: s/thread of frame/thread or frame/

Woops, thanks.

I'll give it a last complete test run before pushing.

Simon


  reply	other threads:[~2016-10-03 17:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-24 21:45 Simon Marchi
2016-09-24 20:13 ` [PATCH v3 2/2] Add test for user context selection sync Simon Marchi
2016-10-03 17:10   ` Pedro Alves
2016-10-03 17:48     ` Simon Marchi
2016-09-25 12:41 ` [PATCH v3 1/2] Emit inferior, thread and frame selection events to all UIs Eli Zaretskii
2016-09-26  2:25   ` Simon Marchi
2016-10-03 16:47 ` Pedro Alves
2016-10-03 17:40   ` Simon Marchi [this message]
2016-10-03 21:03     ` Simon Marchi
2016-12-08 12:02 ` Thomas Schwinge
2016-12-08 15:25   ` Simon Marchi
2016-12-09  6:22     ` Thomas Schwinge

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=10ca4c2c-29cf-8edb-c9e3-087d2e6461d2@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=antoine.tremblay@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    /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