* gdb.c++/classes.exp: Add test for static member function.
* gdb.c++/misc.cc: Add class with static member function.
This commit is contained in:
parent
8032bf31ff
commit
af890c5292
3 changed files with 29 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2001-12-07 Daniel Jacobowitz <drow@mvista.com>
|
||||||
|
|
||||||
|
* gdb.c++/classes.exp: Add test for static member function.
|
||||||
|
* gdb.c++/misc.cc: Add class with static member function.
|
||||||
|
|
||||||
2001-12-07 Jim Blandy <jimb@redhat.com>
|
2001-12-07 Jim Blandy <jimb@redhat.com>
|
||||||
|
|
||||||
If GDB says it can't find the struct the function returned, report
|
If GDB says it can't find the struct the function returned, report
|
||||||
|
|
|
@ -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"
|
send_gdb "ptype class vA\n"
|
||||||
gdb_expect {
|
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 $" {
|
-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 $" {
|
||||||
|
|
|
@ -269,6 +269,14 @@ void inheritance1 (void)
|
||||||
inheritance2 ();
|
inheritance2 ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ======================== static member functions =====================
|
||||||
|
|
||||||
|
class Static {
|
||||||
|
public:
|
||||||
|
static void ii(int, int);
|
||||||
|
};
|
||||||
|
void Static::ii (int, int) { }
|
||||||
|
|
||||||
// ======================== virtual base classes=========================
|
// ======================== virtual base classes=========================
|
||||||
|
|
||||||
class vA {
|
class vA {
|
||||||
|
|
Loading…
Add table
Reference in a new issue