aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-12-23 12:55:10 -0700
committerTom Tromey <tom@tromey.com>2023-01-09 12:16:02 -0700
commitbf716a53bd8f725975979397b3c6b9d4bd4434ef (patch)
tree472d2628a581b225e82347da900f37ccc4fdd720 /gdb/testsuite/gdb.cp
parent000f9cbef95caeacdd5a02a9ca9eae7928e1e63e (diff)
downloadfsf-binutils-gdb-bf716a53bd8f725975979397b3c6b9d4bd4434ef.zip
fsf-binutils-gdb-bf716a53bd8f725975979397b3c6b9d4bd4434ef.tar.gz
fsf-binutils-gdb-bf716a53bd8f725975979397b3c6b9d4bd4434ef.tar.bz2
Fix crash with C++ qualified names
PR c++/29503 points out that something like "b->Base::member" will crash when 'b' does not have pointer type. This seems to be a simple oversight in eval_op_member. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29503 Reviewed-By: Bruno Larsen <blarsen@redhat.com>
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/ambiguous.exp1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/ambiguous.exp b/gdb/testsuite/gdb.cp/ambiguous.exp
index b430b03..966d99a 100644
--- a/gdb/testsuite/gdb.cp/ambiguous.exp
+++ b/gdb/testsuite/gdb.cp/ambiguous.exp
@@ -123,6 +123,7 @@ with_test_prefix "all fields" {
gdb_test "print n.A1::y" " = 2"
gdb_test "print n.A2::x" " = 3"
gdb_test "print n.A2::y" " = 4"
+ gdb_test "print n->A2::y" " = 4"
gdb_test "print n.w" " = 5"
gdb_test "print n.r" " = 6"
gdb_test "print n.z" " = 7"