]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix incorrect length for capabilities
authorLuis Machado <luis.machado@linaro.org>
Fri, 18 Dec 2020 16:55:55 +0000 (13:55 -0300)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 22:53:23 +0000 (15:53 -0700)
The length used to include the tag, but now it doesn't.  This fixes it.

gdb/ChangeLog:

2020-12-30  Luis Machado  <luis.machado@arm.com>

* valprint.c (generic_value_print_capability): Don't add 1 to
the capability length.

gdb/valprint.c

index a3a2ba0c58ed981126e22c9fb38df7219a8475bb..fc54a9f2fbafe05f22aa29104f355c92d6941555 100644 (file)
@@ -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;