diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-06-04 01:58:49 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-06-04 01:58:49 +0000 |
commit | 8e6a3c35b9c93dbff0ead9659581e7b75c3e31be (patch) | |
tree | 53595a6a8dd256fac35bc9278d111afcae5d231d /gdb | |
parent | 507f3c78fb4a1235b731350d60f1bf0ce94b4175 (diff) | |
download | gdb-8e6a3c35b9c93dbff0ead9659581e7b75c3e31be.zip gdb-8e6a3c35b9c93dbff0ead9659581e7b75c3e31be.tar.gz gdb-8e6a3c35b9c93dbff0ead9659581e7b75c3e31be.tar.bz2 |
Eliminate safe_strsignal().
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/TODO | 9 | ||||
-rw-r--r-- | gdb/corelow.c | 8 | ||||
-rw-r--r-- | gdb/defs.h | 5 | ||||
-rw-r--r-- | gdb/utils.c | 20 |
5 files changed, 23 insertions, 27 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b9d9059..247183e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +Sat Jun 3 20:43:59 2000 Andrew Cagney <cagney@b1.cygnus.com> + + * defs.h (strsignal, safe_strsignal): Delete declarations. + * utils.c (safe_strsignal): Delete. + * corelow.c (core_open): Replace save_strsignal with + target_signal_to_string + target_signal_from_host. + * TODO: Document problems with target_signal_from_host. + 2000-06-03 Kevin Buettner <kevinb@redhat.com> * annotate.c, annotate.h, breakpoint.c, command.c, command.h, @@ -874,6 +874,15 @@ wrong. It involves the use of add_set_enum_cmd(). -- +Fix target_signal_from_host() etc. + +The name is wrong for starters. ``target_signal'' should probably be +``gdb_signal''. ``from_host'' should be ``from_target_signal''. +After that it needs to be multi-arched and made independant of any +host signal numbering. + +-- + Update ALPHA so that it uses ``struct frame_extra_info'' instead of EXTRA_FRAME_INFO. diff --git a/gdb/corelow.c b/gdb/corelow.c index 940776d..43163d9 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -1,5 +1,5 @@ /* Core dump and executable file functions below target vector, for GDB. - Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 97, 1998 + Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation, Inc. This file is part of GDB. @@ -337,8 +337,12 @@ core_open (filename, from_tty) siggy = bfd_core_file_failing_signal (core_bfd); if (siggy > 0) + /* NOTE: target_signal_from_host() converts a target signal value + into gdb's internal signal value. Unfortunatly gdb's internal + value is called ``target_signal'' and this function got the + name ..._from_host(). */ printf_filtered ("Program terminated with signal %d, %s.\n", siggy, - safe_strsignal (siggy)); + target_signal_to_string (target_signal_from_host (siggy))); /* Build up thread list from BFD sections. */ @@ -56,9 +56,6 @@ #include "libiberty.h" -/* libiberty.h can't declare this one, but evidently we can. */ -extern char *strsignal (int); - #include "progress.h" #ifdef USE_MMALLOC @@ -293,8 +290,6 @@ extern int subset_compare (char *, char *); extern char *safe_strerror (int); -extern char *safe_strsignal (int); - extern void init_malloc (void *); extern void request_quit (int); diff --git a/gdb/utils.c b/gdb/utils.c index 81ac1fa..f5088af 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -772,26 +772,6 @@ safe_strerror (errnum) return (msg); } -/* The strsignal() function can return NULL for signal values that are - out of range. Provide a "safe" version that always returns a - printable string. */ - -char * -safe_strsignal (signo) - int signo; -{ - char *msg; - static char buf[32]; - - if ((msg = strsignal (signo)) == NULL) - { - sprintf (buf, "(undocumented signal %d)", signo); - msg = buf; - } - return (msg); -} - - /* Print the system error message for errno, and also mention STRING as the file name for which the error was encountered. Then return to command level. */ |