This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: ser*.[hc] cleanups
- To: Andrew Cagney <ac131313 AT cygnus dot com>, gdb AT sourceware.cygnus dot com
- Subject: Re: ser*.[hc] cleanups
- From: Andrew Cagney <ac131313 AT cygnus dot com>
- Date: Tue, 14 Sep 1999 13:06:33 +1000
- Organization: Cygnus Solutions
- References: <37DDAA8D.E318C6C4@cygnus.com>
Andrew Cagney wrote:
>
> FYI,
>
> I've just checked in the first of a number of cleanups to the serial
> code. This round only contained cosmetic changes:
>
> o stripped out K&R style declarations
>
> o replaced macro's directly calling functions
> with indirect function calls.
>
> Next is to consolidate ser-tcp, ser-unix and ser-pipe so that they are
> ready for some async changes that Elena is preparing.
I got asked what what I ment by consoliadate. It's actually very
simple.
ser-{tcp,unix,pipe}.c are, to varying degrees, clones of each other.
They are all based on the unix/FD model and the assumption that
non-blocking and timed reads on scb->fd are possible. They even contain
the same bugs! By consolidate I mean:
o identifying common operations between these
three and merging them.
The common functionality could either live in
(new) ser-fd.[hc] or the existing ser-unix.[hc].
I've not thought that far ahead.
A must have.
o Investigate the possibility of revising serial.h
so that access to ``struct _serial_t'' is restricted.
This is to stop generic GDB code poking around in
that objects internals.
A nice to have.
enjoy,
Andrew