summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-01-29 01:17:09 +0000
committerGreg Clayton <gclayton@apple.com>2013-01-29 01:17:09 +0000
commit3c94737fb71acdc3dc91255d11c3ccba496aba8a (patch)
tree9d5a56b4f80ca9b66d32a1a5d1caac921eb3eb0f /lldb/source/API/SBTarget.cpp
parent5c1f1d09c87a1aad95973c8c8ffa2733329b397e (diff)
downloadbcm5719-llvm-3c94737fb71acdc3dc91255d11c3ccba496aba8a.tar.gz
bcm5719-llvm-3c94737fb71acdc3dc91255d11c3ccba496aba8a.zip
<rdar://problem/12524607>
Flush the process when symbols are loaded/unloaded manually. This was going on in: - "target modules load" command - SBTarget::SetSectionLoadAddress(...) - SBTarget::ClearSectionLoadAddress(...) - SBTarget::SetModuleLoadAddress(...) - SBTarget::ClearModuleLoadAddress(...) llvm-svn: 173745
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 79b038b2766..f4582da5e1d 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -2329,7 +2329,13 @@ SBTarget::SetSectionLoadAddress (lldb::SBSection section,
}
else
{
- target_sp->GetSectionLoadList().SetSectionLoadAddress (section_sp, section_base_addr);
+ if (target_sp->GetSectionLoadList().SetSectionLoadAddress (section_sp, section_base_addr))
+ {
+ // Flush info in the process (stack frames, etc)
+ ProcessSP process_sp (target_sp->GetProcessSP());
+ if (process_sp)
+ process_sp->Flush();
+ }
}
}
}
@@ -2355,7 +2361,13 @@ SBTarget::ClearSectionLoadAddress (lldb::SBSection section)
}
else
{
- target_sp->GetSectionLoadList().SetSectionUnloaded (section.GetSP());
+ if (target_sp->GetSectionLoadList().SetSectionUnloaded (section.GetSP()))
+ {
+ // Flush info in the process (stack frames, etc)
+ ProcessSP process_sp (target_sp->GetProcessSP());
+ if (process_sp)
+ process_sp->Flush();
+ }
}
}
else
@@ -2386,6 +2398,10 @@ SBTarget::SetModuleLoadAddress (lldb::SBModule module, int64_t slide_offset)
ModuleList module_list;
module_list.Append(module_sp);
target_sp->ModulesDidLoad (module_list);
+ // Flush info in the process (stack frames, etc)
+ ProcessSP process_sp (target_sp->GetProcessSP());
+ if (process_sp)
+ process_sp->Flush();
}
}
}
@@ -2420,12 +2436,20 @@ SBTarget::ClearModuleLoadAddress (lldb::SBModule module)
SectionList *section_list = objfile->GetSectionList();
if (section_list)
{
+ bool changed = false;
const size_t num_sections = section_list->GetSize();
for (size_t sect_idx = 0; sect_idx < num_sections; ++sect_idx)
{
SectionSP section_sp (section_list->GetSectionAtIndex(sect_idx));
if (section_sp)
- target_sp->GetSectionLoadList().SetSectionUnloaded (section_sp);
+ changed |= target_sp->GetSectionLoadList().SetSectionUnloaded (section_sp) > 0;
+ }
+ if (changed)
+ {
+ // Flush info in the process (stack frames, etc)
+ ProcessSP process_sp (target_sp->GetProcessSP());
+ if (process_sp)
+ process_sp->Flush();
}
}
else
OpenPOWER on IntegriCloud