Change over the broadcaster/listener process to hold shared or weak pointers
authorJim Ingham <jingham@apple.com>
Mon, 7 Mar 2016 21:50:25 +0000 (21:50 +0000)
committerJim Ingham <jingham@apple.com>
Mon, 7 Mar 2016 21:50:25 +0000 (21:50 +0000)
commit583bbb1dd46e1665c2d5f31d4e4772bf6207c1c0
tree08371c4b8334ea4e9a7f1ce3d29420712fd7949a
parent2a831fb8264e6a53a8b08b90107f3b176c152db2
Change over the broadcaster/listener process to hold shared or weak pointers
to each other.  This should remove some infrequent teardown crashes when the
listener is not the debugger's listener.

Processes now need to take a ListenerSP, not a Listener&.

This required changing over the Process plugin class constructors to take a ListenerSP, instead
of a Listener&.   Other than that there should be no functional change.

<rdar://problem/24580184> CrashTracer: [USER] Xcode at â€¦ework: lldb_private::Listener::BroadcasterWillDestruct + 39

llvm-svn: 262863
50 files changed:
lldb/include/lldb/API/SBListener.h
lldb/include/lldb/Core/Broadcaster.h
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Core/Event.h
lldb/include/lldb/Core/Listener.h
lldb/include/lldb/Target/Process.h
lldb/include/lldb/Target/ProcessLaunchInfo.h
lldb/include/lldb/Target/Target.h
lldb/include/lldb/lldb-forward.h
lldb/include/lldb/lldb-private-interfaces.h
lldb/packages/Python/lldbsuite/test/api/listeners/Makefile [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/api/listeners/TestListener.py [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/api/listeners/main.c [new file with mode: 0644]
lldb/source/API/SBBroadcaster.cpp
lldb/source/API/SBDebugger.cpp
lldb/source/API/SBListener.cpp
lldb/source/API/SBTarget.cpp
lldb/source/Core/Broadcaster.cpp
lldb/source/Core/Communication.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/Event.cpp
lldb/source/Core/IOHandler.cpp
lldb/source/Core/Listener.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp
lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLive.h
lldb/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
lldb/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
lldb/source/Plugins/Process/mach-core/ProcessMachCore.h
lldb/source/Target/Process.cpp
lldb/source/Target/ProcessLaunchInfo.cpp
lldb/source/Target/Target.cpp
lldb/source/Target/TargetList.cpp
lldb/source/Target/Thread.cpp