Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb influencing app behaviour ?
@ 2011-03-14 20:26 Danny Backx
  2011-03-15  9:10 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Backx @ 2011-03-14 20:26 UTC (permalink / raw)
  To: gdb

Hi,

I was trying to debug the interaction between RoadMap and gpsd's client
library recently. 

I believe I've found my problem, but I think gdb influenced application
behaviour in a way I'd like to understand.

The application uses some gtk call which presumably ends up using
select(2) to trigger a function when data can be read from a socket.

The application appears to behave differently when I set a breakpoint in
that function. (The application and the library were both trying to read
from the socket, by setting the breakpoint the other one would always
win the race.)

How can this be explained ? Am I wrong ?

This is on Ubuntu on a regular PC. http://sf.net/projects/roadmap and
http://gpsd.berlios.de .

	Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb influencing app behaviour ?
  2011-03-14 20:26 gdb influencing app behaviour ? Danny Backx
@ 2011-03-15  9:10 ` Andreas Schwab
  2011-03-15 19:09   ` Danny Backx
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2011-03-15  9:10 UTC (permalink / raw)
  To: danny.backx; +Cc: gdb

Danny Backx <danny.backx@scarlet.be> writes:

> The application appears to behave differently when I set a breakpoint in
> that function. (The application and the library were both trying to read
> from the socket, by setting the breakpoint the other one would always
> win the race.)
>
> How can this be explained ?

Any debugger will change the timing of the debuggee.

Andreas.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb influencing app behaviour ?
  2011-03-15  9:10 ` Andreas Schwab
@ 2011-03-15 19:09   ` Danny Backx
  0 siblings, 0 replies; 3+ messages in thread
From: Danny Backx @ 2011-03-15 19:09 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb

On di, 2011-03-15 at 10:09 +0100, Andreas Schwab wrote:
> Danny Backx <danny.backx@scarlet.be> writes:
> 
> > The application appears to behave differently when I set a breakpoint in
> > that function. (The application and the library were both trying to read
> > from the socket, by setting the breakpoint the other one would always
> > win the race.)
> >
> > How can this be explained ?
> 
> Any debugger will change the timing of the debuggee.

Yeah, I'm aware of that. I was trying to figure out whether this
scenario rings a bell for anyone here. Googling it turned up nothing.

	Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-15 19:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14 20:26 gdb influencing app behaviour ? Danny Backx
2011-03-15  9:10 ` Andreas Schwab
2011-03-15 19:09   ` Danny Backx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox