summaryrefslogtreecommitdiff
path: root/lldb/source/Core/Communication.cpp
AgeCommit message (Collapse)Author
2024-08-27[lldb] Turn lldb_private::Status into a value type. (#106163)Adrian Prantl
This patch removes all of the Set.* methods from Status. This cleanup is part of a series of patches that make it harder use the anti-pattern of keeping a long-lives Status object around and updating it while dropping any errors it contains on the floor. This patch is largely NFC, the more interesting next steps this enables is to: 1. remove Status.Clear() 2. assert that Status::operator=() never overwrites an error 3. remove Status::operator=() Note that step (2) will bring 90% of the benefits for users, and step (3) will dramatically clean up the error handling code in various places. In the end my goal is to convert all APIs that are of the form ` ResultTy DoFoo(Status& error) ` to ` llvm::Expected<ResultTy> DoFoo() ` How to read this patch? The interesting changes are in Status.h and Status.cpp, all other changes are mostly ` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git grep -l SetErrorString lldb/source) ` plus the occasional manual cleanup.
2023-08-15Revert "[lldb] Properly protect the Communication class with reader/writer lock"Augusto Noronha
This reverts commit 5d16957207ce1bd1a2091f3677e176012009c59a.
2023-08-15[lldb] Properly protect the Communication class with reader/writer lockAugusto Noronha
This patch picks up where https://reviews.llvm.org/D157159 left of, but allows for concurrent reads/writes, but protects setting up and tearing down the underlying Connection object. Differential Revision: https://reviews.llvm.org/D157760
2022-09-06[lldb] [Core] Split read thread support into ThreadedCommunicationMichał Górny
Split the read thread support from Communication into a dedicated ThreadedCommunication subclass. The read thread support is used only by a subset of Communication consumers, and it adds a lot of complexity to the base class. Furthermore, having a dedicated subclass makes it clear whether a particular consumer needs to account for the possibility of read thread being running or not. The modules currently calling `StartReadThread()` are updated to use `ThreadedCommunication`. The remaining modules use the simplified `Communication` class. `SBCommunication` is changed to use `ThreadedCommunication` in order to avoid changing the public API. `CommunicationKDP` is updated in order to (hopefully) compile with the new code. However, I do not have a Darwin box to test it, so I've limited the changes to the bare minimum. `GDBRemoteCommunication` is updated to become a `Broadcaster` directly. Since it does not inherit from `ThreadedCommunication`, its event support no longer collides with the one used for read thread and can be implemented cleanly. The support for `eBroadcastBitReadThreadDidExit` is removed from the code -- since the read thread was not used, this event was never reported. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D133251
2022-09-01[lldb] [Core] Pass error/status from Communication::ReadThread()Michał Górny
Ensure that the ConnectionStatus and Status from Communication::ReadThread() is correctly passed to ::Read() in order to fix further discrepancies between ::Read() calls in non-threaded and threaded modes. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D132577
2022-08-19[lldb] [Core] Harmonize Communication::Read() returns w/ threadMichał Górny
Harmonize the status and error values of Communication::Read() when running with and without read thread. Prior to this change, Read() would return eConnectionStatusSuccess if read thread was enabled and the read timed out or reached end-of-file, rather than the respective states that are returned if read thread was disabled. Now, it correctly returns eConnectionStatusTimedOut and eConnectionStatusEndOfFile, and sets the error respectively. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D132217
2022-08-08[lldb] LLVM_FALLTHROUGH => [[fallthrough]]. NFCFangrui Song
2022-02-23[lldb] Modernize ThreadLauncherPavel Labath
Accept a function object instead of a raw pointer. This avoids a bunch of boilerplate typically needed to pass arguments to the thread functions. Differential Revision: https://reviews.llvm.org/D120321
2022-02-03[lldb] Rename Logging.h to LLDBLog.h and clean up includesPavel Labath
Most of our code was including Log.h even though that is not where the "lldb" log channel is defined (Log.h defines the generic logging infrastructure). This worked because Log.h included Logging.h, even though it should. After the recent refactor, it became impossible the two files include each other in this direction (the opposite inclusion is needed), so this patch removes the workaround that was put in place and cleans up all files to include the right thing. It also renames the file to LLDBLog to better reflect its purpose.
2022-02-02[lldb] Convert "LLDB" log channel to the new APIPavel Labath
2021-10-26[lldb] [Communication] Add a WriteAll() method that resumes writingMichał Górny
Add a Communication::WriteAll() that resumes Write() if the initial call did not write all data. Use it in GDBRemoteCommunication when sending packets in order to fix handling partial writes (i.e. just resume/retry them rather than erring out). This fixes LLDB failures when writing large packets to a pty. Differential Revision: https://reviews.llvm.org/D112169
2021-09-09[lldb] Fix format string in Communication::WriteRyan Mansfield
Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D109508
2021-05-26[lldb][NFC] Use C++ versions of the deprecated C standard library headersRaphael Isemann
The C headers are deprecated so as requested in D102845, this is replacing them all with their (not deprecated) C++ equivalent. Reviewed By: shafik Differential Revision: https://reviews.llvm.org/D103084
2020-07-30[lldb] Don't use static locals for return value storage in some *AsCString ↵Raphael Isemann
functions Let's just return a std::string to make this safe. formatv seemed overkill for formatting the return values as they all just append an integer value to a constant string. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D84505
2020-07-27[lldb] Modernize away some snprintf callsRaphael Isemann
Reviewers: #lldb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: JDevlieghere Differential Revision: https://reviews.llvm.org/D84530
2020-04-23[lldb/Core] Avoid more Communication::Disconnect racesPavel Labath
Calling Disconnect while the read thread is running is racy because the thread can also call Disconnect. This is a follow-up to b424b0bf, which reorders other occurences of Disconnect/StopReadThread I can find, and also adds an assertion to guard against new occurences being introduced.
2020-04-09[lldb] Add parts accidentally left out of 769d704: Recommit "[lldb/Core] Fix ↵Pavel Labath
a race in the Communication class" I went to a great length to explain the reason why these changes were needed, but I did not actually ammend the patch to include them. :(
2020-04-09Recommit "[lldb/Core] Fix a race in the Communication class"Pavel Labath
The synchronization logic in the previous had a subtle bug. Moving of the "m_read_thread_did_exit = true" into the critical section made it possible for some threads calling SynchronizeWithReadThread call to get stuck. This could happen if there were already past the point where they checked this variable. In that case, they would block on waiting for the eBroadcastBitNoMorePendingInput event, which would never come as the read thread was blocked on getting the synchronization mutex. The new version moves that line out of the critical section and before the sending of the eBroadcastBitNoMorePendingInput event, and also adds some comments to explain why the things need to be in this sequence: - m_read_thread_did_exit = true: prevents new threads for waiting on events - eBroadcastBitNoMorePendingInput: unblock any current thread waiting for the event - Disconnect(): close the connection. This is the only bit that needs to be in the critical section, and this is to ensure that we don't close the connection while the synchronizing thread is mucking with it. Original commit message follows: Communication::SynchronizeWithReadThread is called whenever a process stops to ensure that we process all of its stdout before we report the stop. If the process exits, we first call this method, and then close the connection. However, when the child process exits, the thread reading its stdout will usually (but not always) read an EOF because the other end of the pty has been closed. In response to an EOF, the Communication read thread closes it's end of the connection too. This can result in a race where the read thread is closing the connection while the synchronizing thread is attempting to get its attention via Connection::InterruptRead. The fix is to hold the synchronization mutex while closing the connection. I've found this issue while tracking down a rare flake in some of the vscode tests. I am not sure this is the cause of those failures (as I would have expected this issue to manifest itself differently), but it is an issue nonetheless. The attached test demonstrates the steps needed to reproduce the race. It will fail under tsan without this patch. Reviewers: clayborg, JDevlieghere Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D77295
2020-04-09Revert "[lldb/Core] Fix a race in the Communication class"Pavel Labath
This reverts commit ebb071345cdae2509c55f9eec76090926fee86a2 -- it seems to introduce a deadlock in some circumstances.
2020-04-09[lldb/Core] Fix a race in the Communication classPavel Labath
Summary: Communication::SynchronizeWithReadThread is called whenever a process stops to ensure that we process all of its stdout before we report the stop. If the process exits, we first call this method, and then close the connection. However, when the child process exits, the thread reading its stdout will usually (but not always) read an EOF because the other end of the pty has been closed. In response to an EOF, the Communication read thread closes it's end of the connection too. This can result in a race where the read thread is closing the connection while the synchronizing thread is attempting to get its attention via Connection::InterruptRead. The fix is to hold the synchronization mutex while closing the connection. I've found this issue while tracking down a rare flake in some of the vscode tests. I am not sure this is the cause of those failures (as I would have expected this issue to manifest itself differently), but it is an issue nonetheless. The attached test demonstrates the steps needed to reproduce the race. It will fail under tsan without this patch. Reviewers: clayborg, JDevlieghere Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D77295
2020-04-02[lldb] Change Communication::SetConnection to take a unique_ptrPavel Labath
The function takes ownership of the object. This makes that explicit, and avoids unowned pointers floating around.
2020-01-24[lldb][NFC] Fix all formatting errors in .cpp file headersRaphael Isemann
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp -------------------------------------------------===// ``` However in LLDB most of our source files have arbitrary changes to this format and these changes are spreading through LLDB as folks usually just use the existing source files as templates for their new files (most notably the unnecessary editor language indicator `-*- C++ -*-` is spreading and in every review someone is pointing out that this is wrong, resulting in people pointing out that this is done in the same way in other files). This patch removes most of these inconsistencies including the editor language indicators, all the different missing/additional '-' characters, files that center the file name, missing trailing `===//` (mostly caused by clang-format breaking the line). Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere Reviewed By: JDevlieghere Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73258
2019-07-24[Logging] Replace Log::Printf with LLDB_LOG macro (NFC)Jonas Devlieghere
This patch replaces explicit calls to log::Printf with the new LLDB_LOGF macro. The macro is similar to LLDB_LOG but supports printf-style format strings, instead of formatv-style format strings. So instead of writing: if (log) log->Printf("%s\n", str); You'd write: LLDB_LOG(log, "%s\n", str); This change was done mechanically with the command below. I replaced the spurious if-checks with vim, since I know how to do multi-line replacements with it. find . -type f -name '*.cpp' -exec \ sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" + Differential revision: https://reviews.llvm.org/D65128 llvm-svn: 366936
2019-07-23[Logging] Fix format stringsJonas Devlieghere
Change format strings to use the `{}` syntax instead of the printf syntax when using LLDB_LOG. llvm-svn: 366824
2019-07-22[Logging] Replace LogIfAnyCategoriesSet with LLDB_LOG.Jonas Devlieghere
This patch removes any remaining instances of LogIfAnyCategoriesSet and replaces them with the LLDB_LOG macro. This in turn made it possible to make Log::VAPrintf and Log::VAError private. llvm-svn: 366768
2019-07-05Change LaunchThread interface to return an expected.Jonas Devlieghere
Change the interface to return an expected, instead of taking a Status pointer. Differential revision: https://reviews.llvm.org/D64163 llvm-svn: 365226
2019-05-23[lldb] fix cannot convert from 'nullptr' to 'lldb::thread_result_t'Konrad Kleine
Summary: On Windows `lldb::thread_result_t` resolves to `typedef unsigned thread_result_t;` and on other platforms it resolves to `typedef void *thread_result_t;`. Therefore one cannot use `nullptr` when returning from a function that returns `thread_result_t`. I've made this change because a windows build bot fails with these errors: ``` E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Communication.cpp(362): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type ``` and ``` E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1619): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1664): error C2440: 'return': cannot convert from 'nullptr' to 'lldb::thread_result_t' E:\build_slave\lldb-x64-windows-ninja\llvm\tools\lldb\source\Core\Debugger.cpp(1664): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type ``` This is the failing build: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/5035/steps/build/logs/stdio Reviewers: JDevlieghere, teemperor, jankratochvil, labath, clayborg, RKSimon, courbet, jhenderson Reviewed By: labath, clayborg Subscribers: labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62305 llvm-svn: 361503
2019-05-23[lldb] NFC modernize codebase with modernize-use-nullptrKonrad Kleine
Summary: NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]] This commit is the result of modernizing the LLDB codebase by using `nullptr` instread of `0` or `NULL`. See https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html for more information. This is the command I ran and I to fix and format the code base: ``` run-clang-tidy.py \ -header-filter='.*' \ -checks='-*,modernize-use-nullptr' \ -fix ~/dev/llvm-project/lldb/.* \ -format \ -style LLVM \ -p ~/llvm-builds/debug-ninja-gcc ``` NOTE: There were also changes to `llvm/utils/unittest` but I did not include them because I felt that maybe this library shall be updated in isolation somehow. NOTE: I know this is a rather large commit but it is a nobrainer in most parts. Reviewers: martong, espindola, shafik, #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits Tags: #lldb, #llvm Differential Revision: https://reviews.llvm.org/D61847 llvm-svn: 361484
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-12-14Move Broadcaster+Listener+Event combo from Core into UtilityPavel Labath
Summary: These are general purpose "utility" classes, whose functionality is not debugger-specific in any way. As such, I believe they belong in the Utility module. This doesn't break any particular dependency (yet), but it reduces the number of Core dependencies across the board. Reviewers: zturner, jingham, teemperor, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D55361 llvm-svn: 349157
2018-11-11Remove comments after header includes.Jonas Devlieghere
This patch removes the comments following the header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. Differential revision: https://reviews.llvm.org/D54385 llvm-svn: 346625
2018-05-29Typo fixes.Bruce Mitchener
Reviewers: javed.absar Subscribers: ki.stfu, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D47421 llvm-svn: 333399
2018-04-30Reflow paragraphs in comments.Adrian Prantl
This is intended as a clean up after the big clang-format commit (r280751), which unfortunately resulted in many of the comment paragraphs in LLDB being very hard to read. FYI, the script I used was: import textwrap import commands import os import sys import re tmp = "%s.tmp"%sys.argv[1] out = open(tmp, "w+") with open(sys.argv[1], "r") as f: header = "" text = "" comment = re.compile(r'^( *//) ([^ ].*)$') special = re.compile(r'^((([A-Z]+[: ])|([0-9]+ )).*)|(.*;)$') for line in f: match = comment.match(line) if match and not special.match(match.group(2)): # skip intentionally short comments. if not text and len(match.group(2)) < 40: out.write(line) continue if text: text += " " + match.group(2) else: header = match.group(1) text = match.group(2) continue if text: filled = textwrap.wrap(text, width=(78-len(header)), break_long_words=False) for l in filled: out.write(header+" "+l+'\n') text = "" out.write(line) os.rename(tmp, sys.argv[1]) Differential Revision: https://reviews.llvm.org/D46144 llvm-svn: 331197
2017-06-27Move Connection and IOObject interfaces to Utility modulePavel Labath
Summary: These interfaces have no dependencies, so it makes sense for them to be in the lowest level modules, to make sure that other parts of the codebase can use them without introducing loops. The only exception here is the Connection::CreateDefaultConnection method, which I've moved to Host, as it instantiates concrete implementations, and that's where the implementations live. Reviewers: jingham, zturner Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D34400 llvm-svn: 306391
2017-05-12Rename Error -> Status.Zachary Turner
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list. A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious. llvm-svn: 302872
2017-04-06iwyu fixes for lldbCore.Zachary Turner
This adjusts header file includes for headers and source files in Core. In doing so, one dependency cycle is eliminated because all the includes from Core to that project were dead includes anyway. In places where some files in other projects were only compiling due to a transitive include from another header, fixups have been made so that those files also include the header they need. Tested on Windows and Linux, and plan to address failures on OSX and FreeBSD after watching the bots. llvm-svn: 299714
2017-03-03Move Log from Core -> Utility.Zachary Turner
All references to Host and Core have been removed, so this class can now safely be lowered into Utility. Differential Revision: https://reviews.llvm.org/D30559 llvm-svn: 296909
2017-02-10Add a format_provider for the Timeout classPavel Labath
and use it in the appropriate log statements. Formatting of chrono types in log messages was very clunky. This should make it much nicer to use and give better output. For details of the formatting options see the chrono formatter in llvm. llvm-svn: 294738
2017-02-06Get rid of Error::PutToLog().Zachary Turner
Instead just rely on LLDB_LOG(). This is part of an effort to sort out dependency hell in LLDB. Error is in Utility, but Log is in Core. Core can depend on Utility, but not vice versa. So this patch moves the knowledge about how to log Errors from the Error class to the Log file. Differential Revision: https://reviews.llvm.org/D29514 llvm-svn: 294210
2016-11-30Use Timeout<> in the Listener classPavel Labath
Summary: Communication classes use the Timeout<> class to specify the timeout. Listener class was converted to chrono some time ago, but it used a different meaning for a timeout of zero (Listener: infinite wait, Communication: no wait). Instead, Listener provided separate functions which performed a non-blocking event read. This converts the Listener class to the new Timeout class, to improve consistency. It also allows us to get merge the different GetNextEvent*** and WaitForEvent*** functions into one. No functional change intended. Reviewers: jingham, clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D27136 llvm-svn: 288238
2016-11-25Introduce Chrono to the Connection class. NFCI.Pavel Labath
llvm-svn: 287922
2016-11-25Fix FreeBSD build error in r287920Pavel Labath
The conditional expression is ambiguous there, so help it by explicitly casting. This will go away once we use chrono all the way down. llvm-svn: 287921
2016-11-25Introduce chrono to the Communication classPavel Labath
This replaces the raw integer timeout parameters in the class with their chrono-based equivalents. To achieve this, I have moved the Timeout class to a more generic place and added a quick unit test for it. llvm-svn: 287920
2016-11-02Remove TimeValue usage from two filesPavel Labath
llvm-svn: 285801
2016-09-06*** This commit represents a complete reformatting of the LLDB source codeKate Stone
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
2016-07-28Clean up vestigial remnants of locking primitivesSaleem Abdulrasool
This finally removes the use of the Mutex and Condition classes. This is an intricate patch as the Mutex and Condition classes were tied together. Furthermore, many places had slightly differing uses of time values. Convert timeout values to relative everywhere to permit the use of std::chrono::duration, which is required for the use of std::condition_variable's timeout. Adjust all Condition and related Mutex classes over to std::{,recursive_}mutex and std::condition_variable. This change primarily comes at the cost of breaking the TracingMutex which was based around the Mutex class. It would be possible to write a wrapper to provide similar functionality, but that is beyond the scope of this change. llvm-svn: 277011
2016-05-18remove use of Mutex in favour of std::{,recursive_}mutexSaleem Abdulrasool
This is a pretty straightforward first pass over removing a number of uses of Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there are interfaces which take Mutex::Locker & to lock internal locks. This patch cleans up most of the easy cases. The only non-trivial change is in CommandObjectTarget.cpp where a Mutex::Locker was split into two. llvm-svn: 269877
2016-05-03Revert "Add a read_full_buffer argument to ConnectionFileDescriptor::Read"Pavel Labath
This reverts commit r268380 as it breaks windows build (I forgot to make neccesary adjustments to ConnectionGenericFileWindows). llvm-svn: 268384
2016-05-03Add a read_full_buffer argument to ConnectionFileDescriptor::ReadPavel Labath
Summary: AdbClient was attempting to handle the case where the socket input arrived in pieces, but it was failing to handle the case where the connection was closed before that happened. In this case, it would just spin in an infinite loop calling Connection::Read. (This was also the cause of the spurious timeouts on the darwin->android buildbot. The exact cause of the premature EOF remains to be investigated, but is likely a server bug.) Since this wait-for-a-certain-number-of-bytes seems like a useful functionality to have, I am moving it (with the infinite loop fixed) to the Connection class, and adding an appropriate test for it. Reviewers: clayborg, zturner, ovyalov Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: http://reviews.llvm.org/D19533 llvm-svn: 268380
2016-03-07Change over the broadcaster/listener process to hold shared or weak pointersJim Ingham
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