Skip to content

Commit

Permalink
Meta: Remove gdb pretty printer for AK::InlineLinkedList
Browse files Browse the repository at this point in the history
  • Loading branch information
bgianfo authored and awesomekling committed Jun 16, 2021
1 parent 6c114ec commit f0fbaa0
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions Meta/serenity_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ def handler_class_for_type(type, re=re.compile('^([^<]+)(<.*>)?$')):
return AKAtomic
elif klass == 'AK::DistinctNumeric':
return AKDistinctNumeric
elif klass == 'AK::InlineLinkedList':
return AKInlineLinkedList
elif klass == 'AK::HashMap':
return AKHashMapPrettyPrinter
elif klass == 'AK::RefCounted':
Expand Down Expand Up @@ -320,30 +318,6 @@ def prettyprint_type(cls, type):
return f'AK::SinglyLinkedList<{handler_class_for_type(template_type).prettyprint_type(template_type)}>'


class AKInlineLinkedList:
def __init__(self, val):
self.val = val

def to_string(self):
return AKInlineLinkedList.prettyprint_type(self.val.type)

def children(self):
node_type_ptr = self.val.type.template_argument(0).pointer()

elements = []
node = self.val["m_head"]
while node != 0:
elements.append(node.cast(node_type_ptr))
node = node["m_next"]

return [(f"[{i}]", elements[i].dereference()) for i in range(len(elements))]

@classmethod
def prettyprint_type(cls, type):
template_type = type.template_argument(0)
return f'AK::InlineLinkedList<{handler_class_for_type(template_type).prettyprint_type(template_type)}>'


class VirtualAddress:
def __init__(self, val):
self.val = val
Expand Down

0 comments on commit f0fbaa0

Please sign in to comment.