aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-mi.exp
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2011-04-29 12:45:46 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2011-04-29 12:45:46 +0000
commitd65aec65d9e22f5232e414a4d8abef8f1279b090 (patch)
treed63d1f287b66a4d4591ca1010fa34023de1cbc42 /gdb/testsuite/gdb.python/py-mi.exp
parentb15d6aa360e54b5b921960261a015466f18bcb3c (diff)
downloadgdb-d65aec65d9e22f5232e414a4d8abef8f1279b090.zip
gdb-d65aec65d9e22f5232e414a4d8abef8f1279b090.tar.gz
gdb-d65aec65d9e22f5232e414a4d8abef8f1279b090.tar.bz2
2011-04-29 Phil Muldoon <pmuldoon@redhat.com>
PR mi/12531 * varobj.c (install_default_visualizer): Do not install a visualizer if the varobj is CPLUS_FAKE_CHILD. (construct_visualizer): Likewise. 2011-04-29 Phil Muldoon <pmuldoon@redhat.com> PR mi/12531 * gdb.python/py-mi.exp: Add CPLUS_FAKE_CHILD tests and a C++ compile target. * gdb.python/py-prettyprint.exp: Add C++ object for CPLUS_FAKE_CHILD test.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-mi.exp')
-rw-r--r--gdb/testsuite/gdb.python/py-mi.exp40
1 files changed, 40 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-mi.exp b/gdb/testsuite/gdb.python/py-mi.exp
index 629417b..37359e9 100644
--- a/gdb/testsuite/gdb.python/py-mi.exp
+++ b/gdb/testsuite/gdb.python/py-mi.exp
@@ -283,4 +283,44 @@ mi_list_varobj_children nstype2 {
{ {nstype2.<error at 0>} {<error at 0>} 6 {char \[6\]} }
} "list children after setting exception flag"
+# C++ MI tests
+gdb_exit
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+ executable {debug c++ additional_flags=-DMI}] != "" } {
+ untested "Couldn't compile ${srcfile} in c++ mode"
+ return -1
+}
+
+if [mi_gdb_start] {
+ continue
+}
+mi_delete_breakpoints
+mi_gdb_reinitialize_dir $srcdir/$subdir
+mi_gdb_load ${binfile}
+
+if {[lsearch -exact [mi_get_features] python] < 0} {
+ unsupported "python support is disabled"
+ return -1
+}
+
+mi_runto main
+mi_continue_to_line \
+ [gdb_get_line_number {break to inspect struct and union} ${testfile}.c] \
+ "step to breakpoint"
+
+# Test python/12531. Install visualizer on a cplus_fake_child.
+mi_create_varobj fake fake \
+ "create fake varobj"
+
+mi_list_varobj_children fake {
+ { fake.private private 1 }
+} "list children of fake"
+
+mi_list_varobj_children fake.private {
+ { fake.private.sname sname 0 int }
+} "list children fake.private"
+
+mi_gdb_test "-var-set-visualizer fake.private gdb.default_visualizer" \
+ "\\^done" "Install visualizer on a cplus_fake_child"
+
remote_file host delete ${remote_python_file}