X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gdb%2Fstap-probe.c;h=b6de873d2c935a42e21c6b19bcb667a3b5959348;hb=12a8555a5402b46da5ad39e29156c0d6b3a81a78;hp=aa1c8144d8a0b43c902fdb36d74659375366033f;hpb=7d7571f0c14b4673ca95f6dc31d6f07d429e6697;p=external%2Fbinutils.git diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c index aa1c814..b6de873 100644 --- a/gdb/stap-probe.c +++ b/gdb/stap-probe.c @@ -20,7 +20,7 @@ #include "defs.h" #include "stap-probe.h" #include "probe.h" -#include "common/vec.h" +#include "gdbsupport/vec.h" #include "ui-out.h" #include "objfiles.h" #include "arch-utils.h" @@ -774,23 +774,24 @@ stap_parse_register_operand (struct stap_parse_info *p) code would like to perform on the register name. */ if (gdbarch_stap_adjust_register_p (gdbarch)) { - std::string oldregname = regname; + std::string newregname + = gdbarch_stap_adjust_register (gdbarch, p, regname, regnum); - gdbarch_stap_adjust_register (gdbarch, p, regname, regnum); - - if (regname != oldregname) + if (regname != newregname) { /* This is just a check we perform to make sure that the arch-dependent code has provided us with a valid register name. */ - regnum = user_reg_map_name_to_regnum (gdbarch, regname.c_str (), - regname.size ()); + regnum = user_reg_map_name_to_regnum (gdbarch, newregname.c_str (), + newregname.size ()); if (regnum == -1) internal_error (__FILE__, __LINE__, _("Invalid register name '%s' after replacing it" " (previous name was '%s')"), - regname.c_str (), oldregname.c_str ()); + newregname.c_str (), regname.c_str ()); + + regname = newregname; } }