1 # .gdbinit file for debugging Mozilla
3 # Don't stop for the SIG32/33/etc signals that Flash produces
4 handle SIG32 noprint nostop pass
5 handle SIG33 noprint nostop pass
6 handle SIGPIPE noprint nostop pass
8 # Show the concrete types behind nsIFoo
11 # run when using the auto-solib-add trick
19 # run -mail, when using the auto-solib-add trick
27 # Define a "pu" command to display PRUnichar * strings (100 chars max)
28 # Also allows an optional argument for how many chars to print as long as
40 # scratch array with space for 100 chars plus null terminator. Make
41 # sure to not use ' ' as the char so this copy/pastes well.
42 set $scratch = "____________________________________________________________________________________________________"
45 while (*$uni && $i++ < $limit)
47 set $scratch[$scratch_idx++] = *(char*)$uni++
50 set $scratch[$scratch_idx] = '\0'
54 print /x *(short*)$uni++
58 set $scratch[$scratch_idx] = '\0'
63 # Define a "ps" command to display subclasses of nsAC?String. Note that
64 # this assumes strings as of Gecko 1.9 (well, and probably a few
65 # releases before that as well); going back far enough will get you
66 # to string classes that this function doesn't work for.
69 if (sizeof(*$str.mData) == 1 && ($str.mFlags & 1) != 0)
72 pu $str.mData $str.mLength
76 # Define a "pa" command to display the string value for an nsIAtom
79 if (sizeof(*((&*$atom)->mString)) == 2)
84 # define a "pxul" command to display the type of a XUL element from
85 # an nsXULDocument* pointer.
88 print $p->mNodeInfo.mRawPtr->mInner.mName->mStaticAtom->mString
91 # define a "prefcnt" command to display the refcount of an XPCOM obj
94 print ((nsPurpleBufferEntry*)$p->mRefCnt.mTagged)->mRefCnt
97 # define a "ptag" command to display the tag name of a content node
100 pa $p->mNodeInfo.mRawPtr->mInner.mName
110 set $size = $arg0.mHdr->mLength
111 set $capacity = $arg0.mHdr->mCapacity
112 set $size_max = $size - 1
113 set $elts = $arg0.Elements()
118 printf "elem[%u]: ", $i
125 if $idx < 0 || $idx > $size_max
126 printf "idx1, idx2 are not in acceptable range: [0..%u].\n", $size_max
128 printf "elem[%u]: ", $idx
133 set $start_idx = $arg1
134 set $stop_idx = $arg2
135 if $start_idx > $stop_idx
136 set $tmp_idx = $start_idx
137 set $start_idx = $stop_idx
138 set $stop_idx = $tmp_idx
140 if $start_idx < 0 || $stop_idx < 0 || $start_idx > $size_max || $stop_idx > $size_max
141 printf "idx1, idx2 are not in acceptable range: [0..%u].\n", $size_max
144 while $i <= $stop_idx
145 printf "elem[%u]: ", $i
152 printf "nsTArray length = %u\n", $size
153 printf "nsTArray capacity = %u\n", $capacity
160 Prints nsTArray information.
162 Note: idx, idx1 and idx2 must be in acceptable range [0...size()-1].
164 ptarray a - Prints tarray content, size, capacity and T typedef
165 ptarray a 0 - Prints element[idx] from tarray
166 ptarray a 1 2 - Prints elements in range [idx1..idx2] from tarray
174 call nsFrame::DumpFrameTree($arg0)