Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org,  Sergio Durigan Junior <sergiodj@redhat.com>
Subject: Re: [PATCH] gdb: Remove a non-const reference parameter
Date: Tue, 02 Jul 2019 17:55:00 -0000	[thread overview]
Message-ID: <87o92cl3t2.fsf@tromey.com> (raw)
In-Reply-To: <20190702152119.31612-1-andrew.burgess@embecosm.com> (Andrew	Burgess's message of "Tue, 2 Jul 2019 16:21:19 +0100")

>>>>> "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


  parent reply	other threads:[~2019-07-02 17:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 22:00 [PATCH] Adjust i386 registers on SystemTap probes' arguments (PR breakpoints/24541) Sergio Durigan Junior
2019-06-26 22:03 ` Sergio Durigan Junior
2019-06-28 15:45 ` Tom Tromey
2019-06-28 20:33   ` Sergio Durigan Junior
2019-06-29 14:58 ` Andrew Burgess
2019-07-02 15:21   ` [PATCH] gdb: Remove a non-const reference parameter Andrew Burgess
2019-07-02 15:35     ` Simon Marchi
2019-07-02 17:55       ` Tom Tromey
2019-07-02 16:40     ` Sergio Durigan Junior
2019-07-02 17:55     ` Tom Tromey [this message]
2019-07-17 15:32     ` Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o92cl3t2.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sergiodj@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox