httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "'Justin Erenkrantz'" <jerenkra...@ebuilt.com>
Subject Re: how to debug worker mpm httpd with gdb?
Date Tue, 12 Mar 2002 23:49:31 GMT
On Tue, Mar 12, 2002 at 03:14:52PM -0800, Ryan Bloom wrote:
> Okay, but creating two threads won't solve the problem, and it may
> actually hinder people from using -X to debug thread related problems.
> The hardest part of debugging threaded code, is that the threads
> interact.  By artificially limiting the number of threads, you are
> effectively removing the ability to debug thread interaction problems.

Correct which is the argument made why the MPM is doing the right
thing now.

My take is that there are two potential "debuggers" types - our
module writers and our MPM/thread experts.  I'd prefer we default
to a mode that is beneficial to the module writers (one worker
thread only), and add another mode (say -DTHREAD_DEBUG - name sucks)
which allows the worker MPM to create its normal amount of threads
even though it is only using ONE_PROCESS.  I think there will be
far more people attempting to debug their modules than our MPM.

> Also, on a platform like Linux, reducing to two threads really doesn't
> help anything, because the debuggers suck at dealing with threads.

Recent gdbs are much better at threads in Linux.

> What you really want is a good debugger, which will allow you to set a
> breakpoint, and the debugger will switch to the right thread when the
> breakpoint is hit.

Well, yeah, I'd like a nice debugger too.  I'm a poor college
student, so I don't see that happening anytime soon unless gdb
gets an infusion of support.  =)  -- justin


Mime
View raw message