From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] New MI notification "=tsv-modified"
Date: Tue, 05 Feb 2013 15:41:00 -0000 [thread overview]
Message-ID: <51112835.1010303@redhat.com> (raw)
In-Reply-To: <51111F75.1020007@codesourcery.com>
On 02/05/2013 03:04 PM, Yao Qi wrote:
> On 02/05/2013 01:30 AM, Pedro Alves wrote:
>> _Which_ value is being talked about here is not explicit.
>> Trace state variables have_two_ values. The initial value,
>> and the current value (omitted if doesn't exist yet).
>
> I meant the initial value here.
>
>> If we list tsvs with MI's -trace-list-variables, we'll indeed
>> see an "init" and a "current" attribute, for each tsv, and no
>> attribute named "value". So I think it'd be very good to fix this
>> before the release, and make the output of the notifications
>> consistent with the tsv listing output, and the docs clearer.
>>
>> E.g.:
>> (gdb) interpreter-exec mi "-trace-list-variables"
>> ^done,trace-variables={nr_rows="1",nr_cols="3",
>> hdr=[{width="15",alignment="-1",col_name="name",colhdr="Name"},
>> {width="11",alignment="-1",col_name="initial",colhdr="Initial"},
>> {width="11",alignment="-1",col_name="current",colhdr="Current"}],
>> body=[variable={name="$a",initial="1"},
>> variable={name="$b",initial="2",current="3"}]
>>
>> SO IOW, =tsv-created should be
>>
>> =tsv-created,name=@var{name},initial=@var{value}
>>
>> instead of the current
>>
>> =tsv-created,name=@var{name},value=@var{value}
>>
>>
>> and =tsv-modified should be
>>
>> =tsv-modified,name=@var{name},initial=@var{value}
>>
>> instead of the proposed
>>
>> =tsv-modified,name=@var{name},value=@var{value}
>
> The patch below implements these MI notifications with suggested
> attributes. "=tsv-modified" is implemented like:
>
> =tsv-modified,name=@var{name},initial=@var{initial},current=@var{current}
>
> I don't refactor function tvariables_info_1 in this patch, and I'd like
> to defer this change to next one.
>
> Is it OK if no test regression?
I think that even without refactoring, we should
do what tvariables_info_1 does and omit "current" if the value
is not known. The -trace-list-variables docs explain this
suppression -- we should probably copy that bit into the
notification docs.
--
Pedro Alves
next prev parent reply other threads:[~2013-02-05 15:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 15:44 Yao Qi
2013-01-30 17:17 ` Eli Zaretskii
2013-02-01 20:38 ` Pedro Alves
2013-02-02 8:29 ` Yao Qi
2013-02-04 17:55 ` Pedro Alves
2013-02-05 15:05 ` Yao Qi
2013-02-05 15:41 ` Pedro Alves [this message]
2013-02-06 13:12 ` Yao Qi
2013-02-06 14:31 ` Pedro Alves
2013-02-06 14:46 ` Yao Qi
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=51112835.1010303@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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