This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ser*.[hc] cleanups


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]