mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
Introduce type::is_array_like and value_to_array
This adds the type::is_array_like method and the value_to_array function. The former can be used to see whether a given type is known to be "array-like". This is the currently the case for certain compiler-generated structure types; in particular both the Ada and Rust compilers do this.
This commit is contained in:
@@ -1430,6 +1430,11 @@ struct type
|
||||
return this->code () == TYPE_CODE_PTR || TYPE_IS_REFERENCE (this);
|
||||
}
|
||||
|
||||
/* Return true if this type is "array-like". This includes arrays,
|
||||
but also some forms of structure type that are recognized as
|
||||
representations of arrays by the type's language. */
|
||||
bool is_array_like ();
|
||||
|
||||
/* * Type that is a pointer to this type.
|
||||
NULL if no such pointer-to type is known yet.
|
||||
The debugger may add the address of such a type
|
||||
|
||||
Reference in New Issue
Block a user