mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-15 03:48:11 +08:00
2000-02-16 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. Make sure that the signal number returned is within the range specified by REALTIME_LO and REALTIME_HI.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2000-02-16 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. Make sure that the signal number
|
||||||
|
returned is within the range specified by REALTIME_LO and
|
||||||
|
REALTIME_HI.
|
||||||
|
|
||||||
2000-02-16 Mark Kettenis <kettenis@gnu.org>
|
2000-02-16 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* configure: Regenerated.
|
* configure: Regenerated.
|
||||||
|
16
gdb/target.c
16
gdb/target.c
@ -2022,8 +2022,6 @@ do_target_signal_to_host (enum target_signal oursig,
|
|||||||
return SIGPRIO;
|
return SIGPRIO;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case TARGET_SIGNAL_REALTIME_32: return 32; /* by definition */
|
|
||||||
|
|
||||||
/* Mach exceptions. Assumes that the values for EXC_ are positive! */
|
/* Mach exceptions. Assumes that the values for EXC_ are positive! */
|
||||||
#if defined (EXC_BAD_ACCESS) && defined (_NSIG)
|
#if defined (EXC_BAD_ACCESS) && defined (_NSIG)
|
||||||
case TARGET_EXC_BAD_ACCESS:
|
case TARGET_EXC_BAD_ACCESS:
|
||||||
@ -2060,11 +2058,21 @@ do_target_signal_to_host (enum target_signal oursig,
|
|||||||
if (oursig >= TARGET_SIGNAL_REALTIME_33
|
if (oursig >= TARGET_SIGNAL_REALTIME_33
|
||||||
&& oursig <= TARGET_SIGNAL_REALTIME_63)
|
&& oursig <= TARGET_SIGNAL_REALTIME_63)
|
||||||
{
|
{
|
||||||
|
/* This block of signals is continuous, and
|
||||||
|
TARGET_SIGNAL_REALTIME_33 is 33 by definition. */
|
||||||
int retsig =
|
int retsig =
|
||||||
(int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + REALTIME_LO;
|
(int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + 33;
|
||||||
if (retsig < REALTIME_HI)
|
if (retsig >= REALTIME_LO && retsig < REALTIME_HI)
|
||||||
return retsig;
|
return retsig;
|
||||||
}
|
}
|
||||||
|
#if (REALTIME_LO < 33)
|
||||||
|
else if (oursig == TARGET_SIGNAL_REALTIME_32)
|
||||||
|
{
|
||||||
|
/* TARGET_SIGNAL_REALTIME_32 isn't contiguous with
|
||||||
|
TARGET_SIGNAL_REALTIME_33. It is 32 by definition. */
|
||||||
|
return 32;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
*oursig_ok = 0;
|
*oursig_ok = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user