Unreviewed; fix lldb synthetic representation of WTF::Vector after r148891.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 May 2013 17:26:54 +0000 (17:26 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 May 2013 17:26:54 +0000 (17:26 +0000)
* lldb/lldb_webkit.py:
(WTFVectorProvider.num_children):
(WTFVectorProvider.get_child_index):
(WTFVectorProvider.get_child_at_index):
(WTFVectorProvider.update):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150455 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/lldb/lldb_webkit.py

index 5cb209d..71bb11f 100644 (file)
@@ -1,3 +1,13 @@
+2013-05-21  Jer Noble  <jer.noble@apple.com>
+
+        Unreviewed; fix lldb synthetic representation of WTF::Vector after r148891.
+
+        * lldb/lldb_webkit.py:
+        (WTFVectorProvider.num_children):
+        (WTFVectorProvider.get_child_index):
+        (WTFVectorProvider.get_child_at_index):
+        (WTFVectorProvider.update):
+
 2013-05-21  Jessie Berlin  <jberlin@apple.com>
 
         Expose a way to know when forms are added to a page or when form controls are added to a form
index 4adc438..aac3da6 100644 (file)
@@ -165,13 +165,15 @@ class WTFVectorProvider:
         self.update()
 
     def num_children(self):
-        return self.size + 2
+        return self.size + 3
 
     def get_child_index(self, name):
         if name == "m_size":
             return self.size
-        elif name == "m_buffer":
+        elif name == "m_capacity":
             return self.size + 1
+        elif name == "m_buffer":
+            return self.size + 2
         else:
             return int(name.lstrip('[').rstrip(']'))
 
@@ -179,7 +181,9 @@ class WTFVectorProvider:
         if index == self.size:
             return self.valobj.GetChildMemberWithName("m_size")
         elif index == self.size + 1:
-            return self.vector_buffer
+            return self.valobj.GetChildMemberWithName("m_capacity")
+        elif index == self.size + 2:
+            return self.buffer
         elif index < self.size:
             offset = index * self.data_size
             child = self.buffer.CreateChildAtOffset('[' + str(index) + ']', offset, self.data_type)
@@ -188,10 +192,9 @@ class WTFVectorProvider:
             return None
 
     def update(self):
-        self.vector_buffer = self.valobj.GetChildMemberWithName('m_buffer')
-        self.buffer = self.vector_buffer.GetChildMemberWithName('m_buffer')
+        self.buffer = self.valobj.GetChildMemberWithName('m_buffer')
         self.size = self.valobj.GetChildMemberWithName('m_size').GetValueAsUnsigned(0)
-        self.capacity = self.vector_buffer.GetChildMemberWithName('m_capacity').GetValueAsUnsigned(0)
+        self.capacity = self.buffer.GetChildMemberWithName('m_capacity').GetValueAsUnsigned(0)
         self.data_type = self.buffer.GetType().GetPointeeType()
         self.data_size = self.data_type.GetByteSize()