From b6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 30 Jul 2022 12:01:12 -0400 Subject: 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 --- gdb/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/eval.c') diff --git a/gdb/eval.c b/gdb/eval.c index ddbdd95..a6e295d 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -482,7 +482,7 @@ fake_method::fake_method (type_instance_flags flags, struct type *type = &m_type; TYPE_MAIN_TYPE (type) = &m_main_type; - TYPE_LENGTH (type) = 1; + type->set_length (1); type->set_code (TYPE_CODE_METHOD); TYPE_CHAIN (type) = type; type->set_instance_flags (flags); -- cgit v1.1