X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gdb%2Fi386-tdep.c;h=ccec6d171b71afef6d4a01674e3e3a4020643a7a;hb=900ac24287a26146a6a5f4b3b9d6610f3b574428;hp=e3dd4b3238dcdd8c98f64449ccc0afb152d6876a;hpb=2b40fda74b2af11a914d50f4e54c1472e1bd81fb;p=external%2Fbinutils.git diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index e3dd4b3..ccec6d1 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -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 ®name, int regnum) + const std::string ®name, int regnum) { static const std::unordered_set 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; } @@ -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]);