* [RFA/MI testsuite] test varobj type changing
@ 2002-09-17 12:33 Keith Seitz
2002-09-17 13:00 ` Andrew Cagney
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Keith Seitz @ 2002-09-17 12:33 UTC (permalink / raw)
To: gdb-patches
Hi,
Varobj can track the name of a variable through different frames. With MI
this is specified by giving -var-create the special frame flag "@".
Whenever the type of the variable changes, then, MI informs the user that
this has happened.
I've added a brief test to make sure that this is working properly.
Keith
ChangeLog
2002-09-17 Keith Seitz <keiths@redhat.com>
* mi-var-cmd.exp: Add tests to check when varobj pinned to a
selected frame changes type.
Patch
Index: testsuite/gdb.mi/mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.10
diff -p -r1.10 mi-var-cmd.exp
*** testsuite/gdb.mi/mi-var-cmd.exp 10 Sep 2002 22:28:44 -0000 1.10
--- testsuite/gdb.mi/mi-var-cmd.exp 17 Sep 2002 19:32:00 -0000
***************
*** 1,4 ****
! # Copyright (C) 1999, 2000, 2002 Cygnus Solutions
#
# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright (C) 1999, 2000, 2002 Free Software Foundation
#
# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
*************** mi_gdb_test "-var-delete i" \
*** 518,523 ****
--- 518,552 ----
mi_gdb_test "-var-delete l" \
"\\^done,ndeleted=\"1\"" \
"delete var l"
+
+ # Test whether we can follow the name of a variable through multiple
+ # stack frames.
+ mi_gdb_test "-break-insert do_special_tests" \
+ {\^done,bkpt=.*} \
+ "set breakpoint at do_special_tests"
+
+ mi_continue_to {.*} do_special_tests {.*} {.*var-cmd.c} {.*} {stop in do_special_tests}
+
+ mi_gdb_test "-var-create selected_a @ a" \
+ {\^done,name="selected_a",numchild="0",type="int"} \
+ "create selected_a"
+
+ mi_gdb_test "-break-insert incr_a" \
+ {\^done,bkpt=.*} \
+ "set breakpoint at incr_a"
+
+ mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a}
+
+ mi_gdb_test "-var-update selected_a" \
+ {\^done,changelist=\{name="selected_a",in_scope="true",new_type="char",new_num_children="0"\}} \
+ "update selected_a in incr_a"
+
+ mi_next "step a line in incr_a"
+ mi_next "return from incr_a to do_special_tests"
+
+ mi_gdb_test "-var-update selected_a" \
+ {\^done,changelist=\{name="selected_a",in_scope="true",new_type="int",new_num_children="0"\}} \
+ "update selected_a in do_special_tests"
mi_gdb_exit
return 0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/MI testsuite] test varobj type changing
2002-09-17 12:33 [RFA/MI testsuite] test varobj type changing Keith Seitz
@ 2002-09-17 13:00 ` Andrew Cagney
2002-09-17 13:15 ` Keith Seitz
2002-09-17 13:01 ` Andrew Cagney
2002-09-18 7:47 ` Fernando Nasser
2 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-09-17 13:00 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches
(oops) Keith, can you please, separatly just change the copyright of all
the mi files to the FSF.
> ! # Copyright (C) 1999, 2000, 2002 Cygnus Solutions
> #
> # This Program Is Free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> --- 1,4 ----
> ! # Copyright (C) 1999, 2000, 2002 Free Software Foundation
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/MI testsuite] test varobj type changing
2002-09-17 12:33 [RFA/MI testsuite] test varobj type changing Keith Seitz
2002-09-17 13:00 ` Andrew Cagney
@ 2002-09-17 13:01 ` Andrew Cagney
2002-09-17 13:45 ` Keith Seitz
2002-09-18 7:47 ` Fernando Nasser
2 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2002-09-17 13:01 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches
> Hi,
>
> Varobj can track the name of a variable through different frames. With MI
> this is specified by giving -var-create the special frame flag "@".
> Whenever the type of the variable changes, then, MI informs the user that
> this has happened.
>
> I've added a brief test to make sure that this is working properly.
Yes ok (and actually i think you and fernando are the ones to figure out
if a change to this file is valid -- it just so happens that MI can test
varobj).
Andrew
> Keith
>
> ChangeLog
> 2002-09-17 Keith Seitz <keiths@redhat.com>
>
> * mi-var-cmd.exp: Add tests to check when varobj pinned to a
> selected frame changes type.
>
> Patch
> Index: testsuite/gdb.mi/mi-var-cmd.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
> retrieving revision 1.10
> diff -p -r1.10 mi-var-cmd.exp
> *** testsuite/gdb.mi/mi-var-cmd.exp 10 Sep 2002 22:28:44 -0000 1.10
> --- testsuite/gdb.mi/mi-var-cmd.exp 17 Sep 2002 19:32:00 -0000
> ***************
> *** 1,4 ****
> ! # Copyright (C) 1999, 2000, 2002 Cygnus Solutions
> #
> # This Program Is Free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> --- 1,4 ----
> ! # Copyright (C) 1999, 2000, 2002 Free Software Foundation
> #
> # This Program Is Free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> *************** mi_gdb_test "-var-delete i" \
> *** 518,523 ****
> --- 518,552 ----
> mi_gdb_test "-var-delete l" \
> "\\^done,ndeleted=\"1\"" \
> "delete var l"
> +
> + # Test whether we can follow the name of a variable through multiple
> + # stack frames.
> + mi_gdb_test "-break-insert do_special_tests" \
> + {\^done,bkpt=.*} \
> + "set breakpoint at do_special_tests"
> +
> + mi_continue_to {.*} do_special_tests {.*} {.*var-cmd.c} {.*} {stop in do_special_tests}
> +
> + mi_gdb_test "-var-create selected_a @ a" \
> + {\^done,name="selected_a",numchild="0",type="int"} \
> + "create selected_a"
> +
> + mi_gdb_test "-break-insert incr_a" \
> + {\^done,bkpt=.*} \
> + "set breakpoint at incr_a"
> +
> + mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a}
> +
> + mi_gdb_test "-var-update selected_a" \
> + {\^done,changelist=\{name="selected_a",in_scope="true",new_type="char",new_num_children="0"\}} \
> + "update selected_a in incr_a"
> +
> + mi_next "step a line in incr_a"
> + mi_next "return from incr_a to do_special_tests"
> +
> + mi_gdb_test "-var-update selected_a" \
> + {\^done,changelist=\{name="selected_a",in_scope="true",new_type="int",new_num_children="0"\}} \
> + "update selected_a in do_special_tests"
>
> mi_gdb_exit
> return 0
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/MI testsuite] test varobj type changing
2002-09-17 13:00 ` Andrew Cagney
@ 2002-09-17 13:15 ` Keith Seitz
0 siblings, 0 replies; 6+ messages in thread
From: Keith Seitz @ 2002-09-17 13:15 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Tue, 17 Sep 2002, Andrew Cagney wrote:
> (oops) Keith, can you please, separatly just change the copyright of all
> the mi files to the FSF.
Ah, yes, I'll remove that from this patch and commit those copyright
changes separately (as obvious).
Keith
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/MI testsuite] test varobj type changing
2002-09-17 13:01 ` Andrew Cagney
@ 2002-09-17 13:45 ` Keith Seitz
0 siblings, 0 replies; 6+ messages in thread
From: Keith Seitz @ 2002-09-17 13:45 UTC (permalink / raw)
To: gdb-patches
On Tue, 17 Sep 2002, Andrew Cagney wrote:
> Yes ok (and actually i think you and fernando are the ones to figure out
> if a change to this file is valid -- it just so happens that MI can test
> varobj).
Committed (sans the copyright stuff).
Thank you for the quick review.
Keith
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFA/MI testsuite] test varobj type changing
2002-09-17 12:33 [RFA/MI testsuite] test varobj type changing Keith Seitz
2002-09-17 13:00 ` Andrew Cagney
2002-09-17 13:01 ` Andrew Cagney
@ 2002-09-18 7:47 ` Fernando Nasser
2 siblings, 0 replies; 6+ messages in thread
From: Fernando Nasser @ 2002-09-18 7:47 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches
OK with me...
And thanks again.
Fernando
Keith Seitz wrote:
> Hi,
>
> Varobj can track the name of a variable through different frames. With MI
> this is specified by giving -var-create the special frame flag "@".
> Whenever the type of the variable changes, then, MI informs the user that
> this has happened.
>
> I've added a brief test to make sure that this is working properly.
>
> Keith
>
> ChangeLog
> 2002-09-17 Keith Seitz <keiths@redhat.com>
>
> * mi-var-cmd.exp: Add tests to check when varobj pinned to a
> selected frame changes type.
>
> Patch
> Index: testsuite/gdb.mi/mi-var-cmd.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
> retrieving revision 1.10
> diff -p -r1.10 mi-var-cmd.exp
> *** testsuite/gdb.mi/mi-var-cmd.exp 10 Sep 2002 22:28:44 -0000 1.10
> --- testsuite/gdb.mi/mi-var-cmd.exp 17 Sep 2002 19:32:00 -0000
> ***************
> *** 1,4 ****
> ! # Copyright (C) 1999, 2000, 2002 Cygnus Solutions
> #
> # This Program Is Free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> --- 1,4 ----
> ! # Copyright (C) 1999, 2000, 2002 Free Software Foundation
> #
> # This Program Is Free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> *************** mi_gdb_test "-var-delete i" \
> *** 518,523 ****
> --- 518,552 ----
> mi_gdb_test "-var-delete l" \
> "\\^done,ndeleted=\"1\"" \
> "delete var l"
> +
> + # Test whether we can follow the name of a variable through multiple
> + # stack frames.
> + mi_gdb_test "-break-insert do_special_tests" \
> + {\^done,bkpt=.*} \
> + "set breakpoint at do_special_tests"
> +
> + mi_continue_to {.*} do_special_tests {.*} {.*var-cmd.c} {.*} {stop in do_special_tests}
> +
> + mi_gdb_test "-var-create selected_a @ a" \
> + {\^done,name="selected_a",numchild="0",type="int"} \
> + "create selected_a"
> +
> + mi_gdb_test "-break-insert incr_a" \
> + {\^done,bkpt=.*} \
> + "set breakpoint at incr_a"
> +
> + mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a}
> +
> + mi_gdb_test "-var-update selected_a" \
> + {\^done,changelist=\{name="selected_a",in_scope="true",new_type="char",new_num_children="0"\}} \
> + "update selected_a in incr_a"
> +
> + mi_next "step a line in incr_a"
> + mi_next "return from incr_a to do_special_tests"
> +
> + mi_gdb_test "-var-update selected_a" \
> + {\^done,changelist=\{name="selected_a",in_scope="true",new_type="int",new_num_children="0"\}} \
> + "update selected_a in do_special_tests"
>
> mi_gdb_exit
> return 0
>
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-09-18 14:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-17 12:33 [RFA/MI testsuite] test varobj type changing Keith Seitz
2002-09-17 13:00 ` Andrew Cagney
2002-09-17 13:15 ` Keith Seitz
2002-09-17 13:01 ` Andrew Cagney
2002-09-17 13:45 ` Keith Seitz
2002-09-18 7:47 ` Fernando Nasser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox