Got a lot of the kinks worked out in the inline support after debugging more
complex inlined examples.
StackFrame classes don't have a "GetPC" anymore, they have "GetFrameCodeAddress()".
This is because inlined frames will have a PC value that is the same as the
concrete frame that owns the inlined frame, yet the code locations for the
frame can be different. We also need to be able to get the real PC value for
a given frame so that variables evaluate correctly. To get the actual PC
value for a frame you can use:
addr_t pc = frame->GetRegisterContext()->GetPC();
Some issues with the StackFrame stomping on its own symbol context were
resolved which were causing the information to change for a frame when the
stack ID was calculated. Also the StackFrame will now correctly store the
symbol context resolve flags for any extra bits of information that were
looked up (if you ask for a block only and you find one, you will alwasy have
the compile unit and function).
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111964 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBFrame.cpp b/source/API/SBFrame.cpp
index 5330771..b2d591d 100644
--- a/source/API/SBFrame.cpp
+++ b/source/API/SBFrame.cpp
@@ -121,12 +121,11 @@
return UINT32_MAX;
}
-
lldb::addr_t
SBFrame::GetPC () const
{
if (m_opaque_sp)
- return m_opaque_sp->GetPC().GetLoadAddress (&m_opaque_sp->GetThread().GetProcess());
+ return m_opaque_sp->GetFrameCodeAddress().GetLoadAddress (&m_opaque_sp->GetThread().GetProcess());
return LLDB_INVALID_ADDRESS;
}
@@ -161,7 +160,7 @@
{
SBAddress sb_addr;
if (m_opaque_sp)
- sb_addr.SetAddress (&m_opaque_sp->GetPC());
+ sb_addr.SetAddress (&m_opaque_sp->GetFrameCodeAddress());
return sb_addr;
}