]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix gdb.python/py-format-string.exp with Clang
authorGary Benson <gbenson@redhat.com>
Tue, 27 Oct 2020 17:02:39 +0000 (17:02 +0000)
committerGary Benson <gbenson@redhat.com>
Tue, 27 Oct 2020 17:02:39 +0000 (17:02 +0000)
commit934a1764071ebe9d6e148e741b55bafb036a7cc6
tree045b137cc07e905b8fa76eb4c79cfc7da3cbe5f6
parent0bf21fbd79477304e7fd99869b823da19289e5ba
Fix gdb.python/py-format-string.exp with Clang

GDB includes the virtual table pointer when formatting polymorphic
C++ objects for printing, but GCC and Clang name these differently:
GCC emits a DW_AT_name of "_vptr.Base" when describing the virtual
table pointer of a type derived from type "Base", whereas Clang
will emit "_vptr$Base" in this situation.  This commit fixes a
testcase which failed because of this.

gdb/testsuite/ChangeLog:

* gdb.python/py-format-string.exp (test_deref_refs): Treat
"_vptr$Base" as correct, in addition to "_vptr.Base".
(test_mixed): Likewise.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-format-string.exp