[wplug] C compiling question
James O'Kane
jo2y at midnightlinux.com
Tue Oct 1 21:56:24 EDT 2002
On Tue, 1 Oct 2002 bpmedley at 4321.tv wrote:
> I personally don't know why the original wouldn't work. Assuming that
> r->handler is a char *, then it should get address of
> throttle_remote_user_str. This would make the == comparison true. How do
> you load this module and use gdb on it?
If someone knows a better way let me know.
1. Compile apache and this module with -g
2. start apache
3. In the apache source directory, start gdb -p <pid of _child_ apache process>
4. At the gdb prompt type: directory <source of mod_throttle>
5. Add breakpoint: break mod_throttle.c:general_html_header
6. Continue running apache: c
7. Load the page in question(*) in apache until gdb hits the breakpoint.
(This might take a bit depending on how many children apache currently
has.)
8. Inspect at will.
(*) Here is the relevent apache config I'm using, the page you want to
test is http://example.com/throttle-users
ThrottlePolicy Volume 5M 1D
ThrottleRemoteUser 100 Volume 1M 1h
ThrottleClientIP 100 Volume 1M 1h
<Location /throttle-status>
SetHandler throttle-me
</Location>
<Location /throttle-users>
SetHandler throttle-remote-user
</Location>
-james
More information about the wplug
mailing list