Moved the section load list up into the target so we can use the target
to symbolicate things without the need for a valid process subclass.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113895 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBAddress.cpp b/source/API/SBAddress.cpp
index 8b8294c..61e1ec1 100644
--- a/source/API/SBAddress.cpp
+++ b/source/API/SBAddress.cpp
@@ -85,10 +85,10 @@
}
lldb::addr_t
-SBAddress::GetLoadAddress (const SBProcess &process) const
+SBAddress::GetLoadAddress (const SBTarget &target) const
{
if (m_opaque_ap.get())
- return m_opaque_ap->GetLoadAddress(process.get());
+ return m_opaque_ap->GetLoadAddress(target.get());
else
return LLDB_INVALID_ADDRESS;
}
diff --git a/source/API/SBBreakpoint.cpp b/source/API/SBBreakpoint.cpp
index f8c52ef..91b1598 100644
--- a/source/API/SBBreakpoint.cpp
+++ b/source/API/SBBreakpoint.cpp
@@ -134,8 +134,8 @@
if (vm_addr != LLDB_INVALID_ADDRESS)
{
Address address;
- Process *sb_process = m_opaque_sp->GetTarget().GetProcessSP().get();
- if (sb_process == NULL || sb_process->ResolveLoadAddress (vm_addr, address) == false)
+ Target &target = m_opaque_sp->GetTarget();
+ if (target.GetSectionLoadList().ResolveLoadAddress (vm_addr, address) == false)
{
address.SetSection (NULL);
address.SetOffset (vm_addr);
@@ -156,8 +156,8 @@
if (vm_addr != LLDB_INVALID_ADDRESS)
{
Address address;
- Process *sb_process = m_opaque_sp->GetTarget().GetProcessSP().get();
- if (sb_process == NULL || sb_process->ResolveLoadAddress (vm_addr, address) == false)
+ Target &target = m_opaque_sp->GetTarget();
+ if (target.GetSectionLoadList().ResolveLoadAddress (vm_addr, address) == false)
{
address.SetSection (NULL);
address.SetOffset (vm_addr);
diff --git a/source/API/SBFrame.cpp b/source/API/SBFrame.cpp
index 65846e5..5d9bd6e 100644
--- a/source/API/SBFrame.cpp
+++ b/source/API/SBFrame.cpp
@@ -132,7 +132,7 @@
SBFrame::GetPC () const
{
if (m_opaque_sp)
- return m_opaque_sp->GetFrameCodeAddress().GetLoadAddress (&m_opaque_sp->GetThread().GetProcess());
+ return m_opaque_sp->GetFrameCodeAddress().GetLoadAddress (&m_opaque_sp->GetThread().GetProcess().GetTarget());
return LLDB_INVALID_ADDRESS;
}
diff --git a/source/API/SBTarget.cpp b/source/API/SBTarget.cpp
index 6c55c68..9e5c1ab 100644
--- a/source/API/SBTarget.cpp
+++ b/source/API/SBTarget.cpp
@@ -399,6 +399,7 @@
// Make sure the process object is alive if we have one (it might be
// created but we might not be launched yet).
+
Process *process = m_opaque_sp->GetProcessSP().get();
if (process && !process->IsAlive())
process = NULL;
@@ -410,11 +411,11 @@
if (!module_sp->ResolveFileAddress (start_addr, range.GetBaseAddress()))
range.GetBaseAddress().SetOffset(start_addr);
}
- else if (process)
+ else if (m_opaque_sp->GetSectionLoadList().IsEmpty() == false)
{
// We don't have a module, se we need to figure out if "start_addr"
// resolves to anything in a running process.
- if (!process->ResolveLoadAddress(start_addr, range.GetBaseAddress()))
+ if (!m_opaque_sp->GetSectionLoadList().ResolveLoadAddress (start_addr, range.GetBaseAddress()))
range.GetBaseAddress().SetOffset(start_addr);
}
else