You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by robert rottermann <ro...@redcor.ch> on 2009/03/06 10:37:34 UTC

[users@httpd] how to debug a module?

Hi there,

please forgive me if this sounds stupid..

There is an apache modul I do not unterstand
therefore I would like to load it in a debugger, so that I can step trough it at
runtime.
in a former life (which lasted up to 2000) i used to be proficient with c. but
this is long ago and on windows, now I am using linux. furthermore I am spoiled
using python. therefore I have all but forgotten how "real" programmers work.

now could anybody give me hints or pointers to tutorials on how to develop/debug
apache modules under linux?

thanks
robert

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to debug a module?

Posted by anson ho <ho...@gmail.com>.
I use fprintf(stderr,"a debug message"); It is stupid but it works in all
platforms.


On Fri, Mar 6, 2009 at 5:37 PM, robert rottermann <ro...@redcor.ch> wrote:

> Hi there,
>
> please forgive me if this sounds stupid..
>
> There is an apache modul I do not unterstand
> therefore I would like to load it in a debugger, so that I can step trough
> it at
> runtime.
> in a former life (which lasted up to 2000) i used to be proficient with c.
> but
> this is long ago and on windows, now I am using linux. furthermore I am
> spoiled
> using python. therefore I have all but forgotten how "real" programmers
> work.
>
> now could anybody give me hints or pointers to tutorials on how to
> develop/debug
> apache modules under linux?
>
> thanks
> robert
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] how to debug a module?

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
robert rottermann wrote:
> 
> now could anybody give me hints or pointers to tutorials on how to develop/debug
> apache modules under linux?

You probably want to become familiar with gdb.

In the case of httpd, you want to learn the -X flag to avoid
forking off the child processes (run only one which you can
single step).  Or become adept with breakpoints against the
forked and multithreaded code :)

And read http://httpd.apache.org/dev/debugging.html

Best of luck,

Bill


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org