httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Eibner <tho...@stderr.net>
Subject Re: Debugging help, please?
Date Wed, 02 Jan 2002 22:16:42 GMT
On Wed, Jan 02, 2002 at 02:07:24PM -0800, Bruce Korb wrote:
> 
> Hi,
> 
> I'm trying to figure out how to use GDB or any debugger from within
> a cgi program started by Apache under Linux.  I tried the obvious:
> 
>   #! /bin/sh
>   DISPLAY=:0.0 xterm -e gdb /path/to/bin/exe
> 
> to no avail, so I was hoping for a hint here  :-).
> The more simplistic approach of cloning the environment in a shell
> script does not evidence the problem.  It only seems to be
> reproducible on Linux under Apache.  (It works correctly on other
> platforms or using different execution environments on Linux.)
> If this is a known problem with known workarounds or fixes,
> that would be even better than trying to use gdb  :-D

Try recompiling Apache with CFLAGS=-g and then start it in single
child mode in gdb:

$ gdb /path/to/bin/httpd
(gdb) run -X

.. does it help?

-- 
  Thomas Eibner <http://thomas.eibner.dk/> DnsZone <http://dnszone.org/>
  mod_pointer <http://stderr.net/mod_pointer> 


Mime
View raw message