diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 11:05:21 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 11:05:21 -0400 |
commit | df86565b31bf12aab6fdceade49169bc6f378b13 (patch) | |
tree | 76d5944661919552ce4ea01ac49188e151d72fa7 /gdb/solib-darwin.c | |
parent | b6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02 (diff) | |
download | gdb-df86565b31bf12aab6fdceade49169bc6f378b13.zip gdb-df86565b31bf12aab6fdceade49169bc6f378b13.tar.gz gdb-df86565b31bf12aab6fdceade49169bc6f378b13.tar.bz2 |
gdb: remove TYPE_LENGTH
Remove the macro, replace all uses with calls to type::length.
Change-Id: Ib9bdc954576860b21190886534c99103d6a47afb
Diffstat (limited to 'gdb/solib-darwin.c')
-rw-r--r-- | gdb/solib-darwin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c index 4eca080..6f622dc 100644 --- a/gdb/solib-darwin.c +++ b/gdb/solib-darwin.c @@ -124,7 +124,7 @@ darwin_load_image_infos (struct darwin_info *info) /* The structure has 4 fields: version (4 bytes), count (4 bytes), info (pointer) and notifier (pointer). */ - len = 4 + 4 + 2 * TYPE_LENGTH (ptr_type); + len = 4 + 4 + 2 * ptr_type->length (); gdb_assert (len <= sizeof (buf)); memset (&info->all_image, 0, sizeof (info->all_image)); @@ -140,7 +140,7 @@ darwin_load_image_infos (struct darwin_info *info) info->all_image.count = extract_unsigned_integer (buf + 4, 4, byte_order); info->all_image.info = extract_typed_address (buf + 8, ptr_type); info->all_image.notifier = extract_typed_address - (buf + 8 + TYPE_LENGTH (ptr_type), ptr_type); + (buf + 8 + ptr_type->length (), ptr_type); } /* Link map info to include in an allocated so_list entry. */ @@ -227,7 +227,7 @@ darwin_current_sos (void) { struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr; enum bfd_endian byte_order = type_byte_order (ptr_type); - int ptr_len = TYPE_LENGTH (ptr_type); + int ptr_len = ptr_type->length (); unsigned int image_info_size; struct so_list *head = NULL; struct so_list *tail = NULL; @@ -339,7 +339,7 @@ static CORE_ADDR darwin_read_exec_load_addr_from_dyld (struct darwin_info *info) { struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr; - int ptr_len = TYPE_LENGTH (ptr_type); + int ptr_len = ptr_type->length (); unsigned int image_info_size = ptr_len * 3; int i; @@ -487,12 +487,12 @@ darwin_solib_read_all_image_info_addr (struct darwin_info *info) struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr; /* Sanity check. */ - if (TYPE_LENGTH (ptr_type) > sizeof (buf)) + if (ptr_type->length () > sizeof (buf)) return; len = target_read (current_inferior ()->top_target (), TARGET_OBJECT_DARWIN_DYLD_INFO, - NULL, buf, 0, TYPE_LENGTH (ptr_type)); + NULL, buf, 0, ptr_type->length ()); if (len <= 0) return; |