You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by josh rotenberg <jo...@parasite.com> on 2001/02/26 01:31:00 UTC

trivial addition to apachectl

hi,

i added a 'debug' target to apachectl for simplicity while debugging some
module stuff, just saves a couple keystrokes. thought people might find it
helpful. the diff to the 1.3.17 apachectl is attached.

basically, 'apachectl debug' starts httpd with -X, backgrounds the process,
and then runs gdb against httpd with the new pid.

josh

Re: trivial addition to apachectl

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Mon, Feb 26, 2001 at 02:49:14PM -0800, Doug MacEachern wrote:
> that doesn't work.  you'd need at least 2 steps:
> % gdb ./httpd
> (gdb) run -X
> 
> which will still be missing the -d/-f arguments, long path names that are
> a pain to remember/type.
> 
> +1 if 'debug' is changed to 'startgdb': apachectl startgdb
> then we can have startdbx or whatever else.
> 
> its a nice shortcut, i've put similar into various project makefiles in
> the past, would be nice to have it one place.

Okay. Sounds sensible. +1 too, with this change.

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany

Re: trivial addition to apachectl

Posted by rb...@covalent.net.
> > > +0
> >
> > It also seems a bit like overkill, why not just do gdb ./httpd -X?
>
> that doesn't work.  you'd need at least 2 steps:
> % gdb ./httpd
> (gdb) run -X
>
> which will still be missing the -d/-f arguments, long path names that are
> a pain to remember/type.

D'oh!  I knew I was missing something.  Thanks Doug.

> +1 if 'debug' is changed to 'startgdb': apachectl startgdb
> then we can have startdbx or whatever else.
>
> its a nice shortcut, i've put similar into various project makefiles in
> the past, would be nice to have it one place.

+0.5

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: trivial addition to apachectl

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 26 Feb 2001 rbb@covalent.net wrote:

> On Mon, 26 Feb 2001, Martin Kraemer wrote:
> 
> > On Sun, Feb 25, 2001 at 04:31:00PM -0800, josh rotenberg wrote:
> > > hi,
> > >
> > > i added a 'debug' target to apachectl for simplicity while debugging some
> > > module stuff, just saves a couple keystrokes. thought people might find it
> > > helpful. the diff to the 1.3.17 apachectl is attached.
> > >
> > > basically, 'apachectl debug' starts httpd with -X, backgrounds the process,
> > > and then runs gdb against httpd with the new pid.
> >
> > Nice idea, but very unix+gdb specific. IIRC, dbx, for example, has a different
> > syntax for attaching to a process. And what about non-unix (are they using
> > apachectl at all?)?

isn't all of apachectl unix specific?

> > +0
> 
> It also seems a bit like overkill, why not just do gdb ./httpd -X?

that doesn't work.  you'd need at least 2 steps:
% gdb ./httpd
(gdb) run -X

which will still be missing the -d/-f arguments, long path names that are
a pain to remember/type.

+1 if 'debug' is changed to 'startgdb': apachectl startgdb
then we can have startdbx or whatever else.

its a nice shortcut, i've put similar into various project makefiles in
the past, would be nice to have it one place.


Re: trivial addition to apachectl

Posted by rb...@covalent.net.
On Mon, 26 Feb 2001, Martin Kraemer wrote:

> On Sun, Feb 25, 2001 at 04:31:00PM -0800, josh rotenberg wrote:
> > hi,
> >
> > i added a 'debug' target to apachectl for simplicity while debugging some
> > module stuff, just saves a couple keystrokes. thought people might find it
> > helpful. the diff to the 1.3.17 apachectl is attached.
> >
> > basically, 'apachectl debug' starts httpd with -X, backgrounds the process,
> > and then runs gdb against httpd with the new pid.
>
> Nice idea, but very unix+gdb specific. IIRC, dbx, for example, has a different
> syntax for attaching to a process. And what about non-unix (are they using
> apachectl at all?)?
>
> +0

It also seems a bit like overkill, why not just do gdb ./httpd -X?

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: trivial addition to apachectl

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Sun, Feb 25, 2001 at 04:31:00PM -0800, josh rotenberg wrote:
> hi,
> 
> i added a 'debug' target to apachectl for simplicity while debugging some
> module stuff, just saves a couple keystrokes. thought people might find it
> helpful. the diff to the 1.3.17 apachectl is attached.
> 
> basically, 'apachectl debug' starts httpd with -X, backgrounds the process,
> and then runs gdb against httpd with the new pid.

Nice idea, but very unix+gdb specific. IIRC, dbx, for example, has a different
syntax for attaching to a process. And what about non-unix (are they using
apachectl at all?)?

+0

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany