On Mon, Dec 18, 2006 at 11:35:44AM +0000, Gregory Stark wrote: > Are there any tricks people have for debugging bootstrapping processing? I > just need to know what index it's trying to build here and that should be > enough to point me in the right direction:
Here's what I did: you can step over functions in initdb until it fails (although I alredy know which part it's failing I guess). Restart. Then you go into that function and step until the new backend has been started. At this point you attach another gdb to the backend and let it run. Some steps create multiple backends, a printf() statement sometime help determining where to stop. If the backend process segfaults, the easiest is to enable core dumps, then you can run gdb on the left-overs, so to speak. If you get an error, you put a breakpoint on errfinish(). Note, that gets called even on messages you don't normally see, so you may have to skip a couple to get the real message. Have a nice day, -- Martijn van Oosterhout <firstname.lastname@example.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate.
Description: Digital signature