From: Jeff Johnston Date: Wed, 23 Oct 2002 23:57:28 +0000 (+0000) Subject: 2002-10-23 Jeff Johnston X-Git-Tag: cagney-unwind-20030108-branchpoint~1023 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b8e0647739f0d0b25a8f4b812f688e8b2396bc9;p=platform%2Fupstream%2Fbinutils.git 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. --- diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog index d383030..0a89d16 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 26a91cf..1902793 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 4ca8d16..0f0d522 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"