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


Am Mittwoch, 10. Januar 2007 15:17 schrieb Christoph Bartoschek:
> Hi,
>
> is there a list of things that could be different between to runs of a
> programm once with and once without running it under gdb?
>
> I have a programm that calls the custom memory allocator less often when
> run under gdb. Now I search for all possible causes for this behaviour.
>


Hi,

thanks to all that helped.

I've just found the problem. When the program is started with gdb the 
commandline differs. This means that argv[0] is different and that has the 
effect that our commandline parser needs a different number of allocations.

Starting the programm with:

gdb ./prog

results in an argv[0] of

/home/ponto/source/prog 

Starting it with

./prog

results in an argv[0] of

./prog


Greetings 
Christoph Bartoschek


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