diff options
author | Philipp Rudo <prudo@linux.vnet.ibm.com> | 2018-01-23 13:37:42 +0100 |
---|---|---|
committer | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2018-01-23 13:37:42 +0100 |
commit | ab9bcc67975f2a04dfa0e670096fc8161d7840b9 (patch) | |
tree | 5211021786f3b666f461952c06319c3ca74d50a6 /gdb | |
parent | 21f6f5ffc652e116e518fee29ebdc8fbfeeaa734 (diff) | |
download | gdb-ab9bcc67975f2a04dfa0e670096fc8161d7840b9.zip gdb-ab9bcc67975f2a04dfa0e670096fc8161d7840b9.tar.gz gdb-ab9bcc67975f2a04dfa0e670096fc8161d7840b9.tar.bz2 |
s390: gdbarch_tdep.have_* int -> bool
Currently the gdbarch_tdep.have_* flags are a mix of int and bool. Clean
this up by making them all bool.
gdb/ChangeLog:
* s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
<have_tdb>: Change type to bool.
(s390_gdbarch_tdep_alloc): Adjust.
(s390_gdbarch_init): Adjust.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/s390-linux-tdep.c | 20 |
2 files changed, 17 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cc4816b..52394ab 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com> + * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2> + <have_tdb>: Change type to bool. + (s390_gdbarch_tdep_alloc): Adjust. + (s390_gdbarch_init): Adjust. + +2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com> + * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field. (gdbarch_tdep) <have_upper, have_vx>: New fields. (s390_gdbarch_tdep_alloc): New function. diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index e107af8..7d41dfe 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -113,9 +113,9 @@ struct gdbarch_tdep int v0_full_regnum; bool have_upper; - int have_linux_v1; - int have_linux_v2; - int have_tdb; + bool have_linux_v1; + bool have_linux_v2; + bool have_tdb; bool have_vx; bool have_gs; }; @@ -7824,9 +7824,9 @@ s390_gdbarch_tdep_alloc () tdep->cc_regnum = -1; tdep->have_upper = false; - tdep->have_linux_v1 = 0; - tdep->have_linux_v2 = 0; - tdep->have_tdb = 0; + tdep->have_linux_v1 = false; + tdep->have_linux_v2 = false; + tdep->have_tdb = false; tdep->have_vx = false; tdep->have_gs = false; @@ -7993,13 +7993,13 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) if (tdesc_numbered_register (feature, tdesc_data, S390_LAST_BREAK_REGNUM, "last_break")) - tdep->have_linux_v1 = 1; + tdep->have_linux_v1 = true; if (tdesc_numbered_register (feature, tdesc_data, S390_SYSTEM_CALL_REGNUM, "system_call")) - tdep->have_linux_v2 = 1; + tdep->have_linux_v2 = true; - if (tdep->have_linux_v2 > tdep->have_linux_v1) + if (tdep->have_linux_v2 && !tdep->have_linux_v1) valid_p = 0; } @@ -8011,7 +8011,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) valid_p &= tdesc_numbered_register (feature, tdesc_data, S390_TDB_DWORD0_REGNUM + i, tdb_regs[i]); - tdep->have_tdb = 1; + tdep->have_tdb = true; } /* Vector registers. */ |