This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: remove deprecated_serial_fd
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 20 Dec 2012 08:29:58 -0700
- Subject: FYI: remove deprecated_serial_fd
A recent ARI report alerted me to the existence of deprecated_serial_fd.
This function has been unused since:
commit 4ab53397914508b0ac96b877cba4bc45f60088fb
Author: Daniel Jacobowitz <dan@debian.org>
Date: Thu Mar 29 19:58:29 2007 +0000
* Makefile.in (coff_solib_h, coff-solib.o, i386v-nat.o, lynx-nat.o)
(remote-st.o, uw-thread.o): Delete.
(HFILES_NO_SRCDIR, ALLDEPFILES): Update.
[...]
I'm checking in this patch to remove it.
Tested by rebuilding and also grep.
Tom
2012-12-20 Tom Tromey <tromey@redhat.com>
* serial.c (deprecated_serial_fd): Remove.
* serial.h (deprecated_serial_fd): Remove.
Index: serial.c
===================================================================
RCS file: /cvs/src/src/gdb/serial.c,v
retrieving revision 1.51
diff -u -r1.51 serial.c
--- serial.c 2 Aug 2012 09:36:39 -0000 1.51
+++ serial.c 20 Dec 2012 15:27:32 -0000
@@ -546,19 +546,6 @@
scb->ops->async (scb, handler != NULL);
}
-int
-deprecated_serial_fd (struct serial *scb)
-{
- /* FIXME: should this output a warning that deprecated code is being
- called? */
- if (scb->fd < 0)
- {
- internal_error (__FILE__, __LINE__,
- _("serial: FD not valid"));
- }
- return scb->fd; /* sigh */
-}
-
void
serial_debug (struct serial *scb, int debug_p)
{
Index: serial.h
===================================================================
RCS file: /cvs/src/src/gdb/serial.h,v
retrieving revision 1.33
diff -u -r1.33 serial.h
--- serial.h 13 Jun 2012 11:06:52 -0000 1.33
+++ serial.h 20 Dec 2012 15:27:32 -0000
@@ -205,13 +205,6 @@
extern void serial_async (struct serial *scb,
serial_event_ftype *handler, void *context);
-/* Provide direct access to the underlying FD (if any) used to
- implement the serial device. This interface is clearly
- deprecated. Will call internal_error() if the operation isn't
- applicable to the current serial device. */
-
-extern int deprecated_serial_fd (struct serial *scb);
-
/* Trace/debug mechanism.
serial_debug() enables/disables internal debugging.