From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Cc: Pedro Alves <palves@redhat.com>
Subject: Re: [PATCH 4/5] RISC-V: Add native linux support.
Date: Sun, 28 Oct 2018 11:23:00 -0000 [thread overview]
Message-ID: <20181028112326.GF15098@embecosm.com> (raw)
In-Reply-To: <b687d318-2724-82ff-1f96-00c15f1a350b@redhat.com>
* Pedro Alves <palves@redhat.com> [2018-10-25 13:06:25 +0100]:
> On 10/25/2018 12:09 PM, Andrew Burgess wrote:
> >
> > I removed the extra { ... } block in line with the coding standard
> > while editing this area.
>
> Actually, this applies here:
>
> > Any two or more lines in code should be wrapped in braces, even if they are comments, as they look like separate statements:
> > if (i)
> > {
> > /* Return success. */
> > return 0;
> > }
> >
> > and not:
> >
> > if (i)
> > /* Return success. */
> > return 0;
>
> From:
>
> https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards?highlight=%28coding%29%7C%28conventions%29#Whitespaces
>
Sorry for this mistake.
I pushed the patch below to correct this.
Thanks,
Andrew
--
gdb/riscv: Add back missing braces in riscv-linux-nat.c
In this commit:
commit ee67fd7f3f6ca78eede2862e309c0bcf266bbd7e
Date: Thu Oct 25 12:03:31 2018 +0100
gdb/riscv: Use correct regnum in riscv_linux_nat_target::fetch_registers
I incorrectly removed a set of braces in violation of the GDB coding
standard. This commit adds them back.
gdb/ChangeLog:
* riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
Add missing braces. No functional change.
---
gdb/ChangeLog | 5 +++++
gdb/riscv-linux-nat.c | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gdb/riscv-linux-nat.c b/gdb/riscv-linux-nat.c
index c09121d052b..d51f6e30218 100644
--- a/gdb/riscv-linux-nat.c
+++ b/gdb/riscv-linux-nat.c
@@ -201,8 +201,10 @@ riscv_linux_nat_target::fetch_registers (struct regcache *regcache, int regnum)
if ((regnum == RISCV_CSR_MISA_REGNUM)
|| (regnum == -1))
- /* TODO: Need to add a ptrace call for this. */
- regcache->raw_supply_zeroed (RISCV_CSR_MISA_REGNUM);
+ {
+ /* TODO: Need to add a ptrace call for this. */
+ regcache->raw_supply_zeroed (RISCV_CSR_MISA_REGNUM);
+ }
/* Access to other CSRs has potential security issues, don't support them for
now. */
--
2.14.5
next prev parent reply other threads:[~2018-10-28 11:23 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 2:12 [PATCH 0/5] RISC-V Linux native port Jim Wilson
2018-08-08 2:15 ` [PATCH 1/5] RISC-V: Make riscv_isa_xlen a global function Jim Wilson
2018-08-08 12:42 ` Andrew Burgess
2018-08-08 17:55 ` Jim Wilson
2018-08-08 19:18 ` Simon Marchi
2018-08-08 2:16 ` [PATCH 2/5] RISC-V: Add software single step support Jim Wilson
2018-08-08 12:50 ` Andrew Burgess
2018-08-08 17:55 ` Jim Wilson
2018-08-08 2:16 ` [PATCH 3/5] RISC-V: Add linux target support Jim Wilson
2018-08-08 14:41 ` Andrew Burgess
2018-08-08 18:19 ` Jim Wilson
2018-08-08 18:35 ` Jim Wilson
2018-08-09 20:40 ` Jim Wilson
2018-08-08 2:17 ` [PATCH 5/5] RISC-V: Add configure support riscv*-linux* Jim Wilson
2018-08-08 16:00 ` Andrew Burgess
2018-08-08 17:30 ` Tom Tromey
2018-08-08 18:22 ` Eli Zaretskii
2018-08-08 20:49 ` Palmer Dabbelt
2018-08-08 23:26 ` Tom Tromey
2018-08-08 23:29 ` Tom Tromey
2018-08-09 2:36 ` Eli Zaretskii
2018-08-09 3:43 ` Jim Wilson
2018-08-09 4:55 ` Tom Tromey
2018-08-09 7:05 ` Andreas Schwab
2018-08-09 12:55 ` Eli Zaretskii
2018-08-09 17:25 ` Jim Wilson
2018-08-09 0:25 ` Jim Wilson
2018-08-09 0:29 ` [PATCH 5/5] RISC-V: Add configure support for riscv*-linux* Jim Wilson
2018-08-09 2:39 ` Eli Zaretskii
2018-08-09 15:57 ` Tom Tromey
2018-08-09 20:42 ` Jim Wilson
2018-08-08 2:17 ` [PATCH 4/5] RISC-V: Add native linux support Jim Wilson
2018-08-08 15:58 ` Andrew Burgess
2018-08-08 23:36 ` Jim Wilson
2018-08-08 23:39 ` Jim Wilson
2018-08-09 8:42 ` Andrew Burgess
2018-08-09 20:41 ` Jim Wilson
2018-10-25 10:49 ` Andreas Schwab
2018-10-25 11:09 ` Andrew Burgess
2018-10-25 12:06 ` Pedro Alves
2018-10-28 11:23 ` Andrew Burgess [this message]
2018-10-25 17:55 ` John Baldwin
2018-10-25 18:17 ` Jim Wilson
2018-10-25 19:19 ` John Baldwin
2018-10-27 6:07 ` Palmer Dabbelt
2018-10-29 8:50 ` Andreas Schwab
2018-10-25 16:40 ` Jim Wilson
2018-08-08 12:41 ` [PATCH 0/5] RISC-V Linux native port Andrew Burgess
2018-08-08 17:41 ` Jim Wilson
2018-08-08 18:16 ` Andrew Burgess
2018-08-08 18:42 ` Jim Wilson
2018-08-09 3:18 ` Palmer Dabbelt
2018-08-10 18:04 ` Pedro Alves
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=20181028112326.GF15098@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).