summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBAddress.cpp4
-rw-r--r--lldb/source/API/SBBreakpoint.cpp8
-rw-r--r--lldb/source/API/SBFrame.cpp2
-rw-r--r--lldb/source/API/SBTarget.cpp5
4 files changed, 10 insertions, 9 deletions
diff --git a/lldb/source/API/SBAddress.cpp b/lldb/source/API/SBAddress.cpp
index 8b8294c6453..61e1ec1524f 100644
--- a/lldb/source/API/SBAddress.cpp
+++ b/lldb/source/API/SBAddress.cpp
@@ -85,10 +85,10 @@ SBAddress::GetFileAddress () const
}
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/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index f8c52ef0893..91b159870ca 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -134,8 +134,8 @@ SBBreakpoint::FindLocationByAddress (addr_t vm_addr)
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 @@ SBBreakpoint::FindLocationIDByAddress (addr_t vm_addr)
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/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index 65846e57f49..5d9bd6e016f 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -132,7 +132,7 @@ lldb::addr_t
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/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 6c55c684bad..9e5c1ab27d5 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -399,6 +399,7 @@ SBTarget::Disassemble (lldb::addr_t start_addr, lldb::addr_t end_addr, const cha
// 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 @@ SBTarget::Disassemble (lldb::addr_t start_addr, lldb::addr_t end_addr, const cha
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
OpenPOWER on IntegriCloud