summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/InstrumentationRuntime
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB] Fix more -Wdocumentation issues (NFC)Jonas Devlieghere2019-11-141-7/+7
|
* [LLDB] Fix another set of -Wdocumentation warningsJonas Devlieghere2019-11-131-1/+1
| | | | | At this point I'm just fixing issues as I see them pop up locally in incremental builds.
* remove File::SetStream(), make new files instead.Lawrence D'Anna2019-09-273-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch removes File::SetStream() and File::SetDescriptor(), and replaces most direct uses of File with pointers to File. Instead of calling SetStream() on a file, we make a new file and replace it. My ultimate goal here is to introduce a new API class SBFile, which has full support for python io.IOStream file objects. These can redirect read() and write() to python code, so lldb::Files will need a way to dispatch those methods. Additionally it will need some form of sharing and assigning files, as a SBFile will be passed in and assigned to the main IO streams of the debugger. In my prototype patch queue, I make File itself copyable and add a secondary class FileOps to manage the sharing and dispatch. In that case SBFile was a unique_ptr<File>. (here: https://github.com/smoofra/llvm-project/tree/files) However in review, Pavel Labath suggested that it be shared_ptr instead. (here: https://reviews.llvm.org/D67793) In order for SBFile to use shared_ptr<File>, everything else should as well. If this patch is accepted, I will make SBFile use a shared_ptr I will remove FileOps from future patches and use subclasses of File instead. Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67891 llvm-svn: 373090
* Revert "[TSanRuntime] Upstream thread swift race detector."Davide Italiano2019-08-292-35/+6
| | | | | | Sometimes it's easier to resolve merge conflict than arguing. llvm-svn: 370385
* [TSanRuntime] Upstream thread swift race detector.Davide Italiano2019-08-292-6/+35
| | | | | | | | | | | | | | | | | | | Summary: This is self-contained, and doesn't need anything in the compiler to work. Mainly to reduce the diff between upstream and downstream. Patch by Kuba Mracek! Reviewers: kubamracek Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66915 llvm-svn: 370286
* [Process] Remove unused field from HistoryThreadAlex Langford2019-06-193-12/+4
| | | | | | | | | | | | | | Summary: These fields are unused and have been since their inception, from what I can tell. Reviewers: compnerd, JDevlieghere, davide, labath Subscribers: kubamracek, lldb-commits Differential Revision: https://reviews.llvm.org/D63357 llvm-svn: 363881
* [lldb] NFC modernize codebase with modernize-use-nullptrKonrad Kleine2019-05-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix file names in file headers. NFCFangrui Song2019-05-133-3/+3
| | | | llvm-svn: 360554
* Unify random timeouts throughout LLDB and make them configurable.Adrian Prantl2019-04-053-6/+3
| | | | | | | | | | | | | | | | | Since these timeouts guard against catastrophic error in debugserver, I also increased all of them to the maximum value among them. The motivation for this test was the observation that an asanified LLDB would often exhibit seemingly random test failures that could be traced back to debugserver packets getting out of sync. With this path applied I can no longer reproduce the one particular failure mode that I was investigating. rdar://problem/49441261 Differential Revision: https://reviews.llvm.org/D60340 llvm-svn: 357829
* Use std::make_shared in LLDB (NFC)Jonas Devlieghere2019-02-113-3/+9
| | | | | | | | | | | Unlike std::make_unique, which is only available since C++14, std::make_shared is available since C++11. Not only is std::make_shared a lot more readable compared to ::reset(new), it also performs a single heap allocation for the object and control block. Differential revision: https://reviews.llvm.org/D57990 llvm-svn: 353764
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-198-32/+24
| | | | | | | | | | | | | | | | | 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
* Remove header grouping comments.Jonas Devlieghere2018-11-112-8/+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
* Remove append parameter to FindGlobalVariablesPavel Labath2018-05-311-1/+1
| | | | | | | | | | | | | | | | | | | Summary: As discussed in https://bugs.llvm.org/show_bug.cgi?id=37317, FindGlobalVariables does not properly handle the case where append=false. As this doesn't seem to be used in the tree, this patch removes the parameter entirely. Reviewers: clayborg, jingham, labath Reviewed By: clayborg Subscribers: aprantl, lldb-commits, kubamracek, JDevlieghere Differential Revision: https://reviews.llvm.org/D46885 Patch by Tom Tromey <ttromey@mozilla.com>. llvm-svn: 333639
* Reflow paragraphs in comments.Adrian Prantl2018-04-303-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Upstreaming a patch from Github: When evaluation user expressions, ignore ↵Kuba Mracek2017-07-134-2/+16
| | | | | | InstrumentationRuntime breakpoints. (#235) llvm-svn: 307881
* Update message that Main Thread Checker produces.Kuba Mracek2017-07-081-1/+1
| | | | llvm-svn: 307464
* Move StructuredData from Core to UtilityPavel Labath2017-06-274-4/+4
| | | | | | | | | | | | | | | | Summary: It had a dependency on StringConvert and file reading code, which is not in Utility. I've replaced that code by equivalent llvm operations. I've added a unit test to demonstrate that parsing a file still works. Reviewers: zturner, jingham Subscribers: kubamracek, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D34625 llvm-svn: 306394
* Shorten sanitizer plugin namesPavel Labath2017-06-2610-15/+15
| | | | | | | | | | | | | | | | | | | | | | | Summary: The new UndefinedBehaviorSanitizer plugin was breaking file path length limits, because it's (fairly long name) appears multiple times in the path. Cmake ends up putting the object file at path tools/lldb/source/Plugins/InstrumentationRuntime/UndefinedBehaviorSanitizer/CMakeFiles/lldbPluginInstrumentationRuntimeUndefinedBehaviorSanitizer.dir/UndefinedBehaviorSanitizerRuntime.cpp.obj which is 191 characters long and very dangerously close to the 260 character path limit on windows systems (also, just the include line for that file was breaking the 80 character line limit). This renames the sanitizer plugins to use shorter names (asan, ubsan, tsan). I think this will still be quite understandable to everyone as those are the names everyone uses to refer to them anyway. Reviewers: zturner, kubamracek, jingham Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D34553 llvm-svn: 306278
* Fix the CMake files for the new InstrumentationRuntime plugins.Kuba Mracek2017-06-162-2/+22
| | | | llvm-svn: 305594
* Upstreaming the UndefinedBehaviorSanitizerRuntime and ↵Kuba Mracek2017-06-169-12/+758
| | | | | | MainThreadCheckerRuntime plugins. llvm-svn: 305589
* Rename Error -> Status.Zachary Turner2017-05-122-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
* ThreadSanitizer plugin: match for loop variable with expected typeEd Maste2017-04-221-1/+1
| | | | | | | | Removes Clang warning ThreadSanitizerRuntime.cpp:591:21: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] llvm-svn: 301067
* ThreadSanitizer plugin: Support Swift access races and fix how external ↵Kuba Mracek2017-04-162-17/+39
| | | | | | races are displayed. llvm-svn: 300416
* [lldb] Add support for "external" reports in ThreadSanitizer LLDB pluginKuba Mracek2017-02-161-2/+31
| | | | | | | | TSan now has the ability to report races on "external" object, i.e. any library class/object that has read-shared write-exclusive threading semantics. The detection and reporting work almost out of the box, but TSan can now provide the type of the object (as a string). This patch implements this into LLDB. Differential Revision: https://reviews.llvm.org/D30024 llvm-svn: 295342
* Move classes from Core -> Utility.Zachary Turner2017-02-022-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 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
* [CMake] [1/4] Update a batch of pluginsChris Bieneman2017-01-312-2/+21
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293698
* Stop limiting the number of TSan backtrace size to 8Kuba Mracek2017-01-101-1/+2
| | | | | | | | We currently limit the length of TSan returned backtraces to 8, which is not necessary (and a bug, most likely). Let's remove this. Differential Revision: https://reviews.llvm.org/D28035 llvm-svn: 291522
* Use Timeout<> in EvaluateExpressionOptions classPavel Labath2016-12-062-4/+4
| | | | llvm-svn: 288797
* Support more report types in AddressSanitizerRuntime.cpp, re-word existing ones.Kuba Mracek2016-12-021-26/+41
| | | | | | | | In r288065, we added more report types into ASan that will be reported via the debugging API. This patch in LLDB provides human-friendly bug descriptions. This also improves wording on existing bug descriptions. Differential Revision: https://reviews.llvm.org/D27017 llvm-svn: 288535
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-022-2/+2
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Make lldb::Regex use StringRef.Zachary Turner2016-09-212-2/+3
| | | | | | | | | | This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-064-937/+1079
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* [InstrumentationRuntime] Refactor the API (Part 2/N) (NFCI)Vedant Kumar2016-08-114-87/+39
| | | | | | | | | Factor out some common logic used to find the runtime library in a list of modules. Differential Revision: https://reviews.llvm.org/D23150 llvm-svn: 278368
* [InstrumentationRuntime] Refactor the API (Part 1/N) (NFCI)Vedant Kumar2016-08-114-87/+20
| | | | | | | | | | | | | | | | | Adapters for instrumentation runtimes have to do two basic things: 1) Load a runtime library. 2) Install breakpoints in that library. This logic is duplicated in the adapters for asan and tsan. Factor it out and document bits of it to make it easier to add new adapters. I tested this with check-lldb, and double-checked testcases/functionalities/{a,t}san. Differential Revision: https://reviews.llvm.org/D23043 llvm-svn: 278367
* [asan] Remove unused include (NFC)Vedant Kumar2016-08-051-1/+0
| | | | llvm-svn: 277837
* [asan] Remove unused #include (NFC)Vedant Kumar2016-08-011-1/+0
| | | | llvm-svn: 277359
* [lldb][tsan] Perform one map lookup instead of two (NFC)Vedant Kumar2016-08-011-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D22983 llvm-svn: 277350
* [lldb][tsan] Avoid a string copy (NFC)Vedant Kumar2016-08-011-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D22984 llvm-svn: 277347
* In AddressSanitizer and ThreadSanitizer, let's explicitly set the language ↵Kuba Brecka2016-07-062-0/+3
| | | | | | of the expression we're evaluating. llvm-svn: 274621
* [tsan] Prefer mangled name looking up variable declaration for racy addressDevin Coughlin2016-06-011-1/+1
| | | | | | | | | | | | | | | | For Thread Sanitizer reports, LLDB tries to find a global variable declaration corresponding to the racy address in order to provide a filename and line number. This commit changes the lookup of the variable to use the mangled name for lookup and fall back to the demangled version if unavailable. This is needed to report locations of races on Swift global variables. I've also added a test to make sure we look up C++ globals correctly. rdar://problem/26459401 Differential Revision: http://reviews.llvm.org/D20760 llvm-svn: 271433
* Reword the "Happened at" TSan-reported thread to contain a thread id.Kuba Brecka2016-05-241-2/+5
| | | | llvm-svn: 270608
* Improve wording in TSan reports involving global variables. Don't repeat ↵Kuba Brecka2016-05-242-12/+43
| | | | | | hex addresses that are the same. llvm-svn: 270588
* Reword ThreadSanitizer messages to use a lowercase 't' in thread names when ↵Kuba Brecka2016-05-221-5/+5
| | | | | | in the middle of a sentence. llvm-svn: 270365
* Reword ThreadSanitizer message for invalid mutex reports.Kuba Brecka2016-05-221-1/+1
| | | | llvm-svn: 270364
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-191-2/+2
| | | | llvm-svn: 270024
* Improve wording and capitalization of TSan thread names.Kuba Brecka2016-05-011-7/+7
| | | | llvm-svn: 268193
* Provide location information (file name, line number) in TSan reports about ↵Kuba Brecka2016-04-282-3/+45
| | | | | | global variables. llvm-svn: 267894
* Renumber ThreadSanitizer-provided thread IDs to match LLDB thread numbers.Kuba Brecka2016-04-221-17/+47
| | | | llvm-svn: 267133
* Provide more information in ThreadSanitizer's JSON data. Move remaining ↵Kuba Brecka2016-04-102-19/+275
| | | | | | TSan logic from SBThread to InstrumentationRuntime plugin. llvm-svn: 265905
* Tentative fix (add `extern "C"` declarations to expression prefix) and ↵Kuba Brecka2016-04-071-5/+13
| | | | | | printing evaluation errors for AddressSanitizer (both MemoryHistoryASan.cpp and AddressSanitizerRuntime.cpp). Hopefully this will make the ASan testcases pass or at least the failure should be easier to diagnose. llvm-svn: 265651
OpenPOWER on IntegriCloud