aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-07-28 19:04:08 +0000
committerPedro Alves <palves@redhat.com>2010-07-28 19:04:08 +0000
commit3ce3b1ba3153a2fc9265ba78cc25acaa7db127ba (patch)
treecd0924e857600e96284efa3193a9c1ead08599b6 /gdb/testsuite
parent2bb4f988e5ec9ab6c7adc9c9eb8cc6b8f56491a4 (diff)
downloadgdb-3ce3b1ba3153a2fc9265ba78cc25acaa7db127ba.zip
gdb-3ce3b1ba3153a2fc9265ba78cc25acaa7db127ba.tar.gz
gdb-3ce3b1ba3153a2fc9265ba78cc25acaa7db127ba.tar.bz2
2010-07-28 Daniel Jacobowitz <dan@codesourcery.com>
gdb/ * dwarf2read.c (read_subroutine_type): Improve THIS detection, handling DW_AT_object_pointer, and workaround GCC PR 43053. gdb/testsuite/ * gdb.cp/member-ptr.exp, gdb.cp/printmethod.exp, gdb.dwarf2/member-ptr-forwardref.exp: Adjust.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.cp/member-ptr.exp22
-rw-r--r--gdb/testsuite/gdb.cp/printmethod.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp2
4 files changed, 19 insertions, 14 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ef40fb5..44ee3b9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-28 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * gdb.cp/member-ptr.exp, gdb.cp/printmethod.exp,
+ gdb.dwarf2/member-ptr-forwardref.exp: Adjust.
+
2010-07-28 Tom Tromey <tromey@redhat.com>
PR c++/9946:
diff --git a/gdb/testsuite/gdb.cp/member-ptr.exp b/gdb/testsuite/gdb.cp/member-ptr.exp
index 329de52..33f121b 100644
--- a/gdb/testsuite/gdb.cp/member-ptr.exp
+++ b/gdb/testsuite/gdb.cp/member-ptr.exp
@@ -396,7 +396,7 @@ gdb_test_multiple "print ((int) pmi) == ((char *) &a.j - (char *) & a)" $name {
set name "ptype pmf"
gdb_test_multiple "ptype pmf" $name {
- -re "type = int \\( ?A::\\*\\)\\(A \\*, int\\)\r\n$gdb_prompt $" {
+ -re "type = int \\( ?A::\\*\\)\\(A \\*( const)?, int\\)\r\n$gdb_prompt $" {
pass $name
}
-re "type = int \\( ?A::\\*\\)\\(void\\)\r\n$gdb_prompt $" {
@@ -418,7 +418,7 @@ gdb_test_multiple "ptype pmf" $name {
set name "print pmf"
gdb_test_multiple "print pmf" $name {
- -re "$vhn = \\(int \\(A::\\*\\)\\(A \\*, int\\)\\) $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
+ -re "$vhn = \\(int \\(A::\\*\\)\\(A \\*( const)?, int\\)\\) $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
pass $name
}
-re "$vhn = .*not supported with HP aCC.*\r\n$gdb_prompt $" {
@@ -440,7 +440,7 @@ gdb_test_multiple "print pmf" $name {
set name "ptype pmf_p"
gdb_test_multiple "ptype pmf_p" $name {
- -re "type = int \\( ?A::\\*\\*\\)\\(A \\*, int\\)\r\n$gdb_prompt $" {
+ -re "type = int \\( ?A::\\*\\*\\)\\(A \\*( const)?, int\\)\r\n$gdb_prompt $" {
pass $name
}
-re "type = int \\( ?A::\\*\\*\\)\\(void\\)\r\n$gdb_prompt $" {
@@ -482,7 +482,7 @@ gdb_test_multiple "print pmf_p" $name {
set name "print a.*pmf"
gdb_test_multiple "print a.*pmf" $name {
- -re "$vhn = {int \\(A \\*, int\\)} $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
+ -re "$vhn = {int \\(A \\*( const)?, int\\)} $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
pass $name
}
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
@@ -504,7 +504,7 @@ gdb_test_multiple "print a.*pmf" $name {
set name "print a_p->*pmf"
gdb_test_multiple "print a_p->*pmf" $name {
- -re "$vhn = {int \\(A \\*, int\\)} $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
+ -re "$vhn = {int \\(A \\*( const)?, int\\)} $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
pass $name
}
-re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
@@ -606,7 +606,7 @@ gdb_test_multiple "print (a.*pmf)(3)" $name {
}
}
-gdb_test "ptype a.*pmf" "type = int \\(A \\*, int\\)"
+gdb_test "ptype a.*pmf" "type = int \\(A \\*( const)?, int\\)"
# Print out a pointer to data member which requires looking into
# a base class.
@@ -618,9 +618,9 @@ gdb_test "print diamond.*diamond_pmi" "$vhn = 77"
# These two have a different object adjustment, but call the same method.
gdb_test "print diamond.*left_pmf" \
- "$vhn = {int \\(Diamond \\*\\)} $hex <Base::get_x\\((void|)\\)>"
+ "$vhn = {int \\(Diamond \\*( const)?\\)} $hex <Base::get_x\\((void|)\\)>"
gdb_test "print diamond.*right_pmf" \
- "$vhn = {int \\(Diamond \\*\\)} $hex <Base::get_x\\((void|)\\)>"
+ "$vhn = {int \\(Diamond \\*( const)?\\)} $hex <Base::get_x\\((void|)\\)>"
gdb_test "print (diamond.*left_pmf) ()" "$vhn = 77"
gdb_test "print (diamond.*right_pmf) ()" "$vhn = 88"
@@ -628,9 +628,9 @@ gdb_test "print (diamond.*right_pmf) ()" "$vhn = 88"
# These two point to different methods, although they have the same
# virtual table offsets.
gdb_test "print diamond.*left_vpmf" \
- "$vhn = {int \\(Diamond \\*\\)} $hex <Left::vget\\((void|)\\)>"
+ "$vhn = {int \\(Diamond \\*( const)?\\)} $hex <Left::vget\\((void|)\\)>"
gdb_test "print diamond.*right_vpmf" \
- "$vhn = {int \\(Diamond \\*\\)} $hex <Right::vget\\((void|)\\)>"
+ "$vhn = {int \\(Diamond \\*( const)?\\)} $hex <Right::vget\\((void|)\\)>"
gdb_test "print (diamond.*left_vpmf) ()" "$vhn = 177"
gdb_test "print (diamond.*left_base_vpmf) ()" "$vhn = 2077"
@@ -658,5 +658,5 @@ gdb_test "print null_pmi = &A::j" "$vhn = &A::j"
gdb_test "print null_pmi = 0" "$vhn = NULL"
gdb_test "print null_pmf" "$vhn = NULL"
-gdb_test "print null_pmf = &A::foo" "$vhn = \\(int \\(A::\\*\\)\\(A \\*, int\\)\\) $hex <A::foo ?\\(int\\)>"
+gdb_test "print null_pmf = &A::foo" "$vhn = \\(int \\(A::\\*\\)\\(A \\*( const)?, int\\)\\) $hex <A::foo ?\\(int\\)>"
gdb_test "print null_pmf = 0" "$vhn = NULL"
diff --git a/gdb/testsuite/gdb.cp/printmethod.exp b/gdb/testsuite/gdb.cp/printmethod.exp
index 12c9ca8..16cd752 100644
--- a/gdb/testsuite/gdb.cp/printmethod.exp
+++ b/gdb/testsuite/gdb.cp/printmethod.exp
@@ -62,10 +62,10 @@ gdb_continue_to_breakpoint "end of constructors"
# The first of these is for PR gdb/653.
gdb_test "print theA->virt" \
- "\\$\[0-9\]* = {void \\(A \\*\\)} $hex <A::virt\\((void|)\\)>" \
+ "\\$\[0-9\]* = {void \\(A \\* const\\)} $hex <A::virt\\((void|)\\)>" \
"print virtual method."
gdb_test "print theA->nonvirt" \
- "\\$\[0-9\]* = {void \\(A \\*\\)} $hex <A::nonvirt\\((void|)\\)>" \
+ "\\$\[0-9\]* = {void \\(A \\* const\\)} $hex <A::nonvirt\\((void|)\\)>" \
"print nonvirtual method."
gdb_exit
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
index bb947bc..7a72e53 100644
--- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
+++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
@@ -45,4 +45,4 @@ gdb_test "show cp-abi" {The currently selected C\+\+ ABI is "gnu-v3".*}
gdb_load ${binfile}
-gdb_test "ptype c" "type = struct C {\[\r\n \t\]*private:\[\r\n \t\]*int \\(C::\\*fp\\)\\(C \\*\\);\[\r\n \t\]*}"
+gdb_test "ptype c" "type = struct C {\[\r\n \t\]*private:\[\r\n \t\]*int \\(C::\\*fp\\)\\(C \\*( const)?\\);\[\r\n \t\]*}"