diff options
author | Tom Tromey <tromey@adacore.com> | 2023-09-05 13:08:29 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-09-19 13:28:42 -0600 |
commit | 26733fc7477ac675df9215b46bf3f3af1dd80186 (patch) | |
tree | bcb9181bf1c84e5bc434a28b303a01107a59350e /gdb/rust-lang.h | |
parent | d948c67c5d6599581e5045f03e67dc90855efc87 (diff) | |
download | gdb-26733fc7477ac675df9215b46bf3f3af1dd80186.zip gdb-26733fc7477ac675df9215b46bf3f3af1dd80186.tar.gz gdb-26733fc7477ac675df9215b46bf3f3af1dd80186.tar.bz2 |
Add is_array_like and to_array to language_defn
This adds new is_array_like and to_array methods to language_defn.
This will be used in a subsequent patch that generalizes the new
Python array- and string-handling code.
Diffstat (limited to 'gdb/rust-lang.h')
-rw-r--r-- | gdb/rust-lang.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/rust-lang.h b/gdb/rust-lang.h index 2c7ccb9..ce1dff2 100644 --- a/gdb/rust-lang.h +++ b/gdb/rust-lang.h @@ -196,6 +196,16 @@ public: /* See language.h. */ + bool is_array_like (struct type *type) const override + { return rust_slice_type_p (type); } + + /* See language.h. */ + + struct value *to_array (struct value *val) const override + { return rust_slice_to_array (val); } + + /* See language.h. */ + bool range_checking_on_by_default () const override { return true; } |