diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-12-11 17:06:35 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-12-14 10:54:21 +0000 |
commit | 132874d7e3c94d8cc6f865b57f286cf62e5ad0b8 (patch) | |
tree | c40a4ed4653090e95bd0ac1b57d8095d76ab99f6 /gdb/i386-tdep.c | |
parent | 92e18d93433197e0cee12366b17297a984e76bd8 (diff) | |
download | gdb-132874d7e3c94d8cc6f865b57f286cf62e5ad0b8.zip gdb-132874d7e3c94d8cc6f865b57f286cf62e5ad0b8.tar.gz gdb-132874d7e3c94d8cc6f865b57f286cf62e5ad0b8.tar.bz2 |
gdb: Use TYPE_LENGTH macro
Fixes a couple of places where we access the length field of the type
structure directly, rather than using the TYPE_LENGTH macro.
gdb/ChangeLog:
* i386-tdep.c (i386_mpx_info_bounds): Use TYPE_LENGTH.
(i386_mpx_set_bounds): Likewise.
* solib-darwin.c (darwin_load_image_infos): Likewise.
(darwin_solib_read_all_image_info_addr): Likewise.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index ebb21fc..6e9bcc3 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -8807,7 +8807,7 @@ i386_mpx_info_bounds (char *args, int from_tty) for (i = 0; i < 4; i++) bt_entry[i] = read_memory_typed_address (bt_entry_addr - + i * data_ptr_type->length, + + i * TYPE_LENGTH (data_ptr_type), data_ptr_type); i386_mpx_print_bounds (bt_entry); @@ -8853,14 +8853,15 @@ i386_mpx_set_bounds (char *args, int from_tty) bt_entry_addr = i386_mpx_get_bt_entry (addr, bd_base); for (i = 0; i < 2; i++) bt_entry[i] = read_memory_typed_address (bt_entry_addr - + i * data_ptr_type->length, + + i * TYPE_LENGTH (data_ptr_type), data_ptr_type); bt_entry[0] = (uint64_t) lower; bt_entry[1] = ~(uint64_t) upper; for (i = 0; i < 2; i++) - write_memory_unsigned_integer (bt_entry_addr + i * data_ptr_type->length, - data_ptr_type->length, byte_order, + write_memory_unsigned_integer (bt_entry_addr + + i * TYPE_LENGTH (data_ptr_type), + TYPE_LENGTH (data_ptr_type), byte_order, bt_entry[i]); } |