This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: Differences between program runs with and without gdb


Christoph Bartoschek wrote:
There is no stepping and no breakpoints are active. The program starts, it terminates and the debugger is quitted.

In that case GDB is still quietly and automatically monitoring threads and signals, of which you say there are none, and also the dynamic linker. I don't know what system you are on or what your program does but it may be that there is an invisible breakpoint every time a library is loaded (GDB uses them to load the symbols from the library). I don't know how that could be affecting anything though. It's possible that a breakpoint has been set on some data somehow - if you have a symbol with just the wrong name.


Perhaps you pass in slightly different parameters or environment when you use GDB. I expect you checked this already.

There's always cache effects of course. Perhaps your program does something unsafe (self modifying code?) and GDB's influence is just enough to perturb the results.

Instead of GDB, have you tried running it "under" something else. ptrace or valgrind perhaps, assuming your on a compatible system.

Well there's some ideas anyway.

Andrew


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