diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-01-14 17:04:19 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-01-14 17:04:19 +0000 |
| commit | ccbc08e6ae95d266094e1430359b148e0f7408d5 (patch) | |
| tree | 85d7a9c26cd54f0efec4aa90d7a6851112015c0d /lldb/source/Core/Debugger.cpp | |
| parent | aefdb38352fb461072754a207370f2fadabab62e (diff) | |
| download | bcm5719-llvm-ccbc08e6ae95d266094e1430359b148e0f7408d5.tar.gz bcm5719-llvm-ccbc08e6ae95d266094e1430359b148e0f7408d5.zip | |
<rdar://problem/10684141>
When the lldb_private::Debugger goes away, it should cleanup all
of its targets.
llvm-svn: 148189
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
| -rw-r--r-- | lldb/source/Core/Debugger.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 77f85724a39..f28c261b414 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -359,13 +359,16 @@ Debugger::Clear() int num_targets = m_target_list.GetNumTargets(); for (int i = 0; i < num_targets; i++) { - ProcessSP process_sp (m_target_list.GetTargetAtIndex (i)->GetProcessSP()); - if (process_sp) + TargetSP target_sp (m_target_list.GetTargetAtIndex (i)); + if (target_sp) { - if (process_sp->GetShouldDetach()) - process_sp->Detach(); - else - process_sp->Destroy(); + ProcessSP process_sp (target_sp->GetProcessSP()); + if (process_sp) + { + if (process_sp->GetShouldDetach()) + process_sp->Detach(); + } + target_sp->Destroy(); } } DisconnectInput(); @@ -776,6 +779,7 @@ TestPromptFormats (StackFrame *frame) "{frame.reg.carp = '${frame.reg.carp}'\n}" "{function.id = '${function.id}'\n}" "{function.name = '${function.name}'\n}" + "{function.name-with-args = '${function.name-with-args}'\n}" "{function.addr-offset = '${function.addr-offset}'\n}" "{function.line-offset = '${function.line-offset}'\n}" "{function.pc-offset = '${function.pc-offset}'\n}" |

