Disable ptype/o for dynamic types
authorTom Tromey <tromey@adacore.com>
Fri, 6 Jan 2023 19:18:07 +0000 (12:18 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 12 Jan 2023 19:15:41 +0000 (12:15 -0700)
commit0c1aa2a09531b3256c8134258a2c75b694c9bd70
tree1b732550517ebde923898ae7e3ce4710ebc5d23d
parent1a26a53a0dee39106ba58fcb15496c5f13074652
Disable ptype/o for dynamic types

A user pointed out that "ptype/o" of a certain Ada type -- while in C
mode -- caused gdb to crash.

The bug here is that dynamic types can't really be printed this way.
This patch avoids the bug by disabling the "/o" feature in this case.

Note that using "ptype/o" in this way makes sense for the time being,
because the Ada code doesn't support the "/o" feature (yet); and in
any case gdb should not crash.
gdb/testsuite/gdb.ada/ptype-o.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/ptype-o/prog.adb [new file with mode: 0644]
gdb/typeprint.c