* FYI: remove some unused functions
@ 2010-01-19 22:20 Tom Tromey
2010-01-21 11:28 ` Joel Brobecker
0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2010-01-19 22:20 UTC (permalink / raw)
To: gdb-patches
I'm checking this in.
This patch removes some unused functions. These were causing the
regression tester to die, due to the new warnings.
I verified that each of these is not referenced in the gdb tree using:
find src/gdb -type f -print | fgrep -v '#' | fgrep -v '~' |
fgrep -v ChangeLog | xargs egrep '\bNAMEHERE\b'
Even so I'm a little wary of this change.
If I broke something, please let me know and I will fix it tomorrow.
Tom
2010-01-19 Tom Tromey <tromey@redhat.com>
* top.c (stop_sig, float_handler, do_nothing): Remove.
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.176
diff -u -r1.176 top.c
--- top.c 1 Jan 2010 07:31:42 -0000 1.176
+++ top.c 19 Jan 2010 22:12:32 -0000
@@ -184,15 +184,6 @@
char *lim_at_start;
#endif
-/* Signal to catch ^Z typed while reading a command: SIGTSTP or SIGCONT. */
-
-#ifndef STOP_SIGNAL
-#ifdef SIGTSTP
-#define STOP_SIGNAL SIGTSTP
-static void stop_sig (int);
-#endif
-#endif
-
/* Hooks for alternate command interfaces. */
/* Called after most modules have been initialized, but before taking users
@@ -785,57 +776,6 @@
}
\f
-#ifdef STOP_SIGNAL
-static void
-stop_sig (int signo)
-{
-#if STOP_SIGNAL == SIGTSTP
- signal (SIGTSTP, SIG_DFL);
-#if HAVE_SIGPROCMASK
- {
- sigset_t zero;
-
- sigemptyset (&zero);
- sigprocmask (SIG_SETMASK, &zero, 0);
- }
-#elif HAVE_SIGSETMASK
- sigsetmask (0);
-#endif
- kill (getpid (), SIGTSTP);
- signal (SIGTSTP, stop_sig);
-#else
- signal (STOP_SIGNAL, stop_sig);
-#endif
- printf_unfiltered ("%s", get_prompt ());
- gdb_flush (gdb_stdout);
-
- /* Forget about any previous command -- null line now will do nothing. */
- dont_repeat ();
-}
-#endif /* STOP_SIGNAL */
-
-/* Initialize signal handlers. */
-static void
-float_handler (int signo)
-{
- /* This message is based on ANSI C, section 4.7. Note that integer
- divide by zero causes this, so "float" is a misnomer. */
- signal (SIGFPE, float_handler);
- error (_("Erroneous arithmetic operation."));
-}
-
-static void
-do_nothing (int signo)
-{
- /* Under System V the default disposition of a signal is reinstated after
- the signal is caught and delivered to an application process. On such
- systems one must restore the replacement signal handler if one wishes
- to continue handling the signal in one's program. On BSD systems this
- is not needed but it is harmless, and it simplifies the code to just do
- it unconditionally. */
- signal (signo, do_nothing);
-}
-
/* The current saved history number from operate-and-get-next.
This is -1 if not valid. */
static int operate_saved_history = -1;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: FYI: remove some unused functions
2010-01-19 22:20 FYI: remove some unused functions Tom Tromey
@ 2010-01-21 11:28 ` Joel Brobecker
0 siblings, 0 replies; 2+ messages in thread
From: Joel Brobecker @ 2010-01-21 11:28 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
> Even so I'm a little wary of this change.
> If I broke something, please let me know and I will fix it tomorrow.
I did a little bit of digging, and I think that these functions have
not been used since Sept 2004 (all these functions stopped being used
after init_signals got deleted, AFAICT).
--
Joel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-21 11:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19 22:20 FYI: remove some unused functions Tom Tromey
2010-01-21 11:28 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).