aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-08-07 12:48:47 -0600
committerTom Tromey <tom@tromey.com>2018-08-27 12:00:09 -0600
commit70ab8ccd4f382a6c7e59c523c22b07fe03a95f52 (patch)
treead5acd6eef8ceb059deb909d944f39d21d9471b5 /gdb/mips-tdep.c
parent896a7aa6a119ce9d4872de87dabb81176489b1a3 (diff)
downloadgdb-70ab8ccd4f382a6c7e59c523c22b07fe03a95f52.zip
gdb-70ab8ccd4f382a6c7e59c523c22b07fe03a95f52.tar.gz
gdb-70ab8ccd4f382a6c7e59c523c22b07fe03a95f52.tar.bz2
Use CORE_ADDR_MAX in various "breaks" arrays
Code like this: CORE_ADDR breaks[2] = {-1, -1}; ... gives a warning with -Wnarrowing. This patch changes all instances of this to use CORE_ADDR_MAX instead. gdb/ChangeLog 2018-08-27 Tom Tromey <tom@tromey.com> * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use CORE_ADDR_MAX. * mips-tdep.c (mips_deal_with_atomic_sequence) (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX. * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw) (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX. * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use CORE_ADDR_MAX. * aarch64-tdep.c (aarch64_software_single_step): Use CORE_ADDR_MAX.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 37a12a9..5e0a606 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -3910,7 +3910,7 @@ mips_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
static std::vector<CORE_ADDR>
mips_deal_with_atomic_sequence (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- CORE_ADDR breaks[2] = {-1, -1};
+ CORE_ADDR breaks[2] = {CORE_ADDR_MAX, CORE_ADDR_MAX};
CORE_ADDR loc = pc;
CORE_ADDR branch_bp; /* Breakpoint at branch instruction's destination. */
ULONGEST insn;
@@ -4013,7 +4013,7 @@ micromips_deal_with_atomic_sequence (struct gdbarch *gdbarch,
{
const int atomic_sequence_length = 16; /* Instruction sequence length. */
int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed). */
- CORE_ADDR breaks[2] = {-1, -1};
+ CORE_ADDR breaks[2] = {CORE_ADDR_MAX, CORE_ADDR_MAX};
CORE_ADDR branch_bp = 0; /* Breakpoint at branch instruction's
destination. */
CORE_ADDR loc = pc;