Bug 846018 - Add a pregion command to .gdbinit. r=BenWa

--HG--
extra : rebase_source : 000e708c5500aec55fb4ea6bbff37dede09e9807
This commit is contained in:
Jeff Muizelaar 2013-02-27 14:16:00 -05:00
parent ab64d9f1f6
commit 556c9de769

View File

@ -172,6 +172,20 @@ document ptarray
ptarray a 1 2 - Prints elements in range [idx1..idx2] from tarray
end
# define a "pregion" command to print a region in the same format as ToString()
def pregion
set $r = $arg0.mImpl.mRectListHead.next
printf "["
while ($r != &$arg0.mImpl.mRectListHead)
if ($r != $arg0.mImpl.mRectListHead.next)
printf "; "
end
printf "%d,%d,%d,%d", $r->x, $r->y, $r->x + $r->width, $r->y + $r->height
set $r = $r->next
end
printf "]\n"
end
def js
call DumpJSStack()
end