[Lldb-commits] [PATCH] D12683: Fix debugger shutdown when Python interpreter is loaded
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 7 19:00:30 PDT 2015
What were the symptoms of this? How'd you find it?
On Mon, Sep 7, 2015 at 6:47 PM Oleksiy Vyalov via lldb-commits <
lldb-commits at lists.llvm.org> wrote:
> ovyalov created this revision.
> ovyalov added a reviewer: clayborg.
> ovyalov added a subscriber: lldb-commits.
>
> Python locks in memory a few global objects like
> lldb.debugger,lldb.target,... - as a consequence, ~Debugger isn't called
> upon shutdown.
> Calling Debugger::Clear ensures that ScriptInterpreterPython::Clear is
> called to clean up Python global variables.
>
> http://reviews.llvm.org/D12683
>
> Files:
> source/Core/Debugger.cpp
>
> Index: source/Core/Debugger.cpp
> ===================================================================
> --- source/Core/Debugger.cpp
> +++ source/Core/Debugger.cpp
> @@ -421,7 +421,11 @@
>
> // Clear our master list of debugger objects
> Mutex::Locker locker (GetDebuggerListMutex ());
> - GetDebuggerList().clear();
> + auto& debuggers = GetDebuggerList();
> + for (const auto& debugger: debuggers)
> + debugger->Clear();
> +
> + debuggers.clear();
> }
>
> void
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150908/59f96efc/attachment-0001.html>
More information about the lldb-commits
mailing list