From 7b8e0647739f0d0b25a8f4b812f688e8b2396bc9 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 23 Oct 2002 23:57:28 +0000 Subject: [PATCH] 2002-10-23 Jeff Johnston * 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. Part of fix for gdb/702. * mi1-var-cmd.exp: Ditto. --- gdb/testsuite/gdb.mi/ChangeLog | 7 +++++++ gdb/testsuite/gdb.mi/mi-var-cmd.exp | 20 ++++++++++++++++++++ gdb/testsuite/gdb.mi/mi1-var-cmd.exp | 20 ++++++++++++++++++++ 3 files changed, 47 insertions(+) diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog index d3830308095..0a89d164601 100644 --- a/gdb/testsuite/gdb.mi/ChangeLog +++ b/gdb/testsuite/gdb.mi/ChangeLog @@ -1,3 +1,10 @@ +2002-10-23 Jeff Johnston + + * 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. Part of fix + for gdb/702. + * mi1-var-cmd.exp: Ditto. + 2002-10-03 Jeff Johnston * mi-return.exp: Change expected frame output to remove extraneous diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp index 26a91cf960b..1902793d357 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp @@ -288,6 +288,18 @@ mi_gdb_test "-var-assign linteger 3333" \ "\\^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" @@ -296,6 +308,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\"" \ "eval lpinteger" diff --git a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp index 4ca8d16d5f8..0f0d522b80c 100644 --- a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp @@ -288,6 +288,18 @@ mi_gdb_test "-var-assign linteger 3333" \ "\\^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" @@ -296,6 +308,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\"" \ "eval lpinteger" -- 2.30.2