diff options
author | Daniel Jacobowitz <drow@false.org> | 2001-12-07 21:58:19 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2001-12-07 21:58:19 +0000 |
commit | af890c52921261d004ea69f40d1e59d98eb5f311 (patch) | |
tree | 238e5bb9996fd8b00b80e1d63a741644058f90ff /gdb/testsuite/gdb.c++/classes.exp | |
parent | 8032bf31ffa06609035efb3a8bc00f89b6e83d7b (diff) | |
download | gdb-af890c52921261d004ea69f40d1e59d98eb5f311.zip gdb-af890c52921261d004ea69f40d1e59d98eb5f311.tar.gz gdb-af890c52921261d004ea69f40d1e59d98eb5f311.tar.bz2 |
* gdb.c++/classes.exp: Add test for static member function.
* gdb.c++/misc.cc: Add class with static member function.
Diffstat (limited to 'gdb/testsuite/gdb.c++/classes.exp')
-rw-r--r-- | gdb/testsuite/gdb.c++/classes.exp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.c++/classes.exp b/gdb/testsuite/gdb.c++/classes.exp index 5b559d7..68142eb 100644 --- a/gdb/testsuite/gdb.c++/classes.exp +++ b/gdb/testsuite/gdb.c++/classes.exp @@ -308,6 +308,22 @@ proc test_ptype_class_objects {} { } } + # With g++ 2.x and stabs debug info, we misinterpret static methods + # whose name matches their argument mangling. + send_gdb "ptype class Static\n" + gdb_expect { + -re "type = (class|struct) Static \{(${ws}public:|)${ws}Static & operator=\\(Static const ?&\\);${ws}Static\\(Static const ?&\\);${ws}Static\\((void|)\\);${ws}static void ii\\(int, int\\);${ws}\}$nl$gdb_prompt $" { + pass "ptype class Static" + } + -re ".*$gdb_prompt $" { + fail "ptype class Static" + } + timeout { + fail "ptype class Static (timeout)" + return + } + } + send_gdb "ptype class vA\n" gdb_expect { -re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;${ws}vA & operator=\\(vA const &\\);${ws}vA\\(vA const &\\);${ws}vA\\((void|)\\);${ws}\}$nl$gdb_prompt $" { |