Fix some issues with new root canvas stuff
This commit is contained in:
@@ -16,26 +16,32 @@ _FUObjectItemType = None
|
||||
_GNameBlocksDebug = None
|
||||
_GObjectArrayForDebugVisualizers = None
|
||||
|
||||
def _init_globals(target):
|
||||
def _init_globals(frame, bp_loc, dict):
|
||||
global _FNameEntryType, _FNameEntryStride, _FUObjectItemType
|
||||
global _GNameBlocksDebug, _GObjectArrayForDebugVisualizers
|
||||
|
||||
_FNameEntryType = target.FindFirstType('FNameEntry')
|
||||
if not _FNameEntryType.IsValid():
|
||||
print('UEDataFormatter: FNameEntry type not found')
|
||||
_FNameEntryStride = _FNameEntryType.GetByteAlign()
|
||||
target = frame.GetThread().GetProcess().GetTarget()
|
||||
|
||||
_FUObjectItemType = target.FindFirstType('FUObjectItem')
|
||||
if not _FUObjectItemType.IsValid():
|
||||
print('UEDataFormatter: FUObjectItem type not found')
|
||||
if _FNameEntryType is None:
|
||||
t = target.FindFirstType('FNameEntry')
|
||||
if t.IsValid():
|
||||
_FNameEntryType = t
|
||||
_FNameEntryStride = t.GetByteAlign()
|
||||
|
||||
_GNameBlocksDebug = target.FindFirstGlobalVariable('GNameBlocksDebug')
|
||||
if not _GNameBlocksDebug.IsValid():
|
||||
print('UEDataFormatter: GNameBlocksDebug not found')
|
||||
|
||||
_GObjectArrayForDebugVisualizers = target.FindFirstGlobalVariable('GObjectArrayForDebugVisualizers')
|
||||
if not _GObjectArrayForDebugVisualizers.IsValid():
|
||||
print('UEDataFormatter: GObjectArrayForDebugVisualizers not found')
|
||||
if _FUObjectItemType is None:
|
||||
t = target.FindFirstType('FUObjectItem')
|
||||
if t.IsValid():
|
||||
_FUObjectItemType = t
|
||||
|
||||
if _GNameBlocksDebug is None:
|
||||
v = target.FindFirstGlobalVariable('GNameBlocksDebug')
|
||||
if v.IsValid():
|
||||
_GNameBlocksDebug = v
|
||||
|
||||
if _GObjectArrayForDebugVisualizers is None:
|
||||
v = target.FindFirstGlobalVariable('GObjectArrayForDebugVisualizers')
|
||||
if v.IsValid():
|
||||
_GObjectArrayForDebugVisualizers = v
|
||||
|
||||
|
||||
############################################################
|
||||
@@ -677,8 +683,11 @@ def _register_provider(cat, pattern, summary_fn=None, synth_cls=None):
|
||||
|
||||
def __lldb_init_module(debugger, dict):
|
||||
print("Running lldb_init_module")
|
||||
_init_globals(debugger.GetSelectedTarget())
|
||||
debugger.HandleCommand('target stop-hook add --python-function ' + __name__ + '._init_globals')
|
||||
debugger.HandleCommand('type category delete ' + __name__)
|
||||
frame = debugger.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame()
|
||||
if frame.IsValid():
|
||||
_init_globals(frame, None, {})
|
||||
cat = debugger.CreateCategory(__name__)
|
||||
|
||||
_register_provider(cat, '^FString$', summary_fn='UEFStringSummaryProvider')
|
||||
|
||||
Reference in New Issue
Block a user