On Mon, Aug 06, 2007 at 10:43:21PM -0700, J.C. Roberts wrote:
> I'm looking for all the needed steps to get firefox debug running in
> gdb. It's my first attempt at this and I've failed to the correct find
> the mozilla docs (assuming they exist) or details in the misc@, ports@
> or tech@ archives.
> 
> >From what I've learned, you're supposed to use the following switches
> with the /usr/bin/firefox shell script.
> 
>   $ firefox -g
> 
> You can be more explicit by naming the binary and the debugger.
> 
>   $ firefox -g /usr/local/mozilla-firefox/firefox-bin -d gdb
> 
> The two are equivalent.
> 
> Once inside gdb, I know you need to handle some signals. I've tried all
> combinations of the following signals and handling (nostop etc) without
> any luck:
> 
>   (gdb) handle SIG32 nostop noprint pass
>   (gdb) handle SIG33 nostop noprint pass
>   (gdb) handle SIGPIPE nostop noprint pass
> 
> 
> The problem I'm having is the gdb session just stops, without error, and
> firefox never actually loads. It never stops in the same place twice
> but it always stops.
> example
>   (gdb) run
>   <lots of output from debug flavor>
>   Reading in symbols for nsCSSStyleRule.cpp...done.
>   Reading in symbols for nsJARURI.cpp...done.
>   Reading in symbols for nsReadableUtils.cpp...done.
>   Reading in symbols for nsCSSScanner.cpp...done.
>   Reading in symbols for nsCSSParser.cpp...done.
>   ++DOMWINDOW == 2
>   Reading in symbols for jsscope.c...done.
>   Reading in symbols for /usr/src/lib/libc/string/strdup.c...done.
>   Reading in symbols for nsTraceRefcntImpl.cpp...done.
>   Reading in symbols for nsXMLDocument.cpp...done.
> 
> It just sits there like gdb has hit an invisible limit and is waiting
> for something, and yes, it's sitting in the wait state.
> (from top)
> 25200 jcr  10    0  272M  270M idle     wait     0:32  0.00% gdb
> 16656 jcr  31    0 7344K   25M stop/0   -        0:03  0.00% firefox-bin
> 
> Reluctantly, I've tried kicking the kern.maxfiles sysctl up as high as
> 20,000 but that's not the issue (I normally run the default).

Just guessing from my previous pleasant experience of debuging firefox:
increase ulimit -> data to ~ 2GB
add swap until you have a total of ~2GB
I remember something like gdb alone eating 900MB.

Tobias

> [...]

Reply via email to