aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.c++/member-ptr.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.c++/member-ptr.exp')
-rw-r--r--gdb/testsuite/gdb.c++/member-ptr.exp35
1 files changed, 29 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.c++/member-ptr.exp b/gdb/testsuite/gdb.c++/member-ptr.exp
index 9bf2431..d1de663 100644
--- a/gdb/testsuite/gdb.c++/member-ptr.exp
+++ b/gdb/testsuite/gdb.c++/member-ptr.exp
@@ -103,6 +103,7 @@ gdb_expect {
# print pointer to data member
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::j\r\n$gdb_prompt $" {
@@ -115,6 +116,7 @@ gdb_expect {
# print dereferenced pointer to data member
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a.*pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
@@ -127,6 +129,7 @@ gdb_expect {
# print dereferenced pointer to data member
# this time, dereferenced through a pointer
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a_p->*pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
@@ -212,6 +215,7 @@ gdb_expect {
}
# Double-check by printing a.
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a\n"
gdb_expect {
-re "\\$\[0-9\]* = \{c = 120 'x', j = 33, jj = 1331, static s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
@@ -244,6 +248,7 @@ gdb_expect {
}
# Double-check by printing a.
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a\n"
gdb_expect {
-re "\\$\[0-9\]* = \{c = 120 'x', j = 44, jj = 1331, static s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
@@ -290,6 +295,7 @@ gdb_expect {
# Ptype a pointer to a method.
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "ptype pmf\n"
gdb_expect {
-re "type = int \\( A::\\*\\)\\(\\.\\.\\.\\)\r\n$gdb_prompt $" {
@@ -301,6 +307,7 @@ gdb_expect {
# print a pointer to a method
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print pmf\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\(\\.\\.\\.\\)\\) \\?\\? <not supported with HP aCC>\r\n$gdb_prompt $" {
@@ -313,6 +320,7 @@ gdb_expect {
# Ptype a pointer to a pointer to a method
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "ptype pmf_p\n"
gdb_expect {
-re "type = int \\( A::\\*\\*\\)\\(\\.\\.\\.\\)\r\n$gdb_prompt $" {
@@ -324,6 +332,7 @@ gdb_expect {
# print a pointer to a pointer to a method
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print pmf_p\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(int \\( A::\\*\\*\\)\\(\\.\\.\\.\\)\\) $hex\r\n$gdb_prompt $" {
@@ -335,39 +344,43 @@ gdb_expect {
# print dereferenced pointer to method
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a.*pmf\n"
gdb_expect {
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
pass "print a.*pmf (known aCC limitation)"
}
- -re ".*$gdb_prompt $" { fail "print a.*pmf -- ??" }
+ -re ".*$gdb_prompt $" { fail "print a.*pmf" }
timeout { fail "(timeout) print a.*pmf" }
}
# print dereferenced pointer to method, using ->*
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a_p->*pmf\n"
gdb_expect {
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
pass "print a_p->*pmf (known aCC limitation)"
}
- -re ".*$gdb_prompt $" { fail "print a_p->*pmf -- ??" }
+ -re ".*$gdb_prompt $" { fail "print a_p->*pmf" }
timeout { fail "(timeout) print a_p->*pmf" }
}
# set the pointer to data member
+setup_xfail "hppa*-*-*"
send_gdb "set var pmf = &A::foo\n"
gdb_expect {
-re "Assignment to pointers to methods not implemented with HP aCC\r\n$gdb_prompt $" {
pass "set var pmf (known aCC limitation)"
}
- -re ".*$gdb_prompt $" { fail "set var pmf -- ??" }
+ -re ".*$gdb_prompt $" { fail "set var pmf" }
timeout { fail "(timeout) set var pmf" }
}
# Try to dereference the pointer to method without any object
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print *pmf\n"
gdb_expect {
-re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
@@ -389,6 +402,7 @@ gdb_expect {
}
# Check cast of pointer to member to integer
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print (int) pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 8\r\n$gdb_prompt $" {
@@ -399,37 +413,41 @@ gdb_expect {
}
# Check cast of pointer to method to integer
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print (int) pmf\n"
gdb_expect {
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
pass "casting pmf to int (known aCC limitation)"
}
- -re ".*$gdb_prompt $" { fail "casting pmf to int -- ??" }
+ -re ".*$gdb_prompt $" { fail "casting pmf to int" }
timeout { fail "(timeout) casting pmf to int" }
}
# Try to invoke a function through a pointer to data member
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print (a.*pmi)(3)\n"
gdb_expect {
-re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
pass "print (a.*pmi)(3) -- error message should be different"
}
- -re ".*$gdb_prompt $" { fail "print (a.*pmi)(3) -- ???" }
+ -re ".*$gdb_prompt $" { fail "print (a.*pmi)(3)" }
timeout { fail "(timeout) print (a.*pmi)(3)" }
}
# Try to invoke a function through a pointer to a method
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print (a.*pmf)(3)\n"
gdb_expect {
-re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
pass "print (a.*pmi)(3) -- known aCC limitation"
}
- -re ".*$gdb_prompt $" { fail "print (a.*pmf)(3) -- ???" }
+ -re ".*$gdb_prompt $" { fail "print (a.*pmf)(3)" }
timeout { fail "(timeout) print (a.*pmf)(3)" }
}
# Go past assignment of NULL to pmi
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "next\n"
gdb_expect {
-re "\r\n85\[ \t\]*k = \\(a.\\*pmf\\)\\(3\\);\r\n$gdb_prompt $" {
@@ -449,6 +467,7 @@ gdb_expect {
#}
# Dereference the null pointer to member
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a.*pmi\n"
gdb_expect {
-re "Attempted dereference of null pointer-to-member\r\n$gdb_prompt $" {
@@ -469,6 +488,7 @@ gdb_expect {
timeout { fail "(timeout) set break at 91" }
}
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "continue\n"
gdb_expect {
-re "Continuing\\.\r\n\r\nBreakpoint.*at.*member-ptr\\.cc:91\r\n91\[ \t]*k = \\(a.\\*pmf\\)\\(4\\);\r\n$gdb_prompt $" {
@@ -482,6 +502,7 @@ gdb_expect {
# Now check again that pmi works even when not set to
# something that's at the beginning of the object
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::jj\r\n$gdb_prompt $" {
@@ -494,6 +515,7 @@ gdb_expect {
# print dereferenced pointer to data member
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a.*pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {
@@ -506,6 +528,7 @@ gdb_expect {
# print dereferenced pointer to data member
# this time, dereferenced through a pointer
+setup_xfail "hppa*-*-*" CLLbs16901
send_gdb "print a_p->*pmi\n"
gdb_expect {
-re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {