]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix attribute printing bug
authorLuis Machado <luis.machado@linaro.org>
Fri, 18 Dec 2020 20:50:52 +0000 (17:50 -0300)
committerLuis Machado <luis.machado@linaro.org>
Wed, 30 Dec 2020 19:08:02 +0000 (16:08 -0300)
We just reset the attribute string instead of appending to it.  This patch
fixes this.

gdbsupport/ChangeLog:

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

* capability.cc (capability::to_str): Append strings to
attribute string.

gdb/ChangeLog
gdbsupport/capability.cc

index 8c2d2563baa3365c40c18d72c5a29f624f3a81ed..2cfcc670fab8872dcc180e9627cfbfecded2f4d0 100644 (file)
@@ -1,3 +1,8 @@
+2020-12-30  Luis Machado  <luis.machado@arm.com>
+
+       * capability.cc (capability::to_str): Append strings to
+       attribute string.
+
 2020-12-30  Luis Machado  <luis.machado@arm.com>
 
        * valprint.c (generic_value_print_capability): Don't add 1 to
index 5ced9b67620d8eeeace19e9a681c4e03d920f7d8..6fdd1c82cf8abcdf43d7844651c4dca5ebf99eb5 100644 (file)
@@ -595,9 +595,9 @@ capability::to_str (bool compact)
       if (get_tag () == false)
        attr_str = "invalid ";
       if (get_otype () == CAP_SEAL_TYPE_RB)
-       attr_str = "sentry ";
+       attr_str += "sentry ";
       if (is_sealed ())
-       attr_str = "sealed ";
+       attr_str += "sealed ";
 
       cap_str += "{";
       cap_str = val_str + " [" + perm_str + "," + range_str + "]";