diff options
author | Greg Clayton <gclayton@apple.com> | 2011-02-22 19:32:07 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-02-22 19:32:07 +0000 |
commit | 681254c83055e48ed096d10e55acedfc773d0225 (patch) | |
tree | 64ea130ed88de18ef445046759af19482f91db09 /lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp | |
parent | aebcfc86df5afe9c0413439c03c2c4a9d192915d (diff) | |
download | bcm5719-llvm-681254c83055e48ed096d10e55acedfc773d0225.tar.gz bcm5719-llvm-681254c83055e48ed096d10e55acedfc773d0225.zip |
Remove an assertion that was causing a crash.
llvm-svn: 126235
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp index 621d7fc4ca3..0f3207b9cf3 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -113,8 +113,18 @@ RegisterContextLLDB::InitializeZerothFrame() if (addr_range.GetBaseAddress().IsValid()) { m_start_pc = addr_range.GetBaseAddress(); - assert (frame_sp->GetFrameCodeAddress().GetSection() == m_start_pc.GetSection()); - m_current_offset = frame_sp->GetFrameCodeAddress().GetOffset() - m_start_pc.GetOffset(); + if (frame_sp->GetFrameCodeAddress().GetSection() == m_start_pc.GetSection()) + { + m_current_offset = frame_sp->GetFrameCodeAddress().GetOffset() - m_start_pc.GetOffset(); + } + else if (frame_sp->GetFrameCodeAddress().GetModule() == m_start_pc.GetModule()) + { + // This means that whatever symbol we kicked up isn't really correct + // as no should cross section boundaries... We really should NULL out + // the function/symbol in this case unless there is a bad assumption + // here due to inlined functions? + m_current_offset = frame_sp->GetFrameCodeAddress().GetFileAddress() - m_start_pc.GetFileAddress(); + } m_current_offset_backed_up_one = m_current_offset; } else |