mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 00:27:42 +00:00
Add LLDB type summary scripts
This commit is contained in:
34
lldb-extras/urde_lldb_tools.py
Normal file
34
lldb-extras/urde_lldb_tools.py
Normal file
@@ -0,0 +1,34 @@
|
||||
import lldb
|
||||
|
||||
class CMatrix3f_Provider:
|
||||
|
||||
def __init__(self, valobj, dict):
|
||||
self.valobj = valobj
|
||||
|
||||
def num_children(self):
|
||||
return 3
|
||||
|
||||
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:
|
||||
return None
|
||||
if index >= self.num_children():
|
||||
return None
|
||||
try:
|
||||
m = self.valobj.GetChildAtIndex(0).GetChildMemberWithName('vec')
|
||||
return m.GetChildAtIndex(index)
|
||||
except:
|
||||
return None
|
||||
|
||||
def has_children(self):
|
||||
return True
|
||||
|
||||
class CMatrix4f_Provider(CMatrix3f_Provider):
|
||||
|
||||
def num_children(self):
|
||||
return 4
|
||||
Reference in New Issue
Block a user