This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] gdb/gdbserver/linux-ppc-low.c: Wrong return value in ppc_cannot_store_register()


Hi,

ppc_cannot_store_register() from linux-ppc-low.c returns 2 instead of 1.
This seems to be broken. In linux-low.c:usr_store_inferior_registers() there is following comparison:

     if ((*the_low_target.cannot_store_register) (regno) == 1)
       return;

This won't work with ppc low target. The patch returns 1 instead of 2.

Is it ok to apply ?


ChangeLog:


       * linux-ppc-low.c (ppc_cannot_store_register): Return
       1 instead of 2.


====================================================


diff -urN src/gdb/gdbserver/linux-ppc-low.c dev/gdb/gdbserver/linux-ppc-low.c
--- src/gdb/gdbserver/linux-ppc-low.c   2007-01-10 15:48:11.000000000 +0100
+++ dev/gdb/gdbserver/linux-ppc-low.c   2007-01-18 13:27:50.000000000 +0100
@@ -53,7 +53,7 @@
{
  /* Some kernels do not allow us to store fpscr.  */
  if (regno == find_regno ("fpscr"))
-    return 2;
+    return 1;

  return 0;
}


Regards, Markus

--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]