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]

Re: [PATCH] MIPS Linux signals


On 06/06/2012 03:52 PM, Maciej W. Rozycki wrote:
On Fri, 1 Jun 2012, Michael Eager wrote:


  I find this unreadable (and buggy too, which is likely a consequence),
per observations above please rewrite this as below:

   if (signo>= MIPS_SIGRTMIN&&  signo<= MIPS_SIGRTMAX)
     {
       /* GDB_SIGNAL_REALTIME values are not contiguous, map parts of
          the MIPS block to the respective GDB_SIGNAL_REALTIME blocks.  */
       signo -= MIPS_SIGRTMIN;
       if (signo == 0)
	return GDB_SIGNAL_REALTIME_32;
       else if (signo<  32)
	return ((enum gdb_signal) (signo - 1 + (int) GDB_SIGNAL_REALTIME_33));
       else
	return ((enum gdb_signal) (signo - 32 + (int) GDB_SIGNAL_REALTIME_64));
     }

   return GDB_SIGNAL_UNKNOWN;
}

-- the casts are probably redundant, but let them stay.

  OK with this change, the rest is fine with me.  Thanks for tackling this
problem.

Checked in with indicated changes.


--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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