Eliminate safe_strsignal().

This commit is contained in:
Andrew Cagney 2000-06-04 01:58:49 +00:00
parent 507f3c78fb
commit 8e6a3c35b9
5 changed files with 23 additions and 27 deletions

View File

@ -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,

View File

@ -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.

View File

@ -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. */

View File

@ -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);

View File

@ -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. */