summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/InstrumentationRuntime
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the ThreadSanitizer support to avoid creating empty SBThreads and to not ↵Kuba Brecka2016-03-301-1/+1
| | | | | | crash when thread_id is unavailable. Plus a whitespace fix. llvm-svn: 264854
* Fix warning in ThreadSanitizerRuntimePavel Labath2016-03-301-1/+1
| | | | llvm-svn: 264849
* Figure out what the fixed expression is, and print it. Added another target ↵Jim Ingham2016-03-291-1/+6
| | | | | | | | | | | | | setting to quietly apply fixits for those who really trust clang's fixits. Also, moved the retry into ClangUserExpression::Evaluate, where I can make a whole new ClangUserExpression to do the work. Reusing any of the parts of a UserExpression in situ isn't supported at present. <rdar://problem/25351938> llvm-svn: 264793
* Add ThreadSanitizer debugging support.Kuba Brecka2016-03-234-0/+646
| | | | | | | | | | | | This patch adds ThreadSanitizer support into LLDB: - Adding a new InstrumentationRuntime plugin, ThreadSanitizerRuntime, in the same way ASan is implemented. - A breakpoint stops in `__tsan_on_report`, then we extract all sorts of information by evaluating an expression. We then populate this into StopReasonExtendedInfo. - SBThread gets a new API, SBThread::GetStopReasonExtendedBacktraces(), which returns TSan’s backtraces in the form of regular SBThreads. Non-TSan stop reasons return an empty collection. - Added some test cases. Reviewed by Greg Clayton. llvm-svn: 264162
* This change introduces a "ExpressionExecutionThread" to the ThreadList. Jim Ingham2016-03-121-1/+1
| | | | | | | | | | | | | | | | | | | Turns out that most of the code that runs expressions (e.g. the ObjC runtime grubber) on behalf of the expression parser was using the currently selected thread. But sometimes, e.g. when we are evaluating breakpoint conditions/commands, we don't select the thread we're running on, we instead set the context for the interpreter, and explicitly pass that to other callers. That wasn't getting communicated to these utility expressions, so they would run on some other thread instead, and that could cause a variety of subtle and hard to reproduce problems. I also went through the commands and cleaned up the use of GetSelectedThread. All those uses should have been trying the thread in the m_exe_ctx belonging to the command object first. It would actually have been pretty hard to get misbehavior in these cases, but for correctness sake it is good to make this usage consistent. <rdar://problem/24978569> llvm-svn: 263326
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-14/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* The ASAN report fetching code had two latent bugs:Jim Ingham2016-01-151-2/+9
| | | | | | | | | | | | 1) It was forward declaring functions without 'extern "C"'. That used to work but only because of another bug in how we passes symbol only function names to the compiler and stopped working recently. 2) These forward declarations were in the body of the User Expression, and they actually need to go in the prefix file. <rdar://problem/24177689> llvm-svn: 257852
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-211-17/+23
| | | | | | | | source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13916 llvm-svn: 250872
* [cmake] Remove LLVM_NO_RTTI.Bruce Mitchener2015-09-031-2/+0
| | | | | | | | | | | | | | Summary: This doesn't exist in other LLVM projects any longer and doesn't do anything. Reviewers: chaoren, labath Subscribers: emaste, tberghammer, lldb-commits, danalbert Differential Revision: http://reviews.llvm.org/D12586 llvm-svn: 246749
* Stop objects from keeping a strong reference to the process when they should ↵Greg Clayton2015-08-312-25/+46
| | | | | | have a weak reference. llvm-svn: 246488
* Improve check for ASAN callbacksTamas Berghammer2015-08-121-8/+5
| | | | | | | | | | | The ASAN callbacks are public symbols so we can search for them with reading only the symbol table (not the debug info). Whit this change the attach time for big executables with debug symbols decreased by a factor of ~4. Differential revision: http://reviews.llvm.org/D11384 llvm-svn: 244739
* Resubmitting 240466 after fixing the linux test suite failures.Greg Clayton2015-06-251-2/+2
| | | | | | | | | | | | | | | A few extras were fixed - Symbol::GetAddress() now returns an Address object, not a reference. There were places where people were accessing the address of a symbol when the symbol's value wasn't an address symbol. On MacOSX, undefined symbols have a value zero and some places where using the symbol's address and getting an absolute address of zero (since an Address object with no section and an m_offset whose value isn't LLDB_INVALID_ADDRESS is considered an absolute address). So fixing this required some changes to make sure people were getting what they expected. - Since some places want to access the address as a reference, I added a few new functions to symbol: Address &Symbol::GetAddressRef(); const Address &Symbol::GetAddressRef() const; Linux test suite passes just fine now. <rdar://problem/21494354> llvm-svn: 240702
* Fixed an issue with expressions that define types in the expression. We must ↵Greg Clayton2015-05-211-19/+27
| | | | | | | | currently touch the members of the struct in the right order or our ClangASTImporter::DeportType() will copy the resulting type into the target AST incorrectly. This is a work around for <rdar://problem/21049838> which the copy type issue so that it doesn't happen. <rdar://problem/20902950> llvm-svn: 237865
* Since the asan report function doesn't gather bp or sp, Jim Ingham2015-05-201-0/+4
| | | | | | | | | don't put those values in the Structured Data we make up from the report. <rdar://problem/21038887> llvm-svn: 237824
* Further reduce header footprint of Debugger.h.Zachary Turner2015-03-041-0/+1
| | | | llvm-svn: 231202
* Change AddressSanitzierRuntime to print its info message viaJason Molenda2014-12-091-14/+28
| | | | | | | | the Debugger's output stream instead of logging to the module. http://reviews.llvm.org/D6577 llvm-svn: 223826
* LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and ↵Kuba Brecka2014-10-105-0/+406
report data extraction Reviewed at http://reviews.llvm.org/D5592 This patch gives LLDB some ability to interact with AddressSanitizer runtime library, on top of what we already have (historical memory stack traces provided by ASan). Namely, that's the ability to stop on an error caught by ASan, and access the report information that are associated with it. The report information is also exposed into SB API. More precisely this patch... adds a new plugin type, InstrumentationRuntime, which should serve as a generic superclass for other instrumentation runtime libraries, these plugins get notified when modules are loaded, so they get a chance to "activate" when a specific dynamic library is loaded an instance of this plugin type, AddressSanitizerRuntime, which activates itself when it sees the ASan dynamic library or founds ASan statically linked in the executable adds a collection of these plugins into the Process class AddressSanitizerRuntime sets an internal breakpoint on __asan::AsanDie(), and when this breakpoint gets hit, it retrieves the report information from ASan this breakpoint is then exposed as a new StopReason, eStopReasonInstrumentation, with a new StopInfo subclass, InstrumentationRuntimeStopInfo the StopInfo superclass is extended with a m_extended_info field (it's a StructuredData::ObjectSP), that can hold arbitrary JSON-like data, which is the way the new plugin provides the report data the "thread info" command now accepts a "-s" flag that prints out the JSON data of a stop reason (same way the "-j" flag works now) SBThread has a new API, GetStopReasonExtendedInfoAsJSON, which dumps the JSON string into a SBStream adds a test case for all of this I plan to also get rid of the original ASan plugin (memory history stack traces) and use an instance of AddressSanitizerRuntime for that purpose. Kuba llvm-svn: 219546
OpenPOWER on IntegriCloud