diff options
| author | Greg Clayton <gclayton@apple.com> | 2013-11-09 00:03:31 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2013-11-09 00:03:31 +0000 |
| commit | b35db6399dd8ab092bd45c10d1a76e10fae2dad7 (patch) | |
| tree | 2241777d807b54db63858e7274e253acf1dc2413 /lldb/source/Target | |
| parent | 1b6973fc99e381bf8b8f5036502193b8219f4d5e (diff) | |
| download | bcm5719-llvm-b35db6399dd8ab092bd45c10d1a76e10fae2dad7.tar.gz bcm5719-llvm-b35db6399dd8ab092bd45c10d1a76e10fae2dad7.zip | |
Fixed the the breakpoint test case failures.
There were 6 on darwin. All of these were related to the recent changes for exec.
llvm-svn: 194298
Diffstat (limited to 'lldb/source/Target')
| -rw-r--r-- | lldb/source/Target/Process.cpp | 6 | ||||
| -rw-r--r-- | lldb/source/Target/Target.cpp | 18 |
2 files changed, 18 insertions, 6 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index c3d1795611b..93edfdba407 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -5644,7 +5644,7 @@ Process::DidExec () { Target &target = GetTarget(); target.CleanupProcess (); - target.ClearModules(); + target.ClearModules(false); m_dynamic_checkers_ap.reset(); m_abi_sp.reset(); m_system_runtime_ap.reset(); @@ -5660,5 +5660,9 @@ Process::DidExec () // Flush the process (threads and all stack frames) after running CompleteAttach() // in case the dynamic loader loaded things in new locations. Flush(); + + // After we figure out what was loaded/unloaded in CompleteAttach, + // we need to let the target know so it can do any cleanup it needs to. + target.DidExec(); } diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 18efd8cb724..178e276d56c 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -192,7 +192,7 @@ Target::Destroy() DeleteCurrentProcess (); m_platform_sp.reset(); m_arch.Clear(); - ClearModules(); + ClearModules(true); m_section_load_list.Clear(); const bool notify = false; m_breakpoint_list.RemoveAll(notify); @@ -1014,9 +1014,9 @@ LoadScriptingResourceForModule (const ModuleSP &module_sp, Target *target) } void -Target::ClearModules() +Target::ClearModules(bool delete_locations) { - ModulesDidUnload (m_images, true); + ModulesDidUnload (m_images, delete_locations); GetSectionLoadList().Clear(); m_images.Clear(); m_scratch_ast_context_ap.reset(); @@ -1025,10 +1025,18 @@ Target::ClearModules() } void +Target::DidExec () +{ + // When a process exec's we need to know about it so we can do some cleanup. + m_breakpoint_list.RemoveInvalidLocations(m_arch); + m_internal_breakpoint_list.RemoveInvalidLocations(m_arch); +} + +void Target::SetExecutableModule (ModuleSP& executable_sp, bool get_dependent_files) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TARGET)); - ClearModules(); + ClearModules(false); if (executable_sp.get()) { @@ -1098,7 +1106,7 @@ Target::SetArchitecture (const ArchSpec &arch_spec) m_arch = arch_spec; ModuleSP executable_sp = GetExecutableModule (); - ClearModules(); + ClearModules(true); // Need to do something about unsetting breakpoints. if (executable_sp) |

