From: Luis Machado <luis.machado@linaro.org>
To: gdb-patches@sourceware.org
Cc: alan.hayward@arm.com
Subject: [PATCH] [AArch64] Convert an int flag variable to bool
Date: Mon, 13 Jan 2020 17:42:00 -0000 [thread overview]
Message-ID: <20200113174239.7819-2-luis.machado@linaro.org> (raw)
In-Reply-To: <20200113174239.7819-1-luis.machado@linaro.org>
As suggested, the cond variable is really supposed to be a bool. So,
make it so.
gdb/ChangeLog:
2020-01-13 Luis Machado <luis.machado@linaro.org>
* aarch64-tdep.c (struct aarch64_displaced_step_closure)
<cond>: Change type to bool.
(aarch64_displaced_step_b_cond): Update cond to use bool type.
(aarch64_displaced_step_cb): Likewise.
(aarch64_displaced_step_tb): Likewise.
---
gdb/aarch64-tdep.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 29b712c155..02634b9c5c 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -2735,7 +2735,7 @@ struct aarch64_displaced_step_closure : public displaced_step_closure
{
/* It is true when condition instruction, such as B.CON, TBZ, etc,
is being displaced stepping. */
- int cond = 0;
+ bool cond = false;
/* PC adjustment offset after displaced stepping. If 0, then we don't
write the PC back, assuming the PC is already the right address. */
@@ -2816,7 +2816,7 @@ aarch64_displaced_step_b_cond (const unsigned cond, const int32_t offset,
*/
emit_bcond (dsd->insn_buf, cond, 8);
- dsd->dsc->cond = 1;
+ dsd->dsc->cond = true;
dsd->dsc->pc_adjust = offset;
dsd->insn_count = 1;
}
@@ -2851,7 +2851,7 @@ aarch64_displaced_step_cb (const int32_t offset, const int is_cbnz,
*/
emit_cb (dsd->insn_buf, is_cbnz, aarch64_register (rn, is64), 8);
dsd->insn_count = 1;
- dsd->dsc->cond = 1;
+ dsd->dsc->cond = true;
dsd->dsc->pc_adjust = offset;
}
@@ -2876,7 +2876,7 @@ aarch64_displaced_step_tb (const int32_t offset, int is_tbnz,
*/
emit_tb (dsd->insn_buf, is_tbnz, bit, aarch64_register (rt, 1), 8);
dsd->insn_count = 1;
- dsd->dsc->cond = 1;
+ dsd->dsc->cond = true;
dsd->dsc->pc_adjust = offset;
}
--
2.17.1
next prev parent reply other threads:[~2020-01-13 17:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 17:42 [PATCH,v2][AArch64] Add more debugging output to aarch64_displaced_step_fixup Luis Machado
2020-01-13 17:42 ` Luis Machado [this message]
2020-01-14 4:25 ` [PATCH] [AArch64] Convert an int flag variable to bool Simon Marchi
2020-01-13 18:21 ` [PATCH,v2][AArch64] Fix step-over-syscall.exp failure Luis Machado
2020-01-21 11:32 ` Alan Hayward
2020-01-21 13:30 ` Luis Machado
2020-01-21 11:24 ` [PATCH,v2][AArch64] Add more debugging output to aarch64_displaced_step_fixup Alan Hayward
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=20200113174239.7819-2-luis.machado@linaro.org \
--to=luis.machado@linaro.org \
--cc=alan.hayward@arm.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