Index: insight219-b.cc =================================================================== RCS file: insight219-b.cc diff -N insight219-b.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ insight219-b.cc 24 Apr 2003 21:54:00 -0000 @@ -0,0 +1,4 @@ +#include "insight219.h" + +B::~B() {} + Index: insight219.cc =================================================================== RCS file: insight219.cc diff -N insight219.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ insight219.cc 24 Apr 2003 21:54:00 -0000 @@ -0,0 +1,8 @@ +#include "insight219.h" + +int +main(int argc, char *argv[]) +{ + B *b = new B(); + return 0; +}; Index: insight219.exp =================================================================== RCS file: insight219.exp diff -N insight219.exp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ insight219.exp 24 Apr 2003 21:54:00 -0000 @@ -0,0 +1,61 @@ +# Copyright 2003 Free Software Foundation, Inc. + +# 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gdb@prep.ai.mit.edu + +# +# test insight/792 +# + +if { [skip_cplus_tests] } { continue } + +load_lib mi-support.exp +set MIFLAGS "-i=mi" + +gdb_exit +if [mi_gdb_start] { + continue +} + +set testfile insight219 +set srcfiles [list insight219.cc insight219-b.cc] +set binfile $objdir/$subdir/$testfile + +if [get_compiler_info ${binfile} "c++"] { + return -1; +} + +set srcs "" +foreach srcfile $srcfiles { + set srcs "$srcs $srcdir/$subdir/$srcfile" +} + +if {[gdb_compile $srcs $binfile executable {debug c++}] != ""} { + gdb_suppress_entire_file "Testcase compile failed, so all test in this file will automatically fail." +} + +# Test that children of classes are properly reported + +# Run to main +mi_run_to_main + +mi_gdb_test "-var-create - * b" \ + "(&\".*\"\r\n)*\\^done,name=\"var1\",numchild=\"1\",type=\"class B \\\*\"" \ + "create var for class B" + +mi_gdb_exit +return 0 Index: insight219.h =================================================================== RCS file: insight219.h diff -N insight219.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ insight219.h 24 Apr 2003 21:54:00 -0000 @@ -0,0 +1,8 @@ +class B +{ +public: + virtual ~B(); + +private: + int b; +};