This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb problem

Difference with Linux might be matter of timing. (Or, might gdb version).

The problem is that gdb calls poll() while it has (all) data already in libc
It also calls fileno() and isatty() arround that time.
(Also {m,c,re}alloc, free, pthread_sigmask, vsprints)

Gdb first calls poll() with timeout=0 and if there are no data on fd=0, 
it calls again poll() with timeout=-1. 
I verified the both calls come directly from gdb.exe, from the same address
(0x00456a8f when gdb is at 00400000-00892000 - gdb 7.3.50-1)

Is there in gdb's source visible, that a bad combination of fgetc (on
buffered stream)
and poll (on fd - unbuffered) ? 


This was usefull:
break fgetc
break __srget_r         (  __sread        __srget_r     _read_r     read )
watch ((FILE *) 0x6116f370) -> _p
#  where the addres is    p fp         from  __srget_r()
break *(_sigbe+69)
break *(_sigfe+75)
break poll
break cygwin_select

View this message in context:
Sent from the Cygwin list mailing list archive at

Problem reports:
Unsubscribe info:

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