Re: main(), registers and gdb

2007-01-10 Thread Greg Watson
On Jan 10, 2007, at 4:38 PM, Daniel Jacobowitz wrote: On Wed, Jan 10, 2007 at 04:32:48PM -0700, Greg Watson wrote: If the following code is compiled with 'gcc -g -O0 -o test test.c', the address of argc is passed into func() in the ecx register. Since ecx is not preserved after t

main(), registers and gdb

2007-01-10 Thread Greg Watson
I have an issue (I hesitate to say a problem) related to register saving and debugging on the linux/x86 platform using gdb 4.1.0. If the following code is compiled with 'gcc -g -O0 -o test test.c', the address of argc is passed into func() in the ecx register. Since ecx is not preserved aft