This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb: Remove a non-const reference parameter


>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> Non-const reference parameter should be avoided according to the GDB
Andrew> coding standard:

Andrew>   https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Avoid_non-const_reference_parameters.2C_use_pointers_instead

Andrew> This commit updates the gdbarch method gdbarch_stap_adjust_register,
Andrew> and the one implementation i386_stap_adjust_register to avoid using a
Andrew> non-const reference parameter.

Thanks for doing this.  I probably should have pushed back on the
original patch a little for this reason.

Andrew> +      std::string tmp = "e" + regname;
Andrew> +      return tmp;

This can just be `return "e" + regname' I think.

Looks ok otherwise.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]