Remote TextPass, merged with UIPass

This commit is contained in:
Dynamitos committed 2026-10-20 22:01:51 +02:00
1 parent 332c47fc9d
commit 17dc1e4d88
11 files changed
+191 -179

No files matched your search

+132
View File
@@ -64,6 +64,130 @@ class ListSyntheticProvider:
def has_children(self):
return True
def Tree_SummaryProvider(valobj, internal_dict):
size = valobj.GetChildMemberWithName('_size').GetValueAsUnsigned(0)
return f"Tree(size={size})"
class TreeSyntheticProvider:
def __init__(self, valobj, internal_dict):
self.valobj = valobj
self.update()
def num_children(self):
return self.size
def get_child_index(self, name):
try:
return int(name.lstrip('[').rstrip(']'))
except:
return -1
def get_child_at_index(self, index):
if index < 0 or index >= self.size:
return None
# Collect all nodes via in-order traversal, then return the one at `index`
nodes = []
self._collect(self.root, nodes)
if index >= len(nodes):
return None
return nodes[index].GetChildMemberWithName('data')
def _collect(self, node, out):
if not node.IsValid():
return
self._collect(node.GetChildMemberWithName('leftChild'), out)
out.append(node)
self._collect(node.GetChildMemberWithName('rightChild'), out)
def update(self):
self.root = self.valobj.GetChildMemberWithName('root')
self.size = self.valobj.GetChildMemberWithName('_size').GetValueAsUnsigned(0)
def has_children(self):
return True
def Set_SummaryProvider(valobj, internal_dict):
size = valobj.GetChildMemberWithName('_size').GetValueAsUnsigned(0)
return f"Set(size={size})"
class SetSyntheticProvider:
def __init__(self, valobj, internal_dict):
self.valobj = valobj
self.update()
def num_children(self):
return self.size
def get_child_index(self, name):
try:
return int(name.lstrip('[').rstrip(']'))
except:
return -1
def get_child_at_index(self, index):
if index < 0 or index >= self.size:
return None
nodes = []
self._collect(self.root, nodes)
if index >= len(nodes):
return None
return nodes[index].GetChildMemberWithName('data')
def _collect(self, node, out):
if not node.IsValid():
return
self._collect(node.GetChildMemberWithName('leftChild'), out)
out.append(node)
self._collect(node.GetChildMemberWithName('rightChild'), out)
def update(self):
self.root = self.valobj.GetChildMemberWithName('root')
self.size = self.valobj.GetChildMemberWithName('_size').GetValueAsUnsigned(0)
def has_children(self):
return True
def Map_SummaryProvider(valobj, internal_dict):
size = valobj.GetChildMemberWithName('_size').GetValueAsUnsigned(0)
return f"Map(size={size})"
class MapSyntheticProvider:
def __init__(self, valobj, internal_dict):
self.valobj = valobj
self.update()
def num_children(self):
return self.size
def get_child_index(self, name):
try:
return int(name.lstrip('[').rstrip(']'))
except:
return -1
def get_child_at_index(self, index):
if index < 0 or index >= self.size:
return None
nodes = []
self._collect(self.root, nodes)
if index >= len(nodes):
return None
return nodes[index].GetChildMemberWithName('data')
def _collect(self, node, out):
if not node.IsValid():
return
self._collect(node.GetChildMemberWithName('leftChild'), out)
out.append(node)
self._collect(node.GetChildMemberWithName('rightChild'), out)
def update(self):
self.root = self.valobj.GetChildMemberWithName('root')
self.size = self.valobj.GetChildMemberWithName('_size').GetValueAsUnsigned(0)
def has_children(self):
return True
def Vector_SummaryProvider(valobj, internal_dict):
# Get the template parameters to determine vector length
type_name = valobj.GetTypeName()
@@ -93,6 +217,14 @@ def __lldb_init_module(debugger, internal_dict):
debugger.HandleCommand('type summary add -F Seele_lldb.List_SummaryProvider -x "^Seele::List<.*>$"')
debugger.HandleCommand('type synthetic add -l Seele_lldb.ListSyntheticProvider -x "^Seele::List<.*>$"')
# Register Set formatter
debugger.HandleCommand('type summary add -F Seele_lldb.Set_SummaryProvider -x "^Seele::Set<.*>$"')
debugger.HandleCommand('type synthetic add -l Seele_lldb.SetSyntheticProvider -x "^Seele::Set<.*>$"')
# Register Map formatter
debugger.HandleCommand('type summary add -F Seele_lldb.Map_SummaryProvider -x "^Seele::Map<.*>$"')
debugger.HandleCommand('type synthetic add -l Seele_lldb.MapSyntheticProvider -x "^Seele::Map<.*>$"')
# Register Vector formatter
debugger.HandleCommand('type summary add -F Seele_lldb.Vector_SummaryProvider -x "^glm::(detail::)?t?vec[234]?<.*>$"')