aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SBThread.cpp
AgeCommit message (Collapse)AuthorFilesLines
2022-01-09[lldb] Remove LLDB_RECORD_RESULT macroJonas Devlieghere1-37/+33
2022-01-09[lldb] Remove reproducer instrumentationJonas Devlieghere1-108/+1
This patch removes most of the reproducer instrumentation. It keeps around the LLDB_RECORD_* macros for logging. See [1] for more details. [1] https://lists.llvm.org/pipermail/lldb-dev/2021-September/017045.html Differential revision: https://reviews.llvm.org/D116847
2022-01-02[API] Remove redundant member initialization (NFC)Kazu Hirata1-1/+1
Identified with readability-redundant-member-init.
2021-11-11[lldb][NFC] Inclusive Language: rename master plan to controlling planQuinn Pham1-3/+3
[NFC] As part of using inclusive language within the llvm project, this patch renames master plan to controlling plan in lldb. Reviewed By: jingham Differential Revision: https://reviews.llvm.org/D113019
2021-05-04[lldb] Refactor argument group by SourceLocationSpec (NFCI)Med Ismail Bennani1-4/+5
This patch refactors a good part of the code base turning the usual FileSpec, Line, Column, CheckInlines, ExactMatch arguments into a SourceLocationSpec object. This change is required for a following patch that will add handling of the column line information when doing symbol resolution. Differential Revision: https://reviews.llvm.org/D100965 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-04-24[lldb] [gdb-remote server] Introduce new stop reasons for fork and vforkMichał Górny1-0/+14
Introduce three new stop reasons for fork, vfork and vforkdone events. This includes server support for serializing fork/vfork events into gdb-remote protocol. The stop infos for the two base events take a pair of PID and TID for the newly forked process. Differential Revision: https://reviews.llvm.org/D100196
2021-03-30[trace][intel-pt] Implement trace start and trace stopWalter Erquinigo1-0/+2
This implements the interactive trace start and stop methods. This diff ended up being much larger than I anticipated because, by doing it, I found that I had implemented in the beginning many things in a non optimal way. In any case, the code is much better now. There's a lot of boilerplate code due to the gdb-remote protocol, but the main changes are: - New tracing packets: jLLDBTraceStop, jLLDBTraceStart, jLLDBTraceGetBinaryData. The gdb-remote packet definitions are quite comprehensive. - Implementation of the "process trace start|stop" and "thread trace start|stop" commands. - Implementaiton of an API in Trace.h to interact with live traces. - Created an IntelPTDecoder for live threads, that use the debugger's stop id as checkpoint for its internal cache. - Added a functionality to stop the process in case "process tracing" is enabled and a new thread can't traced. - Added tests I have some ideas to unify the code paths for post mortem and live threads, but I'll do that in another diff. Differential Revision: https://reviews.llvm.org/D91679
2020-04-20[lldb/Reproducers] Fix passive replay for (char*, size_t) functions.Jonas Devlieghere1-3/+3
Several SB API functions return strings using (char*, size_t) output arguments. During capture, we serialize an empty string for the char* because the memory can be uninitialized. During active replay, we have custom replay redirects that ensure that we don't override the buffer from which we're reading, but rather write to a buffer on the heap with the given length. This is sufficient for the active reproducer use case, where we only care about the side effects of the API calls, not the values actually returned. This approach does not not work for passive replay because here we ignore all the incoming arguments, and re-execute the current function with the arguments deserialized from the reproducer. This means that these function will update the deserialized copy of the arguments, rather than whatever was passed in by the SWIG wrapper. To solve this problem, this patch extends the reproducer instrumentation to handle this special case for passive replay. We nog ignore the replayer in the registry and the incoming char pointer, and instead reinvoke the current method on the deserialized class, and populate the output argument. Differential revision: https://reviews.llvm.org/D77759
2020-03-02[lldb/API] NFC: Reformat and simplify SBThread::GetStopDescription()Fred Riss1-87/+15
Summary: This gets rid of some nesting and of the raw char* variable that caused the memory management bug we hit recently. This commit also removes the fallback code which should trigger when the StopInfo provides no stop description. All currently implemented StopInfos have a `GetDescription()` method that shouldn't return an empty description. Reviewers: JDevlieghere, labath, mib Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74157
2020-02-17[lldb] Replace empty ctor en dtor bodies with =default (NFC)Jonas Devlieghere1-1/+1
Use = default instead of empty constructor and destructor bodies in the API layer.
2020-02-06[lldb/Reproducers] Refactor GetStopReasonExtendedBacktraces (NFC)Jonas Devlieghere1-5/+5
Refactore GetStopReasonExtendedBacktraces so that the reproducer macro is passed an instrumented copy constructor rather than the constructor taking a ThreadCollectionSP, which is not instrumented.
2020-02-06[lldb/Target] Add Assert StackFrame RecognizerMed Ismail Bennani1-2/+5
When a thread stops, this checks depending on the platform if the top frame is an abort stack frame. If so, it looks for an assert stack frame in the upper frames and set it as the most relavant frame when found. To do so, the StackFrameRecognizer class holds a "Most Relevant Frame" and a "cooked" stop reason description. When the thread is about to stop, it checks if the current frame is recognized, and if so, it fetches the recognized frame's attributes and applies them. rdar://58528686 Differential Revision: https://reviews.llvm.org/D73303 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-02-05[lldb/Reproducers] Serialize empty string for char* methods.Jonas Devlieghere1-10/+7
For the methods taking a char* and a length that have a custom replayer, ignore the incoming string in the instrumentation macro. This prevents potentially reading garbage and blowing up the SB API log.
2020-02-05[lldb/Reproducers] Implement custom replayers for (char *, size_t)Jonas Devlieghere1-3/+2
Some SB API methods returns strings through a char* and a length. This is a problem for the deserializer, which considers a single type at a time, and therefore cannot know how many bytes to allocate for the character buffer. We can solve this problem by implementing a custom replayer, which ignores the passed-in char* and allocates a buffer of the correct size itself, before invoking the original API method or function. This patch adds three new macros to register a custom replayer for methods that take a char* and a size_t. It supports arbitrary return values (some functions return a bool while others return a size_t).
2020-02-05Revert "[lldb/Target] Add Assert StackFrame Recognizer"Pavel Labath1-2/+1
This reverts commit 2b7f32892b76cdfbe075300a5bf4a52e1b674bc7 because of test failures due to dangling pointers.
2020-02-06[lldb/API] Fix non null-terminated stop-reason in SBThread::GetStopDescriptionMed Ismail Bennani1-1/+1
When trying to get the stop reason description using the SB API, the buffer fetched was not null-terminated causing failures on the sanitized bot. This patch should address those failures. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-02-05[lldb/Target] Add Assert StackFrame RecognizerMed Ismail Bennani1-1/+2
When a thread stops, this checks depending on the platform if the top frame is an abort stack frame. If so, it looks for an assert stack frame in the upper frames and set it as the most relavant frame when found. To do so, the StackFrameRecognizer class holds a "Most Relevant Frame" and a "cooked" stop reason description. When the thread is about to stop, it checks if the current frame is recognized, and if so, it fetches the recognized frame's attributes and applies them. rdar://58528686 Differential Revision: https://reviews.llvm.org/D73303 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-01-30[lldb/Reproducers] Use LLDB_RECORD_DUMMY for GetStopDescriptionJonas Devlieghere1-1/+1
GetStopDescription writes to a const char* with a given length. However, the reproducer instrumentation serialized the char pointer and length separately. To serialize the string, we naively look for the first null byte to determine its length. This can lead to the method overwriting the input buffer when the assumed string length is smaller than the actual number of bytes written by GetStopDescription. The real solution is to have a custom serializer that takes both arguments into account. However, given that these are output parameters, they don't affect replay. If the string is passed as input later, it's is recorded as such. Therefore I've replaced the instrumentation macro with LLDB_RECORD_DUMMY which skips the serialization.
2020-01-28Revert "[lldb/Target] Add Assert StackFrame Recognizer"Med Ismail Bennani1-2/+1
This reverts commit 03a6b858fde5c644ec16b1fddd8e10aa9ef3f0ad. The test doesn't pass on Debian.
2020-01-28[lldb/Target] Add Assert StackFrame RecognizerMed Ismail Bennani1-1/+2
When a thread stops, this checks depending on the platform if the top frame is an abort stack frame. If so, it looks for an assert stack frame in the upper frames and set it as the most relavant frame when found. To do so, the StackFrameRecognizer class holds a "Most Relevant Frame" and a "cooked" stop reason description. When the thread is about to stop, it checks if the current frame is recognized, and if so, it fetches the recognized frame's attributes and applies them. rdar://58528686 Differential Revision: https://reviews.llvm.org/D73303 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-01-24[lldb][NFC] Fix all formatting errors in .cpp file headersRaphael Isemann1-1/+1
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-12-04[lldb] Remove FileSpec(FileSpec*) constructorPavel Labath1-1/+1
This constructor was the cause of some pretty weird behavior. Remove it, and update all code to properly dereference the argument instead.
2019-11-28[lldb] NFC: refactor CompileUnit::ResolveSymbolContextKonrad Kleine1-3/+4
Summary: I found the above named method hard to read because it had a) many nested blocks, b) one return statement at the end with some logic involved, c) a duplicated while-loop with just small differences in it. I decided to refactor this function by employing an early exit strategy. In order to capture the logic in the return statement and to not have it repeated more than once I chose to implement a very small lamda function that captures all the variables it needs. I also replaced the two while-loops with just one. This is a non-functional change (NFC). Reviewers: jdoerfert, teemperor Reviewed By: teemperor Subscribers: labath, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70774
2019-11-28Revert "[lldb] NFC: refactor CompileUnit::ResolveSymbolContext"Raphael Isemann1-4/+3
This reverts commit 373e2a4f69d623e59329ff801f261d8b299e12d2. This broke breakpoint setting.
2019-11-28[lldb] NFC: refactor CompileUnit::ResolveSymbolContextKonrad Kleine1-3/+4
Summary: I found the above named method hard to read because it had a) many nested blocks and b) one return statement at the end with some logic involved. I decided to refactor this function by employing an early exit strategy. In order to capture the logic in the return statement and to not have it repeated more than once I chose to implement a very small lamda function that captures all the variables it needs. This is a non-functional change (NFC). Reviewers: jdoerfert Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70774
2019-10-03Pass an SBStructuredData to scripted ThreadPlans on use.Jim Ingham1-2/+23
This will allow us to write reusable scripted ThreadPlans, since you can use key/value pairs with known keys in the plan to parametrize its behavior. Differential Revision: https://reviews.llvm.org/D68366 llvm-svn: 373675
2019-05-23[lldb] NFC modernize codebase with modernize-use-nullptrKonrad Kleine1-11/+11
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-04-10[NFC] Remove ASCII lines from commentsJonas Devlieghere1-6/+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
2019-04-09Remove unneeded #ifdef SWIGsPavel Labath1-14/+2
Summary: Some of these were present in files which should never be read by swig (and we also had one in the interface file, which is only read by swig). They are probably leftovers from the time when we were running swig over lldb headers directly. While writing this patch, I noticed that some of the #ifdefs were guarding public functions that were operating on lldb_private data types. While it wasn't strictly necessary for this patch, I made these private, as nobody should really be accessing them. This can potentially break existing code if it happened to use these methods, though it will only break at build time -- if someone builds against an old header, he should still be able to link to a new lldb library, since the functions are still there. We could keep these public for backward compatbility, but I would argue that if anyone was actually using these functions for anything, his code is already broken. Reviewers: JDevlieghere, clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60400 llvm-svn: 357984
2019-04-09Get the run locker before you ask if your thread is valid.Jim Ingham1-3/+3
I have occasional crashes coming from SBThread::GetExtendedBacktraceThread. The symptom is that we got true back from HasThreadScope - so we should have a valid live thread, but then when we go to use the thread, it is not good anymore and we crash. I can't spot any obvious cause for this crash, but in looking for same I noticed that in the current code we check that the thread is valid, THEN we take the stop locker. We really should do that in the other order, and ensure that the process will stay stopped before we check our thread is still good. That's what this patch does. <rdar://problem/47478205> llvm-svn: 357963
2019-04-03[Reproducers] Capture return values of functions returning by ptr/refJonas Devlieghere1-7/+5
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
2019-03-19[lldb] [Reproducer] Move SBRegistry registration into declaring filesMichal Gorny1-0/+108
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
2019-03-11Add "operator bool" to SB APIsPavel Labath1-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
2019-03-07[SBAPI] Log from record macroJonas Devlieghere1-288/+0
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
2019-03-06[Reproducers] Add SBReproducer macrosJonas Devlieghere1-35/+214
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
2019-03-06[SBAPI] Don't check IsValid in constructorJonas Devlieghere1-13/+13
When running the test suite with the instrumentation macros, I noticed two lldb-mi tests regressed. The issue was the copy constructor of SBLineEntry. Without the macros the returned value would be elided, but with the macros the copy constructor was called. The latter using ::IsValid to determine whether the underlying opaque pointer should be set. This is likely a remnant of when ::IsValid would only check the validity of the smart pointer. In SBLineEntry however, it actually forwards to LineEntry::IsValid(). So what happened here was that because of the macros the copy constructor was called. The opaque pointer was valid but the LineEntry didn't consider itself valid. So the copied-to object ended up default initialized. This patch replaces all checks for IsValid in copy (assignment) constructors with checks for the opaque pointer itself. Differential revision: https://reviews.llvm.org/D58946 llvm-svn: 355458
2019-02-11Use std::make_shared in LLDB (NFC)Jonas Devlieghere1-1/+3
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
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-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
2018-12-20[lldb] Retrieve currently handled Obj-C exception via ↵Kuba Mracek1-2/+1
__cxa_current_exception_type and add GetCurrentExceptionBacktrace SB ABI This builds on https://reviews.llvm.org/D43884 and https://reviews.llvm.org/D43886 and extends LLDB support of Obj-C exceptions to also look for a "current exception" for a thread in the C++ exception handling runtime metadata (via call to __cxa_current_exception_type). We also construct an actual historical SBThread/ThreadSP that contains frames from the backtrace in the Obj-C exception object. The high level goal this achieves is that when we're already crashed (because an unhandled exception occurred), we can still access the exception object and retrieve the backtrace from the throw point. In Obj-C, this is particularly useful because a catch+rethrow is very common and in those cases you currently don't have any access to the throw point backtrace. Differential Revision: https://reviews.llvm.org/D44072 llvm-svn: 349718
2018-12-15Simplify Boolean expressionsJonas Devlieghere1-2/+2
This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command: run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD Differential revision: https://reviews.llvm.org/D55584 llvm-svn: 349215
2018-11-28[lldb] Add GetCurrentException APIs to SBThread, add frame recognizer for ↵Kuba Mracek1-0/+15
objc_exception_throw for Obj-C runtimes This adds new APIs and a command to deal with exceptions (mostly Obj-C exceptions): SBThread and Thread get GetCurrentException API, which returns an SBValue/ValueObjectSP with the current exception for a thread. "Current" means an exception that is currently being thrown, caught or otherwise processed. In this patch, we only know about the exception when in objc_exception_throw, but subsequent patches will expand this (and add GetCurrentExceptionBacktrace, which will return an SBThread/ThreadSP containing a historical thread backtrace retrieved from the exception object. Currently unimplemented, subsequent patches will implement this). Extracting the exception from objc_exception_throw is implemented by adding a frame recognizer. This also add a new sub-command "thread exception", which prints the current exception. Differential Revision: https://reviews.llvm.org/D43886 llvm-svn: 347813
2018-11-15Add setting to require hardware breakpoints.Jonas Devlieghere1-40/+58
When debugging read-only memory we cannot use software breakpoint. We already have support for hardware breakpoints and users can specify them with `-H`. However, there's no option to force LLDB to use hardware breakpoints internally, for example while stepping. This patch adds a setting target.require-hardware-breakpoint that forces LLDB to always use hardware breakpoints. Because hardware breakpoints are a limited resource and can fail to resolve, this patch also extends error handling in thread plans, where breakpoints are used for stepping. Differential revision: https://reviews.llvm.org/D54221 llvm-svn: 346920
2018-08-07Move RegisterValue,Scalar,State from Core to UtilityPavel Labath1-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
2018-06-20Improve SBThread's stepping API using SBError parameter.Alexander Polyakov1-95/+148
Summary: The new methods will allow to get error messages from stepping API. Reviewers: aprantl, clayborg, labath, jingham Reviewed By: aprantl, clayborg, jingham Subscribers: apolyakov, labath, jingham, clayborg, lemo, lldb-commits Differential Revision: https://reviews.llvm.org/D47991 llvm-svn: 335180
2018-04-30Reflow paragraphs in comments.Adrian Prantl1-6/+3
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 StructuredData from Core to UtilityPavel Labath1-1/+1
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
2017-06-16Upstreaming the UndefinedBehaviorSanitizerRuntime and ↵Kuba Mracek1-4/+0
MainThreadCheckerRuntime plugins. llvm-svn: 305589
2017-05-29Added new API to SBStructuredData classAbhishek Aggarwal1-5/+6
Summary: - Added API to access data types -- integer, double, array, string, boolean and dictionary data types -- Earlier user had to parse through the string output to get these values - Added Test cases for API testing - Added new StructuredDataType enum in public include file -- Replaced locally-defined enum in StructuredData.h with this new one -- Modified other internal files using this locally-defined enum Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: clayborg, lldb-commits Reviewed By: clayborg Subscribers: labath Differential Revision: https://reviews.llvm.org/D33434 llvm-svn: 304138
2017-05-12Update StructuredData::String to return StringRefs.Zachary Turner1-1/+1
It was returning const std::string& which was leading to unnecessary copies all over the place, and preventing people from doing things like Dict->GetValueForKeyAsString("foo", ref); llvm-svn: 302875
2017-05-12Rename Error -> Status.Zachary Turner1-1/+1
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