[PATCH] sim: dv-sockser: pass up connected state

Mike Frysinger vapier@gentoo.org
Tue Apr 13 21:16:00 GMT 2010


On Tuesday 13 April 2010 11:51:47 Joel Brobecker wrote:
> > A few ports rely on internal dv-sockser state in order to detect whether
> > a connection has been made (look for 'extern sockser_addr').  Rather than
> > continuing that tradition, extend the existing status function to return
> > the socket connection status.
> > 
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> > 
> > 2010-03-31  Mike Frysinger  <vapier@gentoo.org>
> > 
> > 	* dv-sockser.h (DV_SOCKSER_DISCONNECTED): Define.
> > 	* dv-sockser.c (dv_sockser_status): Set DV_SOCKSER_DISCONNECTED
> > 	initially.
> 
> This looks OK to me. Are you going to fix these ports next?

ive posted a fix for the mn10300 because it uses the information on the fly to 
flip between stdio and sockets.  the mips stuff isnt straight forward because 
it uses the info to determine how to create the default device tree (use the 
tcp or the stdio backend).  this new status code determines whether something 
is connected, not "did someone specify a command line option, even if it was 
invalid" which is what mips does atm.  timing wise, it isnt possible to 
specify the option and have someone connect before the device tree is created.

imo, the mips code should be done to flip between stdio/tcp on the fly, but if 
they really want to keep the current behavior, i think we might have to add 
another status bit like DV_SOCKSER_VALID_PEER.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100413/cfaac4c2/attachment.sig>


More information about the Gdb-patches mailing list