Bug 846018 - Add a pregion command to .gdbinit. r=BenWa
☠☠ backed out by a697e3ca8fb8 ☠ ☠
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 27 Feb 2013 14:16:00 -0500
changeset 215640 047d21f101de0d49a9784ccff6a51cafdb8f8b53
parent 215639 a8a987028757ee3feae3b5ef2c74b59662aa416b
child 215641 8be2344dcff3f1ad25f5343c35114548d46d06cc
push id51807
push userryanvm@gmail.com
push dateThu, 13 Nov 2014 22:07:50 +0000
treeherdermozilla-inbound@8be2344dcff3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBenWa
bugs846018
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 846018 - Add a pregion command to .gdbinit. r=BenWa
.gdbinit
--- a/.gdbinit
+++ b/.gdbinit
@@ -167,15 +167,29 @@ document ptarray
         Syntax: ptarray   
         Note: idx, idx1 and idx2 must be in acceptable range [0...size()-1].
         Examples:
         ptarray a - Prints tarray content, size, capacity and T typedef
         ptarray a 0 - Prints element[idx] from tarray
         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
 
 def ft
   call $arg0->DumpFrameTree()
 end