Anyone have good .gdbinit for debugging Firefox

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Anyone have good .gdbinit for debugging Firefox

Aaron Leventhal-3
Anyone have any tips beyond what's here?
http://www.mozilla.org/unix/debugging_faq.html

I see that firefox -g launches firefox in the ddd debugger.

- Aaron
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Anyone have good .gdbinit for debugging Firefox

Aaron Leventhal-3
Here's the best .gdbinit I can find for Firefox so far. It would be good
to have functions for setting common breakpoints in the accessibility
module.

# .gdbinit file for debugging Mozilla

# DumpJSStack
# DumpJSValue

# Don't stop for the SIG32/33/etc crap
handle SIG32 noprint nostop pass
handle SIG33 noprint nostop pass

# run when using the auto-solib-add trick
def prun
         tbreak main
         run
         set auto-solib-add 0
         cont
end

# define "pu" command to display PRUnichar * strings (100 chars max)
def pu
   set $uni = $arg0
   set $i = 0
   while (*$uni && $i++<100)
     if (*$uni < 0x80)
       print *(char*)$uni++
     else
       print /x *(short*)$uni++
     end
   end
end

# define "ps" command to display
nsString/nsAutoString/nsCString/nsCAutoString
def ps
   set $ns = $arg0
   if ($ns->mCharSize)
     pu $ns->mUStr
   else
     print $ns->mStr
   end
end

def whats
    x/wa *(void**) $arg0
end

def jsstack
    call DumpJSStack()
end

def frametree
   set $r = ($arg0)->GetPresContext()->GetPresShell()->GetRootFrame()
   if ($r)
     call ((class nsIFrameDebug*)(class ViewportFrame*)$r)->List(stderr, 2)
   end
end

def frametree2
   set $r = ($arg0)->GetPresShell()->GetRootFrame()
   if ($r)
     call ((class nsIFrameDebug*)(class ViewportFrame*)$r)->List(stderr, 2)
   end
end
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility