gdb/testsuite: add regression test for per-objfile typeprinters
authorBruno Larsen <blarsen@redhat.com>
Thu, 23 Feb 2023 12:56:32 +0000 (13:56 +0100)
committerBruno Larsen <blarsen@redhat.com>
Mon, 13 Mar 2023 13:40:33 +0000 (14:40 +0100)
commit83b755117d7a13e75877c3f166dfef1d8b69ec75
treefb7dffba8635514e76e66f8aa9389d0fc2f741a2
parent349a125d16bec4a894e01494df10a2825195178e
gdb/testsuite: add regression test for per-objfile typeprinters

PR python/17136 reported an unhandled exception when using typeprinters
only valid on some objfiles, rather than being a global typeprinter. The
fix was accepted without a regression test, and we've been carrying one
out-of-tree for a while but I think it's worth upstreaming. The code
itself was developed by Jan Kratochvil.

Co-Authored-By: Jan Kratochvil <jkratochvil@azul.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17136
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.python/py-typeprint.cc
gdb/testsuite/gdb.python/py-typeprint.exp
gdb/testsuite/gdb.python/py-typeprint.py