mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
* ada-lang.c (assign_component): Use platform-specific integer type
instead of builtin_type_int32 type. (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise. * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type instead of builtin_type_int8 type. * valarith.c (value_x_unop): Likewise. * python/python-value.c (valpy_absolute): Avoid reference to builtin_type_int8 type. * eval.c (evaluate_subexp_standard): Use platform-specific integer type instead of builtin_type_int8 as EVAL_SKIP return value type. * ada-lang.c (ada_evaluate_subexp): Likewise. * jv-lang.c (evaluate_subexp_java): Likewise. * m2-lang.c (evaluate_subexp_modula2): Likewise. * scm-lang.c (evaluate_exp): Likewise. * value.h (value_bitstring): Add INDEX_TYPE argument. * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead of builtin_type_int32 as base range type. * eval.c (evaluate_subexp_standard): Update value_bitstring call.
This commit is contained in:
10
gdb/valops.c
10
gdb/valops.c
@@ -1378,14 +1378,12 @@ value_string (char *ptr, int len, struct type *char_type)
|
||||
}
|
||||
|
||||
struct value *
|
||||
value_bitstring (char *ptr, int len)
|
||||
value_bitstring (char *ptr, int len, struct type *index_type)
|
||||
{
|
||||
struct value *val;
|
||||
struct type *domain_type = create_range_type (NULL,
|
||||
builtin_type_int32,
|
||||
0, len - 1);
|
||||
struct type *type = create_set_type ((struct type *) NULL,
|
||||
domain_type);
|
||||
struct type *domain_type
|
||||
= create_range_type (NULL, index_type, 0, len - 1);
|
||||
struct type *type = create_set_type (NULL, domain_type);
|
||||
TYPE_CODE (type) = TYPE_CODE_BITSTRING;
|
||||
val = allocate_value (type);
|
||||
memcpy (value_contents_raw (val), ptr, TYPE_LENGTH (type));
|
||||
|
||||
Reference in New Issue
Block a user