OLD | NEW |
1 # Copyright 1999-2002, 2004-2005, 2007-2012 Free Software Foundation, | 1 # Copyright 1999-2002, 2004-2005, 2007-2012 Free Software Foundation, |
2 # Inc. | 2 # Inc. |
3 # | 3 # |
4 # This program is free software; you can redistribute it and/or modify | 4 # This program is free software; you can redistribute it and/or modify |
5 # it under the terms of the GNU General Public License as published by | 5 # it under the terms of the GNU General Public License as published by |
6 # the Free Software Foundation; either version 3 of the License, or | 6 # the Free Software Foundation; either version 3 of the License, or |
7 # (at your option) any later version. | 7 # (at your option) any later version. |
8 # | 8 # |
9 # This program is distributed in the hope that it will be useful, | 9 # This program is distributed in the hope that it will be useful, |
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 | 22 |
23 load_lib mi-support.exp | 23 load_lib mi-support.exp |
24 set MIFLAGS "-i=mi" | 24 set MIFLAGS "-i=mi" |
25 | 25 |
26 gdb_exit | 26 gdb_exit |
27 if [mi_gdb_start] { | 27 if [mi_gdb_start] { |
28 continue | 28 continue |
29 } | 29 } |
30 | 30 |
31 set testfile "var-cmd" | 31 standard_testfile var-cmd.c |
32 set srcfile ${testfile}.c | 32 |
33 set binfile ${objdir}/${subdir}/mi-var-cmd | 33 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
34 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug additional_flags=-DFAKEARGV}] != "" } { | |
35 untested mi-var-cmd.exp | 34 untested mi-var-cmd.exp |
36 return -1 | 35 return -1 |
37 } | 36 } |
38 | 37 |
39 mi_delete_breakpoints | 38 mi_delete_breakpoints |
40 mi_gdb_reinitialize_dir $srcdir/$subdir | 39 mi_gdb_reinitialize_dir $srcdir/$subdir |
41 mi_gdb_load ${binfile} | 40 mi_gdb_load ${binfile} |
42 | 41 |
43 | 42 |
44 ##### ##### | 43 ##### ##### |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 # and does not incorrectly make the value as changed. | 369 # and does not incorrectly make the value as changed. |
371 mi_gdb_test "-var-assign func do_block_tests" \ | 370 mi_gdb_test "-var-assign func do_block_tests" \ |
372 "\\^done,value=\"$hex <do_block_tests>\"" \ | 371 "\\^done,value=\"$hex <do_block_tests>\"" \ |
373 "assign same value to func" | 372 "assign same value to func" |
374 | 373 |
375 mi_gdb_test "-var-update *" \ | 374 mi_gdb_test "-var-update *" \ |
376 "\\^done,changelist=\\\[\\\]" \ | 375 "\\^done,changelist=\\\[\\\]" \ |
377 "assign same value to func (update)" | 376 "assign same value to func (update)" |
378 | 377 |
379 mi_gdb_test "-var-create array_ptr * array_ptr" \ | 378 mi_gdb_test "-var-create array_ptr * array_ptr" \ |
380 » "\\^done,name=\"array_ptr\",numchild=\"1\",value=\"$hex\",type=\"int \\*
\",has_more=\"0\"" \ | 379 » "\\^done,name=\"array_ptr\",numchild=\"1\",value=\"$hex <array>\",type=\
"int \\*\",has_more=\"0\"" \ |
381 "create global variable array_ptr" | 380 "create global variable array_ptr" |
382 | 381 |
383 mi_gdb_test "-var-assign array_ptr array2" \ | 382 mi_gdb_test "-var-assign array_ptr array2" \ |
384 » "\\^done,value=\"$hex\"" \ | 383 » "\\^done,value=\"$hex <array2>\"" \ |
385 "assign array to pointer" | 384 "assign array to pointer" |
386 | 385 |
387 mi_gdb_test "-var-update *" \ | 386 mi_gdb_test "-var-update *" \ |
388 "\\^done,changelist=\\\[\{name=\"array_ptr\",in_scope=\"true\",type_chan
ged=\"false\",has_more=\"0\"\}\\\]" \ | 387 "\\^done,changelist=\\\[\{name=\"array_ptr\",in_scope=\"true\",type_chan
ged=\"false\",has_more=\"0\"\}\\\]" \ |
389 "assign array to pointer (update)" | 388 "assign array to pointer (update)" |
390 | 389 |
391 mi_gdb_test "-var-assign array_ptr array2" \ | 390 mi_gdb_test "-var-assign array_ptr array2" \ |
392 » "\\^done,value=\"$hex\"" \ | 391 » "\\^done,value=\"$hex <array2>\"" \ |
393 "assign same array to pointer" | 392 "assign same array to pointer" |
394 | 393 |
395 mi_gdb_test "-var-update *" \ | 394 mi_gdb_test "-var-update *" \ |
396 "\\^done,changelist=\\\[\\\]" \ | 395 "\\^done,changelist=\\\[\\\]" \ |
397 "assign same array to pointer (update)" | 396 "assign same array to pointer (update)" |
398 | 397 |
399 | 398 |
400 ###### | 399 ###### |
401 # End of assign tests | 400 # End of assign tests |
402 ##### | 401 ##### |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 mi_gdb_test "-var-update L" \ | 657 mi_gdb_test "-var-update L" \ |
659 {\^done,changelist=\[{name="L",in_scope="true",type_changed="false",has_more
="0"}\]} \ | 658 {\^done,changelist=\[{name="L",in_scope="true",type_changed="false",has_more
="0"}\]} \ |
660 "in-and-out-of-scope: in scope now" | 659 "in-and-out-of-scope: in scope now" |
661 | 660 |
662 mi_gdb_test "-var-update L" \ | 661 mi_gdb_test "-var-update L" \ |
663 {\^done,changelist=\[\]} \ | 662 {\^done,changelist=\[\]} \ |
664 "in-and-out-of-scope: in scope now, not changed" | 663 "in-and-out-of-scope: in scope now, not changed" |
665 | 664 |
666 mi_gdb_exit | 665 mi_gdb_exit |
667 return 0 | 666 return 0 |
OLD | NEW |