]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* mips-tdep.c (mips_breakpoint_from_pc): Add new static variable
authorJoel Brobecker <brobecker@gnat.com>
Sat, 9 Jan 2010 04:38:29 +0000 (04:38 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Sat, 9 Jan 2010 04:38:29 +0000 (04:38 +0000)
        containing the correct breakpoint instruction to use on mips-irix.
        Use it when the osabi is GDB_OSABI_IRIX.

gdb/ChangeLog
gdb/mips-tdep.c

index f562851a90b0024316a106c50793defcf971164c..b7fb8ce5b6aa6c1c50f45cabec2718f51b10bc16 100644 (file)
@@ -1,3 +1,10 @@
+2010-01-09  Joel Brobecker  <brobecker@adacore.com>
+
+       Use the correct breakpoint instruction on mips-irix.
+       * mips-tdep.c (mips_breakpoint_from_pc): Add new static variable
+       containing the correct breakpoint instruction to use on mips-irix.
+       Use it when the osabi is GDB_OSABI_IRIX.
+
 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
 
        -Wunused warning in procfs.c (mips-irix only).
index 27488050a443abfec1adddf04e141cc8c0ef5867..92fcd4adfe85a3fcd6e6bf5e6b4e4f3480b71ce4 100644 (file)
@@ -5045,6 +5045,9 @@ mips_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
          static gdb_byte big_breakpoint[] = { 0, 0x5, 0, 0xd };
          static gdb_byte pmon_big_breakpoint[] = { 0, 0, 0, 0xd };
          static gdb_byte idt_big_breakpoint[] = { 0, 0, 0x0a, 0xd };
+         /* Likewise, IRIX appears to expect a different breakpoint,
+            although this is not apparent until you try to use pthreads. */
+         static gdb_byte irix_big_breakpoint[] = { 0, 0, 0, 0xd };
 
          *lenptr = sizeof (big_breakpoint);
 
@@ -5054,6 +5057,8 @@ mips_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
                   || strcmp (target_shortname, "pmon") == 0
                   || strcmp (target_shortname, "lsi") == 0)
            return pmon_big_breakpoint;
+         else if (gdbarch_osabi (gdbarch) == GDB_OSABI_IRIX)
+           return irix_big_breakpoint;
          else
            return big_breakpoint;
        }