summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix build after rL270009Tamas Berghammer2016-05-191-1/+0
| | | | llvm-svn: 270040
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-1984-1050/+999
| | | | llvm-svn: 270024
* Check that __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ is definedJason Molenda2016-05-191-1/+1
| | | | | | | before comparing the value of it. <rdar://problem/26333564> llvm-svn: 270015
* Fix error propagation from the Z0 packet in gdb-remote breakpoint setting.Jim Ingham2016-05-192-3/+94
| | | | | | | | | | | | | The error was not getting propagated to the caller, so the higher layers thought the breakpoint was successfully set & resolved. I added a testcase, but it assumes 0x0 is not a valid place to set a breakpoint. On most systems that is true, but if it isn't true of your system, either find another good place and add it to the test, or x-fail the test. <rdar://problem/26345962> llvm-svn: 270014
* Fix an issue where debugserver would not properly vend OS version ↵Enrico Granata2016-05-181-7/+5
| | | | | | | | | | | information on iOS devices The __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED macro is only defined on OS X, so the check as written compiled the code out for iOS The right thing to do is compile the code out for older OSX versions, but leave iOS alone rdar://26333564 llvm-svn: 270004
* Fix standalone LLDB build, when LLVM/Clang were built with ↵Eugene Zelenko2016-05-181-1/+19
| | | | | | | | | | LLVM_INSTALL_TOOLCHAIN_ONLY=ON. Fix standalone build with CMake 2.8.12.2. Differential revision: http://reviews.llvm.org/D20344 llvm-svn: 269996
* xfail TestTopLevelExprs for arm and aarch64 linuxOmair Javaid2016-05-181-0/+1
| | | | | | | | | TestTopLevelExprs fails on arm and aarch64 linux similar to behaviour on android. A bug exists here: llvm.org/pr27787. This patch marks xfail on arm and aarch64. llvm-svn: 269980
* remove use of Mutex in favour of std::{,recursive_}mutexSaleem Abdulrasool2016-05-18139-1806/+1680
| | | | | | | | | | 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
* xfail TestWatchLocation.py for arm-linux targetsOmair Javaid2016-05-171-0/+1
| | | | | | | | TestWatchLocation.py fails on arm-linux target due to unicode error in lldb testsuite. This is a known issue and same test fails on OS X with similar reason. I have reported a bug and marked this test as xfail for arm-linux targets. llvm-svn: 269860
* Allow custom formatting of session log file names.Zachary Turner2016-05-176-12/+34
| | | | | | Differential Revision: http://reviews.llvm.org/D20306 llvm-svn: 269793
* xfail TestTopLevelExprs for Android API 21-22 (llvm.org/pr27787)Tamas Berghammer2016-05-171-2/+4
| | | | llvm-svn: 269759
* Look for CMake.app when searching for cmakeTodd Fiala2016-05-161-0/+18
| | | | | | | | | | | | | | On OS X systems, look for /Applications/CMake.app and ~/Applications/CMake.app versions of the cmake command line binary when trying harder to find a cmake not on the system path. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20303 llvm-svn: 269713
* Make sure we notify that the section module was loaded when ↵Greg Clayton2016-05-161-5/+30
| | | | | | | | SBTarget::SetSectionLoadAddress() is called. Also make sure that the section module is unloaded when SBTarget::ClearSectionLoadAddress() or SBTarget::ClearModuleLoadAddress() is called. <rdar://problem/25119335> llvm-svn: 269707
* Fixed and re-enabled the Clang modules testcase.Sean Callanan2016-05-161-3/+2
| | | | | | | Macros work again after Clang r269554. This testcase just needed some small tweaks to get it going again. llvm-svn: 269704
* Test diamond virtual inheritance in top-level expressions.Sean Callanan2016-05-161-1/+45
| | | | llvm-svn: 269698
* Don't crash when OS plug-in returns None from any of the functions we might ↵Greg Clayton2016-05-161-16/+24
| | | | | | | | call. <rdar://problem/24489419> llvm-svn: 269686
* Make LLDB print out an explicit marker when it's displaying formatters that ↵Enrico Granata2016-05-162-1/+5
| | | | | | | | are part of a disabled category Fixes rdar://26202006 llvm-svn: 269673
* Bump up adb timeout morePavel Labath2016-05-161-1/+1
| | | | | | still seeing very rare timeouts on the buildbot. llvm-svn: 269648
* Xfail TestCrashDuringStep and TestCreateDuringInstructionStep on arm-linuxOmair Javaid2016-05-162-0/+2
| | | | | | | Both of above tests fail on arm and bugs have been reported on android already. Adding arm-linux decorator because android decorator doesnt xfail these test when run on linux. llvm-svn: 269647
* Remove Mutex from NativeProcessLinuxPavel Labath2016-05-162-20/+1
| | | | | | | | NPL now assumes it is running from a single thread now, so its thread-safety is untested anyway (and if that assumption is broken, we'll have bigger problems (due to ptrace restrictions) than a couple of missing mutexes). llvm-svn: 269640
* test: remove use of undefined variablesSaleem Abdulrasool2016-05-161-2/+1
| | | | | | | | The variables referenced in the print message are not defined. Simply state that the requisite script is not found. Correct grammar to indicate that the tests are rather likely to fail rather than unlikely to fail. llvm-svn: 269628
* test: add missing splatSaleem Abdulrasool2016-05-161-1/+1
| | | | | | | | The parameter here is a list, not a string. Ensure that the we splat the list into arguments prior to invoke os.path.join. This would previously fail with a `startswith` is not a member of `list`. llvm-svn: 269627
* test: add missing parameterSaleem Abdulrasool2016-05-161-1/+1
| | | | | | | Add the missing required parameter to the function. This permits tests to get a bit further before failing. llvm-svn: 269626
* Symbol: fix -Wcovered-switch warningSaleem Abdulrasool2016-05-151-101/+107
| | | | | | | Add the Float128 type to the enumeration. Float128 is covered under IEEE754 as a quad precision floating point value. llvm-svn: 269599
* Fix a few -Wformat-pedantic warningsSaleem Abdulrasool2016-05-152-3/+3
| | | | | | Clean up some newly introduced -Wformat-pedantic warnings (%p expects a void *). llvm-svn: 269598
* [LLDB] Adding lldb_private namespace to DiagnosticSeverity. NFC.Renato Golin2016-05-141-1/+1
| | | | | | | | This is a fix due to the addition of the new DiagnosticSeverity in LLVMContext.h. This may warrant a change in name to be LLDB specific but I leave that to the LLDB experts to refactor. llvm-svn: 269562
* surface build error content through test event systemTodd Fiala2016-05-148-21/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: print build errors nicely in test output This test infrastructure change adds a new Python exception for test subject builds that fail. The output of the build command is captured and propagated to both the textual test output display code and to the test event system. The ResultsFormatter objects have been modified to do something more useful with this information. The xUnit formatter now replaces the non-informative Python build error stacktrace with the build error content. The curses ResultsFormatter prints a 'B' for build errors rather than 'E'. The xUnit output, in particular, makes it much easier for developers to track down test subject build errors that cause test failures when reports come in from CI. Reviewers: granata.enrico Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20252 llvm-svn: 269525
* test infra: catch bad decorators and import-time errorsTodd Fiala2016-05-1311-67/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change enhances the LLDB test infrastructure to convert load-time exceptions in a given Python test module into errors. Before this change, specifying a non-existent test decorator, or otherwise having some load-time error in a python test module, would not get flagged as an error. With this change, typos and other load-time errors in a python test file get converted to errors and reported by the test runner. This change also includes test infrastructure tests that include covering the new work here. I'm going to wait until we have these infrastructure tests runnable on the main platforms before I try to work that into all the normal testing workflows. The test infrastructure tests can be run by using the standard python module testing practice of doing the following: cd packages/Python/lldbsuite/test_event python -m unittest discover -s test/src -p 'Test*.py' Those tests run the dotest inferior with a known broken test and verify that the errors are caught. These tests did not pass until I modified dotest.py to capture them properly. @zturner, if you have the chance, if you could try those steps above (the python -m unittest ... line) on Windows, that would be great if we can address any python2/3/Windows bits there. I don't think there's anything fancy, but I didn't want to hook it into test flow until I know it works there. I'll be slowly adding more tests that cover some of the other breakage I've occasionally seen that didn't get collected as part of the summarization. This is the biggest one I'm aware of. Reviewers: zturner, labath Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D20193 llvm-svn: 269489
* Clean up test results on Windows.Zachary Turner2016-05-1312-9/+19
| | | | | | | | | Remove XFAIL from some tests that now pass. Add XFAIL to some tests that now fail. Fix a crasher where a null pointer check isn't guarded. Properly handle all types of errors in SymbolFilePDB. llvm-svn: 269454
* Disable HostThread::Cancel assertion on FreeBSDEd Maste2016-05-131-0/+2
| | | | | | | It is still used by ProcessMonitor::StopMonitoringChildProcess and ProcessMonitor::StopOpThread. llvm-svn: 269434
* Remove unused variableEd Maste2016-05-131-2/+1
| | | | llvm-svn: 269421
* Remove ASTContexts from SystemInitializerCommonPavel Labath2016-05-131-8/+0
| | | | | | | | | | | | | | | | | | Summary: The AST contexts are not needed in the server components, and the clang context in particular pulls in large parts of clang into the binary. Simply removing these two calls reduces the lldb-server size by about 50%--80%, depending on the architecture and build type. This should not impact the client parts as the same calls are already present in SystemInitializerFull. Reviewers: tberghammer, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20236 llvm-svn: 269416
* [LLDB][MIPS] Provide ABI string to compiler for appropriate code generation ↵Sagar Thakur2016-05-132-2/+43
| | | | | | | | | | | | | for MIPS Patch by Nitesh Jain. Summary: These patch will set clang::TargetOptions::ABI and accordingly code will be generated for MIPS target. Reviewers: ovyalov, clayborg Subscribers: lldb-commits, mohit.bhakkad, sagar, jaydeep, bhushan Differential: D18638 llvm-svn: 269407
* Add a check for version 15 of the shared cache formatEnrico Granata2016-05-121-1/+1
| | | | | | <rdar://problem/26207478> llvm-svn: 269378
* Fix some long standing issues that caused tests to be flaky. Greg Clayton2016-05-1210-216/+323
| | | | | | | | | | | | | | | | | | The main issues were: - Listeners recently were converted over to used by getting a shared pointer to a listener. And when they listened to broadcasters they would get a strong reference added to them meaning the listeners would never go away. This caused memory usage to increase and would cause performance issue if many steps were done. - The lldb_private::Process private state thread had an issue where if a "stop" contol signal was attempted to be sent to that thread, it could end up not responding in 2 seconds and end up getting cancelled which might cause us to cancel a thread that had a mutex locked and it would deadlock the test. This change makes broadcasters hold onto weak references to listeners. It also fixes some bad threading code that had races inside of it by making the m_events_mutex be non-recursive and getting rid of fragile use of a Predicate<bool> to say that new events are available, and replacing it with using the m_events_mutex with a new m_events_condition to control access to the events in a safer way. The private state thread now uses a safer way to communicate that the control event has been received by the private state thread: it makes a EventDataReceipt instance that it attaches to the event that sends the control to the private state thread and used this to synchronize the fact that the private state thread has received the event instead of using a Predicate<bool> to convey the info. When the signal event is received, it will pull the event off of the queue in the private state thread and cause the EventData::DoOnRemoval() to be called, which will signal that the event has been received. This cleans up the signal delivery notification so it doesn't rely on a member variable of the process class to convey the info. std::shared_ptr<EventDataReceipt> event_receipt_sp(new EventDataReceipt()); m_private_state_control_broadcaster.BroadcastEvent(signal, event_receipt_sp); <rdar://problem/26256353> Listeners are being kept around longer than they should be due to recent changs <rdar://problem/26256258> Private process state thread can be cancelled and cause deadlocks in test suite llvm-svn: 269377
* Don't crash when a process' task port goes bad.Greg Clayton2016-05-121-1/+0
| | | | | | <rdar://problem/26256049> llvm-svn: 269373
* Fix libstdc++ failure where <atomic> is not able to be imported on Darwin ↵Greg Clayton2016-05-123-6/+10
| | | | | | | | systems. The adding of <atomic> to test_common.h broke 12 tests on Darwin. We work around this by not including <atomic> when building on darwin for libstdc++ tests. llvm-svn: 269372
* Added missing makefile from patch D19124 (should fix the corresponding ↵Cameron Desrochers2016-05-121-0/+5
| | | | | | commit rL269340) llvm-svn: 269366
* [LLDB] Added support for PHI nodes to IR interpreterMarianne Mailhot-Sarrasin2016-05-125-2/+122
| | | | | | | | | | This allows expressions such as 'i == 1 || i == 2` to be executed using the IR interpreter, instead of relying on JIT code injection (which may not be available on some platforms). Patch by cameron314 Differential Revision: http://reviews.llvm.org/D19124 llvm-svn: 269340
* Add CMake bits necessary for standalone buildKamil Rytarowski2016-05-122-49/+66
| | | | | | | | | | | | Summary: Developed on NetBSD with pkgsrc. Reviewers: zturner, labath Subscribers: jevinskie, zturner, tfiala, Eugene.Zelenko, artagnon, joerg, lldb-commits Differential Revision: http://reviews.llvm.org/D15067 llvm-svn: 269332
* Turn on LLDB_EDITLINE_USE_WCHAR on NetBSDKamil Rytarowski2016-05-121-2/+3
| | | | | | | | | | | | Summary: The editline(3) library in NetBSD is by default internally wide. Reviewers: clayborg, emaste Subscribers: joerg, lldb-commits Differential Revision: http://reviews.llvm.org/D20188 llvm-svn: 269330
* Fix a race in ProcessGDBRemote::MonitorDebugServerProcessPavel Labath2016-05-122-69/+42
| | | | | | | | | | | | | | | | | | | | | | Summary: MonitorDebugServerProcess went to a lot of effort to make sure its asynchronous invocation does not cause any mischief, but it was still not race-free. Specifically, in a quick stop-restart sequence (like the one in TestAddressBreakpoints) the copying of the process shared pointer via target_sp->GetProcessSP() was racing with the resetting of the pointer in DeleteCurrentProcess, as they were both accessing the same shared_ptr object. To avoid this, I simply pass in a weak_ptr to the process when the callback is created. Locking this pointer is race-free as they are two separate object even though they point to the same process instance. This also removes the need for the complicated tap-dance around retrieving the process pointer. Reviewers: clayborg Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D20107 llvm-svn: 269281
* Keep original source path and mapped path in LineEntryTed Woodward2016-05-1110-33/+57
| | | | | | | | | | | | | | | | | Summary: The "file" variable in a LineEntry was mapped using target.source-map, except when stepping through inlined code. This patch adds a new variable to LineEntry, "original_file", that contains the original file from the debug info. "file" will continue to (possibly) be mapped. Some code has been changed to use "original_file". This is code dealing with symbols. Code dealing with source files will still use "file". Reviewers, please confirm that these particular changes are correct. Tests run on Ubuntu 12.04 show no regression. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20135 llvm-svn: 269250
* Generalize child process monitoring functionsPavel Labath2016-05-1123-165/+95
| | | | | | | | | | | | | | | | | | | | | | Summary: This replaces the C-style "void *" baton of the child process monitoring functions with a more C++-like API taking a std::function. The motivation for this was that it was very difficult to handle the ownership of the object passed into the callback function -- each caller ended up implementing his own way of doing it, some doing it better than others. With the new API, one can just pass a smart pointer into the callback and all of the lifetime management will be handled automatically. This has enabled me to simplify the rather complicated handshake in Host::RunShellCommand. I have left handling of MonitorDebugServerProcess (my original motivation for this change) to a separate commit to reduce the scope of this change. Reviewers: clayborg, zturner, emaste, krytarowski Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20106 llvm-svn: 269205
* Xfail failing watchpoint tests on aarch64-linuxOmair Javaid2016-05-115-0/+6
| | | | | | | | Some watchpoint tests fail on aarch64-linux as it lacks support for intalling watchpoints which are not alligned at 8bytes boundary. Marking them as xfail for now. llvm-svn: 269187
* [LLDB][MIPS] Setting appropriate ArchSpec::m_flags based on ABISagar Thakur2016-05-113-8/+44
| | | | | | | | | | | Patch by Nitesh Jain. Summary: The ArchSpec::m_flags will be set based on ELF flag ABI. Reviewers: ovyalov, clayborg Subscribers: lldb-commits, mohit.bhakkad, sagar, jaydeep, bhushan Differential: D18858 llvm-svn: 269181
* Rewriting TestMultithreaded.py to solve flakyness on LinuxRavitheja Addepally2016-05-112-29/+18
| | | | | | | | | | | | | | | | | Summary: test_listener_event_process_state checks for Threads and Frames in the multithreaded_queue. The listener_func has more computational load, which may be latter executed than the pop leading to the failure. This patch tries to only check for frames in listener_func as presence of frames also confirms prescence of threads and avoids the second push into the multithreaded_queue. Reviewers: lldb-commits, clayborg, labath Differential Revision: http://reviews.llvm.org/D20091 llvm-svn: 269168
* Corrected aarch64 register no in TestBreakpointConditions.pyOmair Javaid2016-05-111-1/+1
| | | | | | | Test uses x1 in breakpoint expression while objdump shows that x1 is never used in the code and may have random values. Using x0 make sure that we are using a registe that will have a positive value and breakpoint expression will evaluate true atleast once. llvm-svn: 269164
* In some cases, type lookup has to deal with situations where it cannot ↵Enrico Granata2016-05-101-1/+23
| | | | | | | | | | reconstruct a compile unit or a function, but it still has a valid symbol - and it can use that in order to figure out the preferential language for lookups This is not the right thing for all clients (notably the expression parser), so put it in type lookup specific code Fixes rdar://problem/22422313 llvm-svn: 269095
* Fix logging in Listener.cppPavel Labath2016-05-101-4/+6
| | | | | | | | | | Clear() log message was claiming it was the destructor, which had me very confused when looking at the log messages. Fix the message, and add a log message to the real destructor. Also noticed that the destructor was needlessly locking the broadcaster mutex (as Clear was locking it again anyway), so remove that as well. llvm-svn: 269058
OpenPOWER on IntegriCloud