Fix crash with C++ qualified names
authorTom Tromey <tom@tromey.com>
Fri, 23 Dec 2022 19:55:10 +0000 (12:55 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 9 Jan 2023 19:16:02 +0000 (12:16 -0700)
commitbf716a53bd8f725975979397b3c6b9d4bd4434ef
tree472d2628a581b225e82347da900f37ccc4fdd720
parent000f9cbef95caeacdd5a02a9ca9eae7928e1e63e
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>
gdb/eval.c
gdb/testsuite/gdb.cp/ambiguous.exp