From 5330f2dba0362e4d084545b8935c1b10ed8c7fbc Mon Sep 17 00:00:00 2001 From: David Carlton Date: Tue, 4 Mar 2003 17:02:20 +0000 Subject: [PATCH] 2003-03-04 David Carlton * gdb.c++/templates.exp (do_tests): Accept valid const in "print Garply >:: garply". (test_ptype_of_templates): KFAIL "ptype T5" and "ptype t5i" with respect to PR c++/1111; note also PR c++/1113. (test_template_breakpoints): KFAIL "constructor breakpoint" with respect to PR c++/1062. KFAIL "destructor breakpoint" with respect to PR c++/1112. --- gdb/testsuite/ChangeLog | 10 ++++++++++ gdb/testsuite/gdb.c++/templates.exp | 30 +++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 14b54f4c376..fa7aa7312cf 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2003-03-04 David Carlton + + * gdb.c++/templates.exp (do_tests): Accept valid const in "print + Garply >:: garply". + (test_ptype_of_templates): KFAIL "ptype T5" and "ptype t5i" + with respect to PR c++/1111; note also PR c++/1113. + (test_template_breakpoints): KFAIL "constructor breakpoint" with + respect to PR c++/1062. + KFAIL "destructor breakpoint" with respect to PR c++/1112. + 2003-03-03 David Carlton * gdb.c++/classes.exp (test_enums): KFAIL "ptype obj_with_enum" diff --git a/gdb/testsuite/gdb.c++/templates.exp b/gdb/testsuite/gdb.c++/templates.exp index 7ef1c1d7f72..00f5ada7bea 100644 --- a/gdb/testsuite/gdb.c++/templates.exp +++ b/gdb/testsuite/gdb.c++/templates.exp @@ -61,6 +61,10 @@ proc test_ptype_of_templates {} { -re "type = class T5 \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5 & operator=\\(T5 const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\((T5 const|const T5) ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" { pass "ptype T5 (obsolescent gcc or gdb)" } + -re "type = class T5 \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5 const|const T5) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" { + # This also triggers gdb/1113... + kfail "gdb/1111" "ptype T5" + } -re ".*$gdb_prompt $" { fail "ptype T5" } @@ -83,6 +87,10 @@ proc test_ptype_of_templates {} { -re "type = class T5 \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5 & operator=\\(T5 const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\(T5 const ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" { pass "ptype t5i (obsolescent gcc or gdb)" } + -re "type = class T5 \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5 const|const T5) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" { + # This also triggers gdb/1113... + kfail "gdb/1111" "ptype T5" + } -re ".*$gdb_prompt $" { fail "ptype t5i" } @@ -114,6 +122,12 @@ proc test_template_breakpoints {} { "canceled" \ "constructor breakpoint" } + -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. T5 at .*\[\r\n\]*.3. T5 at .*\[\r\n\]*> $" { + setup_kfail "gdb/1062" "*-*-*" + gdb_test "0" \ + "nonsense intended to insure that this test fails" \ + "constructor breakpoint" + } -re ".*\n> $" { gdb_test "0" \ "nonsense intended to insure that this test fails" \ @@ -125,9 +139,17 @@ proc test_template_breakpoints {} { # See CLLbs14792 if {$hp_aCC_compiler} {setup_xfail hppa*-*-* CLLbs14792} - gdb_test "break T5::~T5" \ - "Breakpoint.*at.* file .*${testfile}.cc, line.*" \ - "destructor breakpoint" + + gdb_test_multiple "break T5::~T5" "destructor_breakpoint" { + -re "Breakpoint.*at.* file .*${testfile}.cc, line.*$gdb_prompt $" + { + pass "destructor breakpoint" + } + -re "the class `T5' does not have destructor defined\r\nHint: try 'T5::~T5 or 'T5::~T5\r\n\\(Note leading single quote.\\)\r\n$gdb_prompt $" + { + kfail "gdb/1112" "destructor breakpoint" + } + } gdb_test "break T5::value" \ "Breakpoint.*at.* file .*${testfile}.cc, line.*" \ @@ -479,7 +501,7 @@ gdb_expect { send_gdb "print Garply >::garply\n" gdb_expect { - -re "\\$\[0-9\]* = \\{(class |)Garply \\((class |)Garply > \\*, int, (class |)Garply\\)\\} $hex \[ \t\]*>::garply\\(int, (class |)Garply\\)>\r\n$gdb_prompt $" { pass "print Garply >::garply" } + -re "\\$\[0-9\]* = \\{(class |)Garply \\((class |)Garply > \\*(| const), int, (class |)Garply\\)\\} $hex \[ \t\]*>::garply\\(int, (class |)Garply\\)>\r\n$gdb_prompt $" { pass "print Garply >::garply" } -re ".*$gdb_prompt $" { fail "print Garply >::garply" } timeout { fail "print Garply >::garply (timeout)" } } -- 2.30.2