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: Fri, 01 Feb 2013 20:38:00 -0000 [thread overview]
Message-ID: <510C27CE.3090102@redhat.com> (raw)
In-Reply-To: <1359560580-1970-1-git-send-email-yao@codesourcery.com>
On 01/30/2013 03:43 PM, Yao Qi wrote:
> Hi,
> I added MI notifications "=tsv-created" and "=tsv-deleted" in this
> patch, http://sourceware.org/ml/gdb-patches/2012-09/msg00191.html
> We think it is still necessary to add another MI notification
> "=tsv-modified" for the changes of the initial value of a tsv. This
> is what this patch does.
Should we emit a notification when GDB detects the target
changes the variable too?
> 2013-01-30 Yao Qi <yao@codesourcery.com>
>
> * mi/mi-interp.c (mi_tsv_modified): Declare.
> (mi_interpreter_init): Call observer_attach_tsv_modified.
> (mi_tsv_modified): New.
> * tracepoint.c (trace_variable_command): Call
> observer_notify_tsv_modified if the initial value of tsv is
> changed.
>
> * NEWS: Mention the new MI notification.
Please spell out the notification. Nothing else in the GDB
ChangeLog entry indicates what is "the new".
>
> gdb/testsuite:
>
> 2013-01-30 Yao Qi <yao@codesourcery.com>
>
> * gdb.trace/mi-tsv-changed.exp (test_create_delete_tsv): Rename
> to ...
> (test_create_delete_modify_tsv): New.
It's a rename, or a new function?
> @@ -37,6 +37,9 @@ proc test_create_delete_tsv { } {with_test_prefix "create delete" {
> mi_gdb_test "tvariable \$tvar1" \
> ".*=tsv-created,name=\"tvar1\",value=\"0\"\\\\n.*\\^done" \
> "tvariable \$tvar1"
> + mi_gdb_test "tvariable \$tvar1 = 1" \
> + ".*=tsv-modified,name=\"tvar1\",value=\"1\"\\\\n.*\\^done" \
> + "tvariable \$tvar1 modified"
It would be thorough to test that another "tvariable \$tvar1 = 1"
_doesn't_ emit a modified notification.
> mi_gdb_test "tvariable \$tvar2 = 45" \
> ".*=tsv-created,name=\"tvar2\",value=\"45\"\\\\n.*\\^done" \
> "tvariable \$tvar2"
> @@ -81,6 +84,10 @@ proc test_upload_tsv { } { with_test_prefix "upload" {
> gdb_test "tvariable \$tvar2 = 45" \
> "Trace state variable \\\$tvar2 created, with initial value 45." \
> "Create a trace state variable with initial value"
> +
> + gdb_test "tvariable \$tvar3 = 1" \
> + "Trace state variable \\\$tvar3 created, with initial value 1." \
> + "Create a trace state variable \$tvar3 with initial value 1"
I couldn't figure out what motivated this addition.
--
Pedro Alves
next prev parent reply other threads:[~2013-02-01 20:38 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 [this message]
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
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=510C27CE.3090102@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