Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 71999 invoked from network); 20 Feb 2007 13:47:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2007 13:47:20 -0000 Received: (qmail 50206 invoked by uid 500); 20 Feb 2007 13:47:27 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 50191 invoked by uid 500); 20 Feb 2007 13:47:27 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 50180 invoked by uid 99); 20 Feb 2007 13:47:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 05:47:27 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [66.77.29.165] (HELO secure.exclamationlabs.net) (66.77.29.165) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 05:47:15 -0800 Received: from [192.168.2.160] (c-69-141-1-101.hsd1.pa.comcast.net [69.141.1.101]) (authenticated (0 bits)) by secure.exclamationlabs.net (8.11.6/8.11.6) with ESMTP id l1KDkip22436; Tue, 20 Feb 2007 07:46:44 -0600 Message-ID: <45DAFBC3.7020505@modperlcookbook.org> Date: Tue, 20 Feb 2007 08:46:43 -0500 From: Geoffrey Young User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Fred Moyer CC: dev@perl.apache.org Subject: Re: Trying to get a backtrace while debugging stacked handlers bug References: <45DA3A31.6070806@taperfriendlymusic.org> In-Reply-To: <45DA3A31.6070806@taperfriendlymusic.org> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Fred Moyer wrote: > Hello, > > I've been hacking on this issue here - > http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=115827296213433&w=2 > > and am trying cause a core dump so I can look through the backtrace with > gdb and figure out what's going on. core dumps on purpose - excellent! have you tried gdb or ddd? A::T supports the most execellent -d option $ t/TEST -dddd -v t/apache/foo.t will launch ddd and stop at an automatic breakpoint just after the child process is spawned (iirc). there are also ways of setting your own breakpoints through -breakpoint= and even some fancy .file, but I forget what it's called. > I'm a bit new to this level of > debugging so please bear with my naivete (have had my copy of practical > mod_perl handy so that's been my guide but I still need a little help) > > To do this, I pushed a handler which should core dump, as so: > Debug::DumpCore::segv(); I've never used this before, so I have no idea :) > } > > but I'm not getting a core file. I've built mod_perl with MP_TRACE=1 > and MP_DEBUG=1, and set MP_PERL_TRACE=all, make sure you've also built with MP_MAINTAINER=1, for which I think you'll also need to have compiled httpd in maintainer mode. > but I haven't gotten the > granularity I desire when running the test with > ./t/TEST -VERBOSE t/hooks/stacked_handlers2.t. I get the call stack > down to the handler level, but I need to get a more fine grained view of > what functions are being called. I'm not very good with the debugger, but this might help you http://perl.apache.org/docs/2.0/devel/debug/c.html I prefer ddd over gdb for this kind of walkthrough, mostly because I don't know the gdb commands. but t/TEST -d will accept either gdb or ddd. > > Any advice welcome :) I know I'll figure it out eventually, but I'm > guessing that this stuff is old hat to everyone on this list. hardly. have fun :) --Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org