This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [PATCH] Fix for target.c:do_target_signal_to_host()
- To: Mark Kettenis <kettenis at wins dot uva dot nl>
- Subject: Re: [PATCH] Fix for target.c:do_target_signal_to_host()
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 15 Feb 2000 19:32:16 +1100
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200002142116.e1ELGrL06391@delius.kettenis.local>
Mark Kettenis wrote:
>
> Hi,
>
> I noticed that under Linux, if I send a RT signal N to the program I'm
> debugging, GDB actually sends signal N - 1, e.g. if you continue with
>
> signal SIG35
>
> GDB will tell you that the program terminated with SIG34.
>
> The appended patch fixes this.
If you add a comment noting that:
o TARGET_SIGNAL_REALTIME_32 isn't
contigious with TARGET_SIGNAL_REALTIME_32
o TARGET_SIGNAL_REALTIME_33 is 33 by defintion.
then it can go straight in.
Andrew
>
> Mark
>
> 2000-02-14 Mark Kettenis <kettenis@gnu.org>
>
> * target.c (do_target_signal_to_host): Do not use REALTIME_LO in
> the conversion of the signal number. TARGET_SIGNAL_REALTIME_33 is
> 33 by definition, whereas REALTIME_LO might be 32 on systems that
> have SIG32 such as Linux.
>
> Index: gdb/target.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/target.c,v
> retrieving revision 1.2
> diff -u -r1.2 target.c
> --- gdb/target.c 2000/02/09 08:52:47 1.2
> +++ gdb/target.c 2000/02/14 21:09:27
> @@ -2061,7 +2061,7 @@
> && oursig <= TARGET_SIGNAL_REALTIME_63)
> {
> int retsig =
> - (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + REALTIME_LO;
> + (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + 33;
> if (retsig < REALTIME_HI)
> return retsig;
> }