Files
Tom Tromey 3ae7ab9992 Fix MI crash with Ada string access
I happened to notice that using -var-create at a certain spot in an
Ada program caused a crash.  This happens because
ada_get_decoded_value can return NULL -- in particular, deeper in the
code it can hit this return in ada_type_of_array:

      descriptor = desc_bounds (arr);
      if (value_as_long (descriptor) == 0)
        return NULL;

This patch avoids the crash by handling this NULL return.

gdb/ChangeLog
2020-08-17  Tom Tromey  <tromey@adacore.com>

	* ada-varobj.c (ada_varobj_decode_var): Handle case where
	ada_get_decoded_value returns NULL.

gdb/testsuite/ChangeLog
2020-08-17  Tom Tromey  <tromey@adacore.com>

	* gdb.ada/mi_var_access.exp: New file.
	* gdb.ada/mi_var_access/mi_access.adb: New file.
	* gdb.ada/mi_var_access/pck.adb: New file.
	* gdb.ada/mi_var_access/pck.ads: New file.
2020-08-17 09:21:40 -06:00
..
2020-04-24 13:40:33 -06:00
2020-05-20 07:21:49 -06:00