diff options
Diffstat (limited to 'gdb/rust-lang.c')
-rw-r--r-- | gdb/rust-lang.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index 1849349..17b20c6 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -1415,6 +1415,12 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside, low_bound = 0; high_bound = value_as_long (len); } + else if (TYPE_CODE (type) == TYPE_CODE_PTR) + { + base = lhs; + low_bound = 0; + high_bound = LONGEST_MAX; + } else error (_("Cannot subscript non-array type")); |