/* Scheme interface to lazy strings.
- Copyright (C) 2010-2020 Free Software Foundation, Inc.
+ Copyright (C) 2010-2022 Free Software Foundation, Inc.
This file is part of GDB.
/* The <gdb:lazy-string> smob. */
-typedef struct
+struct lazy_string_smob
{
/* This always appears first. */
gdb_smob base;
This is recorded as an SCM object so that we take advantage of support for
preserving the type should its owning objfile go away. */
SCM type;
-} lazy_string_smob;
+};
static const char lazy_string_smob_name[] = "gdb:lazy-string";
{
case TYPE_CODE_PTR:
case TYPE_CODE_ARRAY:
- return TYPE_TARGET_TYPE (realtype);
+ return realtype->target_type ();
default:
/* This is done to preserve existing behaviour. PR 20769.
E.g., gdb.parse_and_eval("my_int_variable").lazy_string().type. */
/* PR 20786: There's no way to specify an array of length zero.
Record a length of [0,-1] which is how Ada does it. Anything
we do is broken, but this one possible solution. */
- type = lookup_array_range_type (TYPE_TARGET_TYPE (realtype),
+ type = lookup_array_range_type (realtype->target_type (),
0, ls_smob->length - 1);
value = value_at_lazy (type, ls_smob->address);
}