From: Luis Machado Date: Fri, 18 Dec 2020 20:50:52 +0000 (-0300) Subject: Fix attribute printing bug X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91aee4862e736894ec95e112063e0d814b9748b6;p=thirdparty%2Fbinutils-gdb.git Fix attribute printing bug We just reset the attribute string instead of appending to it. This patch fixes this. gdbsupport/ChangeLog: 2020-12-30 Luis Machado * capability.cc (capability::to_str): Append strings to attribute string. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8c2d2563baa..2cfcc670fab 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-12-30 Luis Machado + + * capability.cc (capability::to_str): Append strings to + attribute string. + 2020-12-30 Luis Machado * valprint.c (generic_value_print_capability): Don't add 1 to diff --git a/gdbsupport/capability.cc b/gdbsupport/capability.cc index 5ced9b67620..6fdd1c82cf8 100644 --- a/gdbsupport/capability.cc +++ b/gdbsupport/capability.cc @@ -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 + "]";