forked from Imagelibrary/binutils-gdb
gdb: add type::length / type::set_length
Add the `length` and `set_length` methods on `struct type`, in order to remove the `TYPE_LENGTH` macro. In this patch, the macro is changed to use the getter, so all the call sites of the macro that are used as a setter are changed to use the setter method directly. The next patch will remove the macro completely. Change-Id: Id1090244f15c9856969b9be5006aefe8d8897ca4
This commit is contained in:
@@ -729,7 +729,7 @@ test_print_fields (gdbarch *arch)
|
||||
type *uint8_type = builtin_type (arch)->builtin_uint8;
|
||||
type *bool_type = builtin_type (arch)->builtin_bool;
|
||||
type *the_struct = arch_composite_type (arch, NULL, TYPE_CODE_STRUCT);
|
||||
TYPE_LENGTH (the_struct) = 4;
|
||||
the_struct->set_length (4);
|
||||
|
||||
/* Value: 1110 1001
|
||||
Fields: C-BB B-A- */
|
||||
|
||||
Reference in New Issue
Block a user