* gdb.cp/call-c.exp: Test for incorrect handling of reference
to pointer.
* gdb.cp/call-c.cc: Likewise.
+2008-06-06 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * gdb.cp/call-c.exp: Test for incorrect handling of reference
+ to pointer.
+ * gdb.cp/call-c.cc: Likewise.
+
2008-06-06 Nick Roberts <nickrob@snap.net.nz>
* gdb.base/annota1.exp (thread_switch): Test for thread-changed
return x;
}
+struct Foo {
+ Foo() : x_(1) { }
+ int func() const { return x_; }
+ private:
+ int x_;
+};
+
int main()
{
+ Foo f;
+ Foo *pf = &f;
+ Foo* &rf = pf;
+ rf->func(); /* set breakpoint here */
return func(0);
}
runto_main
+gdb_test "b [gdb_get_line_number {breakpoint here} ${testfile}.cc ]" \
+ ".*Breakpoint .*call-c.*"
+
gdb_test "print foo(1)" "\\\$$decimal = 1"
+gdb_test "continue" ".*breakpoint here.*" "continue to bp"
+gdb_test "print rf->func()" "\\\$$decimal = 1"