summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBProcess.cpp
Commit message (Collapse)AuthorAgeFilesLines
* remove FILE* usage from ReportEventState() and HandleProcessEvent()Lawrence D'Anna2019-10-141-8/+23
| | | | | | | | | | | | | | | | | | | Summary: This patch adds FileSP and SBFile versions of the API methods ReportEventState and HandleProcessEvent. It points the SWIG wrappers at these instead of the ones that use FILE* streams. Reviewers: JDevlieghere, jasonmolenda, labath, jingham Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68546 llvm-svn: 374816
* [lldb] Get the TargetAPI lock in SBProcess::IsInstrumentationRuntimePresentRaphael Isemann2019-10-041-0/+3
| | | | | | | | | | | | | | | | | | | Summary: We should get the TargetAPI lock here to prevent the process of being destroyed while we are in the function. Thanks Jim for explaining what's going on. Fixes rdar://54424754 Reviewers: jingham Reviewed By: jingham Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67831 llvm-svn: 373725
* [lldb] NFC modernize codebase with modernize-use-nullptrKonrad Kleine2019-05-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-101-4/+0
| | | | | | | | | | | | | | | | | | | | | | | A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
* [Reproducers] Capture return values of functions returning by ptr/refJonas Devlieghere2019-04-031-1/+1
| | | | | | | | | | | | | | | For some reason I had convinced myself that functions returning by pointer or reference do not require recording their result. However, after further considering I don't see how that could work, at least not with the current implementation. Interestingly enough, the reproducer instrumentation already (mostly) accounts for this, though the lldb-instr tool did not. This patch adds the missing macros and updates the lldb-instr tool. Differential revision: https://reviews.llvm.org/D60178 llvm-svn: 357639
* [lldb] [Reproducer] Move SBRegistry registration into declaring filesMichal Gorny2019-03-191-0/+134
| | | | | | | | | | | | Move SBRegistry method registrations from SBReproducer.cpp into files declaring the individual APIs, in order to reduce the memory consumption during build and improve maintainability. The current humongous SBRegistry constructor exhausts all memory on a NetBSD system with 4G RAM + 4G swap, therefore making it impossible to build LLDB. Differential Revision: https://reviews.llvm.org/D59427 llvm-svn: 356481
* Add "operator bool" to SB APIsPavel Labath2019-03-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: Our python version of the SB API has (the python equivalent of) operator bool, but the C++ version doesn't. This is because our python operators are added by modify-python-lldb.py, which performs postprocessing on the swig-generated interface files. In this patch, I add the "operator bool" to all SB classes which have an IsValid method (which is the same logic used by modify-python-lldb.py). This way, we make the two interfaces more constent, and it allows us to rely on swig's automatic syntesis of python __nonzero__ methods instead of doing manual fixups. Reviewers: zturner, jingham, clayborg, jfb, serge-sans-paille Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D58792 llvm-svn: 355824
* [Reproducers] Add missing LLDB_RECORD_DUMMY macrosJonas Devlieghere2019-03-081-0/+11
| | | | | | | Re-ran lldb-inst on the API folder to insert missing LLDB_RECORD_DUMMY macros. llvm-svn: 355711
* [SBAPI] Log from record macroJonas Devlieghere2019-03-071-380/+10
| | | | | | | | | | | | | | | | The current record macros already log the function being called. This patch extends the macros to also log their input arguments and removes explicit logging from the SB API. This might degrade the amount of information in some cases (because of smarter casts or efforts to log return values). However I think this is outweighed by the increased coverage and consistency. Furthermore, using the reproducer infrastructure, diagnosing bugs in the API layer should become much easier compared to relying on log messages. Differential revision: https://reviews.llvm.org/D59101 llvm-svn: 355649
* [Reproducers] Add SBReproducer macrosJonas Devlieghere2019-03-061-35/+252
| | | | | | | | | | This patch adds the SBReproducer macros needed to capture and reply the corresponding calls. This patch was generated by running the lldb-instr tool on the API source files. Differential revision: https://reviews.llvm.org/D57475 llvm-svn: 355459
* Move ProcessInfo from Host to Utility.Zachary Turner2019-03-041-0/+1
| | | | | | | | | | | | | | | | | | | | | There are set of classes in Target that describe the parameters of a process - e.g. it's PID, name, user id, and similar. However, since it is a bare description of a process and contains no actual functionality, there's nothing specifically that makes this appropriate for being in Target -- it could just as well be describing a process on the host, or some hypothetical virtual process that doesn't even exist. To cement this, I'm moving these classes to Utility. It's possible that we can find a better place for it in the future, but as it is neither Host specific nor Target specific, Utility seems like the most appropriate place for the time being. After this there is only 2 remaining references to Target from Host, which I'll address in a followup. Differential Revision: https://reviews.llvm.org/D58842 llvm-svn: 355342
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | 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
* Replace MemoryRegionInfoSP with values and cleanup related codeTatyana Krasnukha2018-12-201-31/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D55472 llvm-svn: 349766
* Remove header grouping comments.Jonas Devlieghere2018-11-111-2/+0
| | | | | | | | This patch removes the comments grouping header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. llvm-svn: 346626
* [FileSystem] Move path resolution logic out of FileSpecJonas Devlieghere2018-11-011-5/+4
| | | | | | | | | This patch removes the logic for resolving paths out of FileSpec and updates call sites to rely on the FileSystem class instead. Differential revision: https://reviews.llvm.org/D53915 llvm-svn: 345890
* Move RegisterValue,Scalar,State from Core to UtilityPavel Labath2018-08-071-1/+1
| | | | | | | | | | | | | These three classes have no external dependencies, but they are used from various low-level APIs. Moving them down to Utility improves overall code layering (although it still does not break any particular dependency completely). The XCode project will need to be updated after this change. Differential Revision: https://reviews.llvm.org/D49740 llvm-svn: 339127
* Add a way to load an image using a library name and list of paths.Jim Ingham2018-06-281-0/+51
| | | | | | | | | | This provides an efficient (at least on Posix platforms) way to offload to the target process the search & loading of a library when all we have are the library name and a set of potential candidate locations. <rdar://problem/40905971> llvm-svn: 335912
* Reflow paragraphs in comments.Adrian Prantl2018-04-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move Args.cpp from Interpreter to UtilityPavel Labath2018-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: The Args class is used in plenty of places besides the command interpreter (e.g., anything requiring an argc+argv combo, such as when launching a process), so it needs to be in a lower layer. Now that the class has no external dependencies, it can be moved down to the Utility module. This removes the last (direct) dependency from the Host module to Interpreter, so I remove the Interpreter module from Host's dependency list. Reviewers: zturner, jingham, davide Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D45480 llvm-svn: 330200
* Add Utility/Environment class for handling... environmentsPavel Labath2018-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There was some confusion in the code about how to represent process environment. Most of the code (ab)used the Args class for this purpose, but some of it used a more basic StringList class instead. In either case, the fact that the underlying abstraction did not provide primitive operations for the typical environment operations meant that even a simple operation like checking for an environment variable value was several lines of code. This patch adds a separate Environment class, which is essentialy a llvm::StringMap<std::string> in disguise. To standard StringMap functionality, it adds a couple of new functions, which are specific to the environment use case: - (most important) envp conversion for passing into execve() and likes. Instead of trying to maintain a constantly up-to-date envp view, it provides a function which creates a envp view on demand, with the expectation that this will be called as the very last thing before handing the value to the system function. - insert(StringRef KeyEqValue) - splits KeyEqValue into (key, value) pair and inserts it into the environment map. - compose(value_type KeyValue) - takes a map entry and converts in back into "KEY=VALUE" representation. With this interface most of the environment-manipulating code becomes one-liners. The only tricky part was maintaining compatibility in SBLaunchInfo, which expects that the environment entries are accessible by index and that the returned const char* is backed by the launch info object (random access into maps is hard and the map stores the entry in a deconstructed form, so we cannot just return a .c_str() value). To solve this, I have the SBLaunchInfo convert the environment into the "envp" form, and use it to answer the environment queries. Extra code is added to make sure the envp version is always in sync. (This also improves the layering situation as Args was in the Interpreter module whereas Environment is in Utility.) Reviewers: zturner, davide, jingham, clayborg Subscribers: emaste, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D41359 llvm-svn: 322174
* Expose process instance info via SB APIVadim Macagon2017-08-011-0/+10
| | | | | | | | | | | Summary: Implement SBProcessInfo to wrap lldb_private::ProcessInstanceInfo, and add SBProcess::GetProcessInfo() to retrieve info like parent ID, group ID, user ID etc. from a live process. Differential Revision: https://reviews.llvm.org/D35881 llvm-svn: 309664
* Implementation of remote packets for Trace data.Ravitheja Addepally2017-05-261-3/+2
| | | | | | | | | | | | | | | | | | Summary: The changes consist of new packets for trace manipulation and trace collection. The new packets are also documented. The packets are capable of providing custom trace specific parameters to start tracing and also retrieve such configuration from the server. Reviewers: clayborg, lldb-commits, tberghammer, labath, zturner Reviewed By: clayborg, labath Subscribers: krytarowski, lldb-commits Differential Revision: https://reviews.llvm.org/D32585 llvm-svn: 303972
* Rename Error -> Status.Zachary Turner2017-05-121-4/+4
| | | | | | | | | | | | | | | 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
* Be a little more permissive in DynamicLoaderMacOS::CanLoadImageJim Ingham2017-05-061-2/+14
| | | | | | | | | | | | | If we can't find the "is dyld locked" symbol, assume it is safe to load the image unless we only have 1 image loaded - in which case we are in _dyld_start and it is definitely NOT safe. Also add a little better errors to that function, and better logging in SBProcess.cpp. <rdar://problem/30174817> llvm-svn: 302327
* Initial implementation of SB APIs for Tracing support.Ravitheja Addepally2017-04-261-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces new SB APIs for tracing support inside LLDB. The idea is to gather trace data from LLDB and provide it through this APIs to external tools integrating with LLDB. These tools will be responsible for interpreting and presenting the trace data to their users. The patch implements the following new SB APIs -> -> StartTrace - starts tracing with given parameters -> StopTrace - stops tracing. -> GetTraceData - read the trace data . -> GetMetaData - read the meta data assosciated with the trace. -> GetTraceConfig - read the trace configuration Tracing is associated with a user_id that is returned by the StartTrace API and this id needs to be used for accessing the trace data and also Stopping the trace. The user_id itself may map to tracing the complete process or just an individual thread. The APIs require an additional thread parameter when the user of these APIs wishes to perform thread specific manipulations on the tracing instances. The patch also includes the corresponding python wrappers for the C++ based APIs. Reviewers: k8stone, lldb-commits, clayborg Reviewed By: clayborg Subscribers: jingham, mgorny Differential Revision: https://reviews.llvm.org/D29581 llvm-svn: 301389
* Move Log from Core -> Utility.Zachary Turner2017-03-031-1/+1
| | | | | | | | | 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
* Move classes from Core -> Utility.Zachary Turner2017-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This moves the following classes from Core -> Utility. ConstString Error RegularExpression Stream StreamString The goal here is to get lldbUtility into a state where it has no dependendencies except on itself and LLVM, so it can be the starting point at which to start untangling LLDB's dependencies. These are all low level and very widely used classes, and previously lldbUtility had dependencies up to lldbCore in order to use these classes. So moving then down to lldbUtility makes sense from both the short term and long term perspective in solving this problem. Differential Revision: https://reviews.llvm.org/D29427 llvm-svn: 293941
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-1467/+1228
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Add StructuredData plugin type; showcase with new DarwinLog featureTodd Fiala2016-08-191-3/+28
| | | | | | | | | | | | Take 2, with missing cmake line fixed. Build tested on Ubuntu 14.04 with clang-3.6. See docs/structured_data/StructuredDataPlugins.md for details. differential review: https://reviews.llvm.org/D22976 reviewers: clayborg, jingham llvm-svn: 279202
* Revert "Add StructuredData plugin type; showcase with new DarwinLog feature"Todd Fiala2016-08-191-28/+3
| | | | | | This reverts commit 1d885845d1451e7b232f53fba2e36be67aadabd8. llvm-svn: 279200
* Add StructuredData plugin type; showcase with new DarwinLog featureTodd Fiala2016-08-191-3/+28
| | | | | | | | | See docs/structured_data/StructuredDataPlugins.md for details. differential review: https://reviews.llvm.org/D22976 reviewers: clayborg, jingham llvm-svn: 279198
* Add MemoryRegionInfo to SB APIHoward Hellyer2016-06-231-0/+74
| | | | | | | | | | | | | | | | | | | Summary: This adds new SB API calls and classes to allow a user of the SB API to obtain a full list of memory regions accessible within the process. Adding this to the API makes it possible use the API for tasks like scanning memory for blocks allocated with a header and footer to track down memory leaks, otherwise just inspecting every address is impractical especially for 64 bit processes. These changes only add the API itself and a base implementation of GetMemoryRegions() to lldb_private::Process::GetMemoryRegions. I will submit separate patches to fill in lldb_private::Process::GetMemoryRegionInfoList and GetMemoryRegionInfo for individual platforms. The original discussion about this is here: http://lists.llvm.org/pipermail/lldb-dev/2016-May/010203.html Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20565 llvm-svn: 273547
* Make sure to try and take the process stop lock when calling:Greg Clayton2016-05-261-6/+11
| | | | | | | | | | | uint32_t SBProcess::GetNumQueues(); SBQueue SBProcess::GetQueueAtIndex (size_t index); Otherwise this code will run when the process is running and cause problems. <rdar://problem/26482744> llvm-svn: 270803
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-191-34/+34
| | | | llvm-svn: 270024
* Fix -Wformat-pedantic warningHans Wennborg2016-01-131-1/+2
| | | | | | | | | | /work/llvm-3.8/llvm.src/tools/lldb/source/API/SBProcess.cpp:1003:73: error: format specifies type 'void *' but the argument has type 'lldb_private::Event *' [-Werror,-Wformat-pedantic] log->Printf ("SBProcess::%s (event.sp=%p) => %d", __FUNCTION__, event.get(), ret_val); ~~ ^~~~~~~~~~~ 1 error generated. llvm-svn: 257692
* Add logging to SBProcess::GetRestartedFromEventPavel Labath2016-01-051-1/+8
| | | | llvm-svn: 256853
* Add a new option to Platform::LoadImage to install the imageTamas Berghammer2015-12-081-2/+13
| | | | | | | | | | | | | | | | | | | | | This change introduce 3 different working mode for Platform::LoadImage depending on the file specs specified. * If only a remote file is specified then the remote file is loaded on the target (same behavior as before) * If only a local file is specified then the local file is installed to the current working directory and then loaded from there. * If both local and remote file is specified then the local file is installed to the specified location and then loaded from there. The same options are exposed on the SB API with a new method LoadImage method while the old signature presers its meaning. On the command line the installation of the shared library can be specified with the "--install" option of "process load". Differential revision: http://reviews.llvm.org/D15152 llvm-svn: 255014
* Fix "process load/unload" on androidTamas Berghammer2015-12-021-2/+4
| | | | | | | | | | | On android the symbols exposed by libdl (dlopen, dlclose, dlerror) prefixed by "__dl_". This change moves the handling of process load/unload to the platform object and override it for android to handle the special prefix. Differential revision: http://reviews.llvm.org/D11465 llvm-svn: 254504
* Enable saving of mini dumps with lldb process save-core.Adrian McCarthy2015-11-201-0/+25
| | | | | | | | Also adds SB API to save a core and tests that use it. Differential Revision: http://reviews.llvm.org/D14793 llvm-svn: 253734
* Revert "FOO"Adrian McCarthy2015-11-201-25/+0
| | | | | | | | Accidentally commited before I was done. This reverts commit 2ec2da4ee52780582d5e9c88b2e982a688fbdbe1. llvm-svn: 253685
* FOOAdrian McCarthy2015-11-201-0/+25
| | | | llvm-svn: 253684
* Fix typos.Bruce Mitchener2015-09-221-1/+1
| | | | | | | | | | | | Summary: Another round of minor typo fixes. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13026 llvm-svn: 248243
* Refactor Unix signals.Chaoren Lin2015-07-141-7/+3
| | | | | | | | | | | | | | | | | | Summary: - Consolidate Unix signals selection in UnixSignals. - Make Unix signals available from platform. - Add jSignalsInfo packet to retrieve Unix signals from remote platform. - Get a copy of the platform signal for each remote process. - Update SB API for signals. - Update signal utility in test suite. Reviewers: ovyalov, clayborg Subscribers: chaoren, jingham, labath, emaste, tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D11094 llvm-svn: 242101
* Refactor many file functions to use FileSpec over strings.Chaoren Lin2015-05-291-5/+5
| | | | | | | | | | | | | | | | | Summary: This should solve the issue of sending denormalized paths over gdb-remote if we stick to GetPath(false) in GDBRemoteCommunicationClient, and let the server handle any denormalization. Reviewers: ovyalov, zturner, vharron, clayborg Reviewed By: clayborg Subscribers: tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D9728 llvm-svn: 238604
* Don't #include "lldb-python.h" from anywhere.Zachary Turner2015-05-291-2/+0
| | | | | | | | | | | | | Since interaction with the python interpreter is moving towards being more isolated, we won't be able to include this header from normal files anymore, all includes of it should be localized to the python library which will live under source/bindings/API/Python after a future patch. None of the files that were including this header actually depended on it anyway, so it was just a dead include in every single instance. llvm-svn: 238581
* Fix handling of hijacked events in synchronous modeIlia K2015-05-201-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch includes the following changes: * Fix Target::Launch to handle hijacked event in synchronous mode * Improve MiStartupOptionsTestCase tests to expect *stopped (MI) * Add SBProcess::GetStopEventForStopID * Add ProcessModID::SetStopEventForLastNaturalStopID/GetStopEventForStopID * Add const qualifier to ProcessModID::GetLastNaturalStopID * Add SBProcess::GetStopEventForStopID * Don't broadcast hijacked event in Target::Launch * Add CMICmnLLDBDebugger::CheckIfNeedToRebroadcastStopEvent/RebroadcastStopEvent Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/startup_options/ Reviewers: zturner, jingham, clayborg, abidh Reviewed By: clayborg Subscribers: abidh, zturner, lldb-commits, clayborg, jingham Differential Revision: http://reviews.llvm.org/D9371 llvm-svn: 237781
* Fix a reason of *stopped notifications due to SIGINT/SIGSTOP signals (MI)Ilia K2015-05-151-0/+6
| | | | | | | | | | | | | # Add SBProcess::GetInterruptedFromEvent # Add vrEvent arg in CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateStopped and CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal # Refactor CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal ## Clean up and fix typos ## Remove vwrbShouldBrk arg # Fix MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_{local,remote} to expect SIGSTOP instead of SIGINT llvm-svn: 237426
* Add a "force_kill" arg to Process::Destroy(). This is needed afterJason Molenda2015-04-171-2/+2
| | | | | | | | | | | | | | | | | | the changes in r233255/r233258. Normally if lldb attaches to a running process, when we call Process::Destroy, we want to detach from the process. If lldb launched the process itself, ::Destroy should kill it. However, if we attach to a process and the driver calls SBProcess::Kill() (which calls Destroy), we need to kill it even if we didn't launch it originally. The force_kill param allows for the SBProcess::Kill method to force the behavior of Destroy. <rdar://problem/20424439> llvm-svn: 235158
* Compare pointers directly instead of ::strcmp in SBXxx::EventIsXxxEvent()Ilia K2015-03-211-1/+1
| | | | llvm-svn: 232892
* Lock mutex in the same order.Hafiz Abid Qadeer2015-02-111-2/+2
| | | | | | | | | | | | SBProcess uses 2 mutexex; RunLock and APILock. Apart from 2 places, RunLock is locked before API lock. I have fixed the 2 places where order was different. I observed a deadlock due to this different order in lldb-mi once. Although lldb-mi command and event thread dont run at the same time now. So it can not deadlock there but can still be problem for some other clients. Pre-approved by Greg in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-February/006509.html llvm-svn: 228844
OpenPOWER on IntegriCloud