Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Cc: gdb-patches@sourceware.org, uweigand@de.ibm.com
Subject: Re: [PATCH] Report "No hardware breakpoint support" correctly
Date: Mon, 14 Jul 2014 16:13:00 -0000	[thread overview]
Message-ID: <20140714161308.GC4888@adacore.com> (raw)
In-Reply-To: <1405349255-26782-1-git-send-email-emachado@linux.vnet.ibm.com>

> gdb/
> 2014-07-14  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
> 
> 	* gdb/ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): Report no
> 	hardware breakpoint support correctly.

Just one itty bitty tiny little nit:

> ---
>  gdb/ppc-linux-nat.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
> index fcfd452..4c5d878 100644
> --- a/gdb/ppc-linux-nat.c
> +++ b/gdb/ppc-linux-nat.c
> @@ -1473,6 +1473,9 @@ ppc_linux_can_use_hw_breakpoint (struct target_ops *self,
>      }
>    else if (type == bp_hardware_breakpoint)
>      {
> +      if (total_hw_bp == 0)
> +	/* No hardware breakpoint support. */
> +	return 0;

Can you nest the contents of the if block inside curly braces.
We've decided a while ago that a comment looks visually like
a statement, and thus that comment + statement looks the same
as 2 statements, and thus normally requires curly braces...

Thanks!
-- 
Joel


  parent reply	other threads:[~2014-07-14 16:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 14:55 Edjunior Barbosa Machado
2014-07-14 15:54 ` Ulrich Weigand
2014-07-14 16:13 ` Joel Brobecker [this message]
2014-07-15  8:12   ` Edjunior Barbosa Machado

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=20140714161308.GC4888@adacore.com \
    --to=brobecker@adacore.com \
    --cc=emachado@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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