Re: Regarding apache server debugging source code

2013-05-21 Thread William A. Rowe Jr.
On Tue, 14 May 2013 15:55:55 +0530
kalyan sita kalyansit...@gmail.com wrote:

 Hi William,
  Your reply helped me . I launched httpd -X and used gdb processID of
 httpd -X and the debugger went into child_main function of prefork.c
 and it is remaining in while loop in the same function. What I would
 want is to see what module is getting invoked when a php script is
 run? What module is invoked when perl script is run ? I want to debug
 other core modules of apache like http_protocol.c , http_request.c ,
 http_main.c.

That isn't a dev@ list question at all; it would entirely depend how
you have configured your server (mod_cgi? cgid? fcgid? mod_perl?) and
the users@ list would be a better place to help you understand how you
have configured your server.

 What is the best way of debugging the above modules?

Determine which module you are running, or you can set a breakpoint
in the ap_process_request_internal() and ap_process_request() code 
to discover which handler accepts the request.


Re: Regarding apache server debugging source code

2013-05-14 Thread kalyan sita
Hi William,
 Your reply helped me . I launched httpd -X and used gdb processID of
httpd -X and the debugger went into child_main function of prefork.c and
it is remaining in while loop in the same function. What I would want is to
see what module is getting invoked when a php script is run? What module is
invoked when perl script is run ? I want to debug other core modules of
apache like http_protocol.c , http_request.c , http_main.c.

What is the best way of debugging the above modules?

Thanks,
Kalyan


On Sat, May 11, 2013 at 9:04 AM, William A. Rowe Jr. wr...@rowe-clan.netwrote:

 On Thu, 9 May 2013 14:08:45 +0530
 kalyan sita kalyansit...@gmail.com wrote:

  I am trying to attach the eclipse debugger to find how different
  modules of apache source code are invoked.
  But I could only debug httpd binary and others present in bin
  directory. What I want is what exactly happens when a php script is
  deployed in apache server
  How are different apache handler modules called.
  I want to debug them.

 Firstly, launching httpd with -X (no forking, no detaching) makes any
 debugging project much easier.

 Secondly, debuggers allow you to pre-load dynamically loaded shared
 object modules.  Your other two alternatives, are to set a delayed
 breakpoint on a soon-to-be-loaded module, or finally you can simply
 set a breakpoint in the mainline code after the config file (and
 therefore, loadable modules) are processed.



Re: Regarding apache server debugging source code

2013-05-10 Thread William A. Rowe Jr.
On Thu, 9 May 2013 14:08:45 +0530
kalyan sita kalyansit...@gmail.com wrote:

 I am trying to attach the eclipse debugger to find how different
 modules of apache source code are invoked.
 But I could only debug httpd binary and others present in bin
 directory. What I want is what exactly happens when a php script is
 deployed in apache server
 How are different apache handler modules called.
 I want to debug them.

Firstly, launching httpd with -X (no forking, no detaching) makes any
debugging project much easier.

Secondly, debuggers allow you to pre-load dynamically loaded shared
object modules.  Your other two alternatives, are to set a delayed
breakpoint on a soon-to-be-loaded module, or finally you can simply
set a breakpoint in the mainline code after the config file (and
therefore, loadable modules) are processed.


Regarding apache server debugging source code

2013-05-09 Thread kalyan sita
I am trying to attach the eclipse debugger to find how different modules of
apache source code are invoked.
But I could only debug httpd binary and others present in bin directory.
What I want is what exactly happens when a php script is deployed in apache
server
How are different apache handler modules called.
I want to debug them.

Can you please help

Thanks,
Kalyan