From: Luis Machado Date: Fri, 18 Dec 2020 16:55:55 +0000 (-0300) Subject: Fix incorrect length for capabilities X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f099d97aa36cc1b63a8c46ef061ffc25f9a39905;p=thirdparty%2Fbinutils-gdb.git Fix incorrect length for capabilities The length used to include the tag, but now it doesn't. This fixes it. gdb/ChangeLog: 2020-12-30 Luis Machado * valprint.c (generic_value_print_capability): Don't add 1 to the capability length. --- diff --git a/gdb/valprint.c b/gdb/valprint.c index a3a2ba0c58e..fc54a9f2fba 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -514,7 +514,7 @@ generic_value_print_capability (struct value *val, struct ui_file *stream, { struct type *type = check_typedef (value_type (val)); /* Account for the tag bit in the length. */ - int length = TYPE_LENGTH (type) + 1; + int length = TYPE_LENGTH (type); const gdb_byte *contents = value_contents_for_printing (val).data (); enum bfd_endian byte_order = type_byte_order (type); bool tag = false;