Make tui_locator_window::set_locator_fullname re-render
[external/binutils.git] / gdb / i386-tdep.c
index e3dd4b3..ccec6d1 100644 (file)
@@ -46,7 +46,7 @@
 #include "remote.h"
 #include "i386-tdep.h"
 #include "i387-tdep.h"
-#include "common/x86-xstate.h"
+#include "gdbsupport/x86-xstate.h"
 #include "x86-tdep.h"
 
 #include "record.h"
@@ -4389,27 +4389,24 @@ i386_stap_parse_special_token (struct gdbarch *gdbarch,
 /* Implementation of 'gdbarch_stap_adjust_register', as defined in
    gdbarch.h.  */
 
-static void
+static std::string
 i386_stap_adjust_register (struct gdbarch *gdbarch, struct stap_parse_info *p,
-                          std::string &regname, int regnum)
+                          const std::string &regname, int regnum)
 {
   static const std::unordered_set<std::string> reg_assoc
     = { "ax", "bx", "cx", "dx",
        "si", "di", "bp", "sp" };
 
-  if (register_size (gdbarch, regnum) >= TYPE_LENGTH (p->arg_type))
-    {
-      /* If we're dealing with a register whose size is greater or
-        equal than the size specified by the "[-]N@" prefix, then we
-        don't need to do anything.  */
-      return;
-    }
+  /* If we are dealing with a register whose size is less than the size
+     specified by the "[-]N@" prefix, and it is one of the registers that
+     we know has an extended variant available, then use the extended
+     version of the register instead.  */
+  if (register_size (gdbarch, regnum) < TYPE_LENGTH (p->arg_type)
+      && reg_assoc.find (regname) != reg_assoc.end ())
+    return "e" + regname;
 
-  if (reg_assoc.find (regname) != reg_assoc.end ())
-    {
-      /* Use the extended version of the register.  */
-      regname = "e" + regname;
-    }
+  /* Otherwise, just use the requested register.  */
+  return regname;
 }
 
 \f
@@ -8914,7 +8911,7 @@ i386_mpx_print_bounds (const CORE_ADDR bt_entry[4])
 
       size = (size > -1 ? size + 1 : size);
       uiout->text (", size = ");
-      uiout->field_fmt ("size", "%s", plongest (size));
+      uiout->field_string ("size", plongest (size));
 
       uiout->text (", metadata = ");
       uiout->field_core_addr ("metadata", gdbarch, bt_entry[3]);