You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Donatas Abraitis <do...@gmail.com> on 2014/07/24 06:51:48 UTC

sequence of request

Hello guys,

is it possible to know the sequence of request is handled? I mean which
module takes precedence? Because I need to debug why r->filename becomes
not so as I expected.

Thank you!

-- 
Donatas

Re: sequence of request

Posted by Joshua Marantz <jm...@google.com>.
Yes, in particular, the gdb feature that can help determine who is changing
r->filename is hardware watchpoints:
http://sourceware.org/gdb/onlinedocs/gdb/Set-Watchpoints.html

1. Set a breakpoint at a line of code where you believe r->filename is
correct
2. Start up Apache with "run -X"
3. Issue a request to the server to hit the line of code where r->filename
is set.
4. Set up a hardware watchpoint with
      (gdb) p &r->filename
      $1 = (char**) 0x....
      (gdb) watch *$1
      Hardware Watchpoint 2

Depending on what you've done in the debugger beforehand, the "$1" may be
something like $3 or $4.  In that case use watch *$3, etc.

-Josh


On Thu, Jul 24, 2014 at 6:54 AM, Eric Covener <co...@gmail.com> wrote:

> On Thu, Jul 24, 2014 at 12:51 AM, Donatas Abraitis
> <do...@gmail.com> wrote:
> > Hello guys,
> >
> > is it possible to know the sequence of request is handled? I mean which
> > module takes precedence? Because I need to debug why r->filename becomes
> > not so as I expected.
>
> mod_info shows you the order the loaded modules will run in for
> various phases.  A debugger can also tell you when it changes.
>
> --
> Eric Covener
> covener@gmail.com
>

Re: sequence of request

Posted by Eric Covener <co...@gmail.com>.
On Thu, Jul 24, 2014 at 12:51 AM, Donatas Abraitis
<do...@gmail.com> wrote:
> Hello guys,
>
> is it possible to know the sequence of request is handled? I mean which
> module takes precedence? Because I need to debug why r->filename becomes
> not so as I expected.

mod_info shows you the order the loaded modules will run in for
various phases.  A debugger can also tell you when it changes.

-- 
Eric Covener
covener@gmail.com