Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [pushed] gdb/aarch64: fix indentation in aarch64-tdep.c
Date: Mon, 19 Oct 2026 10:49:41 -0400	[thread overview]
Message-ID: <20261019144942.274815-1-simon.marchi@efficios.com> (raw)

I noticed a misleading indentation clang-tidy warning while editing
aarch64-tdep.c in my editor.  Fix it, and add some missing braces, which
our coding style requires for nested ifs.

Change-Id: Ieca14863995b3455abc0a2cdd3010102d67d5a1e
---
 gdb/aarch64-tdep.c | 53 ++++++++++++++++++++++++++--------------------
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 10b74ff1438c..109fca6bf110 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -6179,20 +6179,24 @@ aarch64_record_load_store (aarch64_insn_decode_record *aarch64_insn_r)
 	debug_printf ("Process record: load/store (register offset)\n");
       opc = bits (aarch64_insn_r->aarch64_insn, 22, 23);
       if (!(opc >> 1))
-	if (opc & 0x01)
-	  ld_flag = 0x01;
-	else
-	  ld_flag = 0x0;
+	{
+	  if (opc & 0x01)
+	    ld_flag = 0x01;
+	  else
+	    ld_flag = 0x0;
+	}
       else
-	if (size_bits != 0x03)
-	  ld_flag = 0x01;
-	else if (size_bits == 0x3 && vector_flag == 0x0 && opc == 0x2)
-	  {
-	    /* PRFM (register) or RPRFM */
-	    return AARCH64_RECORD_SUCCESS;
-	  }
-	else
-	  return AARCH64_RECORD_UNKNOWN;
+	{
+	  if (size_bits != 0x03)
+	    ld_flag = 0x01;
+	  else if (size_bits == 0x3 && vector_flag == 0x0 && opc == 0x2)
+	    {
+	      /* PRFM (register) or RPRFM */
+	      return AARCH64_RECORD_SUCCESS;
+	    }
+	  else
+	    return AARCH64_RECORD_UNKNOWN;
+	}
 
       if (!ld_flag)
 	{
@@ -6232,19 +6236,22 @@ aarch64_record_load_store (aarch64_insn_decode_record *aarch64_insn_r)
 	}
       opc = bits (aarch64_insn_r->aarch64_insn, 22, 23);
       if (!(opc >> 1))
-	if (opc & 0x01)
-	  ld_flag = 0x01;
-	else
-	  ld_flag = 0x0;
+	{
+	  if (opc & 0x01)
+	    ld_flag = 0x01;
+	  else
+	    ld_flag = 0x0;
+	}
       else
-	if (size_bits != 0x03)
-	  ld_flag = 0x01;
-	else
-	  if (insn_bits10_11 == 0)
+	{
+	  if (size_bits != 0x03)
+	    ld_flag = 0x01;
+	  else if (insn_bits10_11 == 0)
 	    /* PRFUM instruction.  */
 	    return AARCH64_RECORD_SUCCESS;
-      else
-	return AARCH64_RECORD_UNKNOWN;
+	  else
+	    return AARCH64_RECORD_UNKNOWN;
+	}
 
       if (!ld_flag)
 	{

base-commit: 21cf31310977a3a70074ace8d968d17480909656
-- 
2.56.0


                 reply	other threads:[~2026-10-19 14:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261019144942.274815-1-simon.marchi@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    /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