diff options
Diffstat (limited to 'plugins/stack_render_layer/plugin.cpp')
| -rw-r--r-- | plugins/stack_render_layer/plugin.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
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 |
