OLD | NEW |
1 # Copyright (C) 2008-2012 Free Software Foundation, Inc. | 1 # Copyright (C) 2008-2012 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 |
16 # This file is part of the GDB testsuite. It tests Python-based | 16 # This file is part of the GDB testsuite. It tests Python-based |
17 # pretty-printing for MI. | 17 # pretty-printing for MI. |
18 | 18 |
19 load_lib mi-support.exp | 19 load_lib mi-support.exp |
20 set MIFLAGS "-i=mi2" | 20 set MIFLAGS "-i=mi2" |
21 | 21 |
22 gdb_exit | 22 gdb_exit |
23 if [mi_gdb_start] { | 23 if [mi_gdb_start] { |
24 continue | 24 continue |
25 } | 25 } |
26 | 26 |
27 set testfile "py-mi" | 27 standard_testfile py-prettyprint.c |
28 set srcfile py-prettyprint.c | |
29 set binfile ${objdir}/${subdir}/${testfile} | |
30 set pyfile py-prettyprint.py | 28 set pyfile py-prettyprint.py |
31 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug additional_flags=-DMI}] != "" } { | 29 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug additional_flags=-DMI}] != "" } { |
32 untested ${testfile}.exp | 30 untested ${testfile}.exp |
33 return -1 | 31 return -1 |
34 } | 32 } |
35 | 33 |
36 mi_delete_breakpoints | 34 mi_delete_breakpoints |
37 mi_gdb_reinitialize_dir $srcdir/$subdir | 35 mi_gdb_reinitialize_dir $srcdir/$subdir |
38 mi_gdb_load ${binfile} | 36 mi_gdb_load ${binfile} |
39 | 37 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 { {nstype2.<error at 0>} {<error at 0>} 6 {char \[6\]} } | 282 { {nstype2.<error at 0>} {<error at 0>} 6 {char \[6\]} } |
285 } "list children after setting exception flag" | 283 } "list children after setting exception flag" |
286 | 284 |
287 mi_create_varobj me me \ | 285 mi_create_varobj me me \ |
288 "create me varobj" | 286 "create me varobj" |
289 | 287 |
290 mi_gdb_test "-var-evaluate-expression me" \ | 288 mi_gdb_test "-var-evaluate-expression me" \ |
291 "\\^done,value=\"<error reading variable: Cannot access memory.>.*\"" \ | 289 "\\^done,value=\"<error reading variable: Cannot access memory.>.*\"" \ |
292 "evaluate me varobj" | 290 "evaluate me varobj" |
293 | 291 |
| 292 # Regression test for python/14836. |
| 293 mi_create_dynamic_varobj children_as_list children_as_list \ |
| 294 "printer whose children are returned as a list" |
| 295 |
294 # C++ MI tests | 296 # C++ MI tests |
295 gdb_exit | 297 gdb_exit |
296 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" \ | 298 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" \ |
297 executable {debug c++ additional_flags=-DMI}] != "" } { | 299 executable {debug c++ additional_flags=-DMI}] != "" } { |
298 untested "Couldn't compile ${srcfile} in c++ mode" | 300 untested "Couldn't compile ${srcfile} in c++ mode" |
299 return -1 | 301 return -1 |
300 } | 302 } |
301 | 303 |
302 if [mi_gdb_start] { | 304 if [mi_gdb_start] { |
303 continue | 305 continue |
(...skipping 21 matching lines...) Expand all Loading... |
325 } "list children of fake" | 327 } "list children of fake" |
326 | 328 |
327 mi_list_varobj_children fake.private { | 329 mi_list_varobj_children fake.private { |
328 { fake.private.sname sname 0 int } | 330 { fake.private.sname sname 0 int } |
329 } "list children fake.private" | 331 } "list children fake.private" |
330 | 332 |
331 mi_gdb_test "-var-set-visualizer fake.private gdb.default_visualizer" \ | 333 mi_gdb_test "-var-set-visualizer fake.private gdb.default_visualizer" \ |
332 "\\^done" "Install visualizer on a cplus_fake_child" | 334 "\\^done" "Install visualizer on a cplus_fake_child" |
333 | 335 |
334 remote_file host delete ${remote_python_file} | 336 remote_file host delete ${remote_python_file} |
OLD | NEW |