This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Differences between program runs with and without gdb
- From: Christoph Bartoschek <bartoschek at or dot uni-bonn dot de>
- To: gdb at sourceware dot org
- Date: Wed, 10 Jan 2007 17:20:46 +0100
- Subject: Re: Differences between program runs with and without gdb
- References: <200701101517.20024.bartoschek@or.uni-bonn.de>
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