]> 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)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 22:53:23 +0000 (15:53 -0700)
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.

gdbsupport/capability.cc

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 + "]";