]> 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)
committerLuis Machado <luis.machado@linaro.org>
Wed, 30 Dec 2020 19:07:13 +0000 (16:07 -0300)
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/ChangeLog
gdb/valprint.c

index c94ff8cd86275ef5ff8733f3931cc370a073776a..8c2d2563baa3365c40c18d72c5a29f624f3a81ed 100644 (file)
@@ -1,3 +1,8 @@
+2020-12-30  Luis Machado  <luis.machado@arm.com>
+
+       * valprint.c (generic_value_print_capability): Don't add 1 to
+       the capability length.
+
 2020-12-30  Luis Machado  <luis.machado@arm.com>
 
        * valprint.c (user_print_options): Initialize compact_capabilities.
index e37aabf7bbefad12aa598915e56395dbf58ccd33..3794e6c13267c4b65ae5afb55c53f1e47b9bb9f6 100644 (file)
@@ -499,7 +499,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);
   enum bfd_endian byte_order = type_byte_order (type);
   bool tag = false;