Fix crash in ada_print_type
authorTom Tromey <tromey@adacore.com>
Thu, 20 Oct 2022 16:55:35 +0000 (10:55 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 15 Nov 2022 18:55:44 +0000 (11:55 -0700)
commit2c2316c5fd2bf6310c21c1c88a940be8494d1870
tree018b7167aa733721a2270943301b279fb9def6f5
parentb0e8fa7ff0dc9a32ff71df0e895aa7fb5089fcfa
Fix crash in ada_print_type

The "varstring" paramter to ada_print_type can be null, but one spot
failed to check this.  This could cause a crash in some situations.

As this is Ada-specific, and we've been using it internally at AdaCore
for a while, I am going to push it.
gdb/ada-typeprint.c
gdb/testsuite/gdb.ada/overload_menu_crash.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/overload_menu_crash/main.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/overload_menu_crash/pck.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/overload_menu_crash/pck.ads [new file with mode: 0644]