[Lldb-commits] [lldb] r126235 - /lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
Greg Clayton
gclayton at apple.com
Tue Feb 22 11:32:07 PST 2011
Author: gclayton
Date: Tue Feb 22 13:32:07 2011
New Revision: 126235
URL: http://llvm.org/viewvc/llvm-project?rev=126235&view=rev
Log:
Remove an assertion that was causing a crash.
Modified:
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=126235&r1=126234&r2=126235&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Tue Feb 22 13:32:07 2011
@@ -113,8 +113,18 @@
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
More information about the lldb-commits
mailing list