[HACKERS] why was the VAR 'optind' never changed in initdb?

2012-04-09 Thread Clover White
argc) (gdb) p optind $11 = 1 (gdb) p argc $12 = 6 (gdb) n 2663if (pwprompt pwfilename) (gdb) -- Clover White

Re: [HACKERS] why was the VAR 'optind' never changed in initdb?

2012-04-09 Thread Clover White
2012/4/9 Andrew Dunstan and...@dunslane.net On 04/09/2012 07:38 AM, Clover White wrote: Hi, I'm debugging initdb using gdb. I found that I could not step in the function getopt_long in line 2572 in initdb.c. I also found that the value of VAR optind never be changed. VAR optind

Re: [HACKERS] why was the VAR 'optind' never changed in initdb?

2012-04-09 Thread Clover White
2012/4/9 Robert Haas robertmh...@gmail.com On Mon, Apr 9, 2012 at 7:38 AM, Clover White mywhiteclo...@gmail.com wrote: Hi, I'm debugging initdb using gdb. I found that I could not step in the function getopt_long in line 2572 in initdb.c. I also found that the value of VAR

[HACKERS] Is there any way to disable compiler optimization and enable debug?

2012-04-08 Thread clover white
HI, I would like to debug PG because I have a problem when I run initdb, and I have question about the configure file. when I used the command below to config PG, it was only built with debugging symbols (-g) and O2 compiler optimization which would lead to execute order not match the source