From df86565b31bf12aab6fdceade49169bc6f378b13 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 21 Sep 2022 11:05:21 -0400 Subject: gdb: remove TYPE_LENGTH Remove the macro, replace all uses with calls to type::length. Change-Id: Ib9bdc954576860b21190886534c99103d6a47afb --- gdb/python/py-unwind.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/python/py-unwind.c') diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index dcb1d7abbcf..0a1b460e785 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -292,13 +292,13 @@ unwind_infopy_add_saved_register (PyObject *self, PyObject *args) return NULL; } data_size = register_size (pending_frame->gdbarch, regnum); - if (data_size != TYPE_LENGTH (value_type (value))) + if (data_size != value_type (value)->length ()) { PyErr_Format ( PyExc_ValueError, "The value of the register returned by the Python " "sniffer has unexpected size: %u instead of %u.", - (unsigned) TYPE_LENGTH (value_type (value)), + (unsigned) value_type (value)->length (), (unsigned) data_size); return NULL; } @@ -620,7 +620,7 @@ pyuw_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, /* `value' validation was done before, just assert. */ gdb_assert (value != NULL); - gdb_assert (data_size == TYPE_LENGTH (value_type (value))); + gdb_assert (data_size == value_type (value)->length ()); cached_frame->reg[i].data = (gdb_byte *) xmalloc (data_size); memcpy (cached_frame->reg[i].data, -- cgit v1.2.1