Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "J. Johnston" <jjohnstn@redhat.com>
To: gdb-patches@sources.redhat.com
Cc: ac131313@redhat.com
Subject: Re: Patch for gdb/mi problem 702
Date: Wed, 23 Oct 2002 15:20:00 -0000	[thread overview]
Message-ID: <3DB7209F.B1AC2251@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0210041436440.3337-100000@valrhona.uglyboxes.com>

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

I have added test scenarios to gdb.mi testsuite to verify the new assign/update
behavior.

gdb/testsuite/gdb.mi/ChangeLog

2002-10-23  Jeff Johnston  <jjohnstn@redhat.com>

	* mi-var-cmd.exp: Add tests to verify that a -var-assign that changes
	a value shows up in the changelist of a -var-update.
	* mi1-var-cmd.exp: Ditto.

Andrew, are you satisfied with my answer to your previous question and may I commit 
the original patch plus these changes?

-- Jeff J.

[-- Attachment #2: 702.test.patch --]
[-- Type: text/plain, Size: 2781 bytes --]

Index: mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.13
diff -u -r1.13 mi-var-cmd.exp
--- mi-var-cmd.exp	3 Oct 2002 20:03:55 -0000	1.13
+++ mi-var-cmd.exp	23 Oct 2002 22:12:48 -0000
@@ -288,6 +288,18 @@
 	"\\^done,value=\"3333\"" \
 	"assign to linteger"
 
+mi_gdb_test "-var-update *" \
+	"\\^done,changelist=\\\[\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+	"update all vars: linteger changed after assign"
+
+mi_gdb_test "-var-assign linteger 3333" \
+	"\\^done,value=\"3333\"" \
+	"assign to linteger again, same value"
+
+mi_gdb_test "-var-update *" \
+	"\\^done,changelist=\\\[\\\]" \
+	"update all vars: linteger not changed after same assign"
+
 mi_gdb_test "-var-evaluate-expression linteger" \
 	"\\^done,value=\"3333\"" \
 	"eval linteger"
@@ -295,6 +307,14 @@
 mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
 	"\\^done,value=\"$hex\"" \
 	"assign to lpinteger"
+
+mi_gdb_test "-var-update *" \
+	"\\^done,changelist=\\\[\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+	"update all vars: lpinteger changed after assign"
+
+mi_gdb_test "-var-update *" \
+	"\\^done,changelist=\\\[\\\]" \
+	"update all vars: no changes on second update"
 
 mi_gdb_test "-var-evaluate-expression lpinteger" \
 	"\\^done,value=\"$hex\"" \
Index: mi1-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi1-var-cmd.exp,v
retrieving revision 1.2
diff -u -r1.2 mi1-var-cmd.exp
--- mi1-var-cmd.exp	1 Oct 2002 16:01:37 -0000	1.2
+++ mi1-var-cmd.exp	23 Oct 2002 22:12:48 -0000
@@ -288,6 +288,18 @@
 	"\\^done,value=\"3333\"" \
 	"assign to linteger"
 
+mi_gdb_test "-var-update *" \
+	"\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
+	"update all vars: linteger changed after assign"
+
+mi_gdb_test "-var-assign linteger 3333" \
+	"\\^done,value=\"3333\"" \
+	"reassign to linteger"
+
+mi_gdb_test "-var-update *" \
+	"\\^done,changelist=\{\}" \
+	"update all vars: linteger not changed after same assign"
+
 mi_gdb_test "-var-evaluate-expression linteger" \
 	"\\^done,value=\"3333\"" \
 	"eval linteger"
@@ -295,6 +307,14 @@
 mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
 	"\\^done,value=\"$hex\"" \
 	"assign to lpinteger"
+
+mi_gdb_test "-var-update *" \
+	"\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \
+	"update all vars: lpinteger changed after assign"
+
+mi_gdb_test "-var-update *" \
+	"\\^done,changelist=\{\}" \
+	"update all vars: no changes for second update"
 
 mi_gdb_test "-var-evaluate-expression lpinteger" \
 	"\\^done,value=\"$hex\"" \

  reply	other threads:[~2002-10-23 22:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-03 16:06 J. Johnston
2002-10-03 17:22 ` Keith Seitz
2002-10-04  9:57   ` J. Johnston
2002-10-04 10:12     ` Keith Seitz
2002-10-04 10:26       ` Alain Magloire
2002-10-04 12:26       ` J. Johnston
2002-10-04 14:35         ` Keith Seitz
2002-10-23 15:20           ` J. Johnston [this message]
2002-10-23 15:39             ` Andrew Cagney
2002-10-23 16:58               ` J. Johnston
2002-10-23 15:43             ` Andrew Cagney
2002-11-08 14:08               ` J. Johnston
2002-11-09 14:02                 ` Eli Zaretskii
2002-11-11  9:12                   ` J. Johnston
2002-10-21 18:40   ` Andrew Cagney
2002-10-22 14:54     ` J. Johnston
     [not found] <200210041725.NAA27681@node1.ott.qnx.com>
2002-10-04 10:51 ` Keith Seitz

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=3DB7209F.B1AC2251@redhat.com \
    --to=jjohnstn@redhat.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.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