Fix PR threads/19422 - show which thread caused stop
[deliverable/binutils-gdb.git] / gdb / mips-tdep.c
index 6b5a1bd8f809c2aca1c35bcb41ab048e49447617..ca17864f68b5fa6be3dbcf57016d35af215939f8 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for the MIPS architecture, for GDB, the GNU Debugger.
 
-   Copyright (C) 1988-2015 Free Software Foundation, Inc.
+   Copyright (C) 1988-2016 Free Software Foundation, Inc.
 
    Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
    and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
@@ -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
This page took 0.024551 seconds and 4 git commands to generate.