/* varobj support for Ada.
- Copyright (C) 2012-2019 Free Software Foundation, Inc.
+ Copyright (C) 2012-2020 Free Software Foundation, Inc.
This file is part of GDB.
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-
-/* Local non-gdb includes. */
#include "ada-lang.h"
+#include "varobj.h"
#include "language.h"
#include "valprint.h"
-#include "varobj.h"
/* Implementation principle used in this unit:
of the array index type when such type qualification is
needed. */
const char *index_type_name = NULL;
+ std::string decoded;
/* If the index type is a range type, find the base type. */
while (TYPE_CODE (index_type) == TYPE_CODE_RANGE)
{
index_type_name = ada_type_name (index_type);
if (index_type_name)
- index_type_name = ada_decode (index_type_name);
+ {
+ decoded = ada_decode (index_type_name);
+ index_type_name = decoded.c_str ();
+ }
}
if (index_type_name != NULL)