diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-01-13 21:11:38 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-01-13 21:11:38 +0000 |
commit | a1abc3bd0ff48116e835c7a104087ac8d7784196 (patch) | |
tree | ffdccb79ff0fff8c01a1cb316147c1b9fc5239cb /gdb | |
parent | d2b4e1602b40e871d9883cc102f73d7d827dc725 (diff) | |
download | gdb-a1abc3bd0ff48116e835c7a104087ac8d7784196.tar.gz |
From Petr Ledvina <ledvinap@kae.zcu.cz>:
* signals.c (target_signal_to_name): Verify that SIG is within the
bounds of the signals array.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/signals.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 412d4012b8e..d18a67787eb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2002-01-13 Andrew Cagney <ac131313@redhat.com> + From Petr Ledvina <ledvinap@kae.zcu.cz>: + * signals.c (target_signal_to_name): Verify that SIG is within the + bounds of the signals array. + +2002-01-13 Andrew Cagney <ac131313@redhat.com> + * MAINTAINERS: Remove arm-coff and arm-pe from target list. 2002-01-13 Keith Seitz <keiths@redhat.com> diff --git a/gdb/signals.c b/gdb/signals.c index abbd7a56c92..cf0078d94fc 100644 --- a/gdb/signals.c +++ b/gdb/signals.c @@ -214,7 +214,10 @@ target_signal_to_name (enum target_signal sig) /* I think the code which prints this will always print it along with the string, so no need to be verbose. */ return "?"; - return signals[sig].name; + else if ((sig >= TARGET_SIGNAL_FIRST) && (sig <= TARGET_SIGNAL_LAST)) + return signals[sig].name; + else + return signals[sig].name; } /* Given a name, return its signal. */ |