On Jan 9, 2008, at 5:16 PM, William A. Rowe, Jr. wrote:
Hi... I'm back to work on mod_atom and chasing a weird bug around.
Anyhow I totally can't figure out what some apr code is doing so I
wanted to step into it with the debugger. This sounds lame, but I
can't figure out how to build an httpd that has APR linked with
debug information.
What are the approved incantations to make an httpd with some
control over the -O and -g options?
It helps if you remember apr's CFLAGS are trusted by apr-util, httpd
etc, but you need to re - ./configure after rebuilding apr to utilize
this trick.
So... something like this?
> rm -rf /usr/local/apr/*
> cd srclib/apr
> "CFLAGS=-g" ./configure
> make
> make install
> cd ../..
> "CFLAGS=-g" ./configure
> make
> make install
I *think* I did that. If you tell me you think something like that
should work, I'll try again.
At the moment, the symptom is:
/usr/local/apache2/ 1092> gdb bin/httpd
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49
UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for
shared libraries ........ done
(gdb) b main
Breakpoint 1 at 0xa021: file main.c, line 440.
(gdb) b apr_global_mutex_create
Breakpoint 2 at 0xa45e
AAAARGH.