From 2ae357a4fffd81763e24a0c10dc3736ed8d387dd Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 19 Jun 2025 16:23:33 -0400 Subject: Make StackRenderLayer not wait for IL generation --- plugins/stack_render_layer/plugin.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'plugins/stack_render_layer/plugin.cpp') diff --git a/plugins/stack_render_layer/plugin.cpp b/plugins/stack_render_layer/plugin.cpp index 24420ceb..5408118a 100644 --- a/plugins/stack_render_layer/plugin.cpp +++ b/plugins/stack_render_layer/plugin.cpp @@ -40,17 +40,22 @@ public: continue; } - // Grab stack offset value from function - auto stackOffset = block->GetFunction()->GetRegisterValueAtInstruction( - block->GetArchitecture(), - line.addr, - block->GetArchitecture()->GetStackPointerRegister() - ); - auto stackOffsetAfter = block->GetFunction()->GetRegisterValueAfterInstruction( - block->GetArchitecture(), - line.addr, - block->GetArchitecture()->GetStackPointerRegister() - ); + RegisterValue stackOffset; + RegisterValue stackOffsetAfter; + if (block->GetFunction()->GetMediumLevelILIfAvailable()) + { + // Grab stack offset value from function + stackOffset = block->GetFunction()->GetRegisterValueAtInstruction( + block->GetArchitecture(), + line.addr, + block->GetArchitecture()->GetStackPointerRegister() + ); + stackOffsetAfter = block->GetFunction()->GetRegisterValueAfterInstruction( + block->GetArchitecture(), + line.addr, + block->GetArchitecture()->GetStackPointerRegister() + ); + } if (stackOffset.state == StackFrameOffset) { // Stack pointer is resolved to an offset: show the offset -- cgit v1.3.1