diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2016-01-07 19:12:44 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2016-01-07 19:12:44 +0000 |
commit | 5dd0563088b3ca9f5fd66daa0ffe823b60e4b92e (patch) | |
tree | a94b81077e0fa7dcf0826c9937402701048220fd | |
parent | b900245c3b92fc460a3f7fa17d14eb08f9ab4c76 (diff) | |
download | gdb-5dd0563088b3ca9f5fd66daa0ffe823b60e4b92e.zip gdb-5dd0563088b3ca9f5fd66daa0ffe823b60e4b92e.tar.gz gdb-5dd0563088b3ca9f5fd66daa0ffe823b60e4b92e.tar.bz2 |
MIPS: Complete `status' to `err' renaming in `mips_breakpoint_from_pc'
Complement commit d09f2c3f [target_read_memory&co: no longer return
target_xfer_status] and apply the same change made to the big-endian leg
of the function to the little-endian leg as well.
gdb/
* mips-tdep.c (mips_breakpoint_from_pc): Rename local `status'
to `err' in the little-endian leg.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e11ea1a..73ba8cd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-01-07 Maciej W. Rozycki <macro@imgtec.com> + + * mips-tdep.c (mips_breakpoint_from_pc): Rename local `status' + to `err' in the little-endian leg. + 2016-01-06 Yao Qi <yao.qi@linaro.org> * arch/arm-get-next-pcs.c (arm_get_next_pcs): Move it to some diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index c8e12e8..ca17864 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -7170,12 +7170,13 @@ mips_breakpoint_from_pc (struct gdbarch *gdbarch, static gdb_byte micromips16_little_breakpoint[] = { 0x85, 0x46 }; static gdb_byte micromips32_little_breakpoint[] = { 0x5, 0, 0x7, 0 }; ULONGEST insn; - int status; + int err; int size; - insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, &status); - size = status ? 2 - : mips_insn_size (ISA_MICROMIPS, insn) == 2 ? 2 : 4; + insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, &err); + size = (err != 0 + ? 2 : (mips_insn_size (ISA_MICROMIPS, insn) == 2 + ? 2 : 4)); *pcptr = unmake_compact_addr (pc); *lenptr = size; return (size == 2) ? micromips16_little_breakpoint |