summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb] [test] Mark more tests flakey on NetBSDMichal Gorny2019-03-112-0/+2
| | | | llvm-svn: 355838
* [lldb] [test] Mark a few tests flakey on NetBSDMichal Gorny2019-03-117-0/+9
| | | | llvm-svn: 355830
* Attempt to fix MSVC build error after r355824Pavel Labath2019-03-111-8/+9
| | | | | | | Adding parens should be enough to fix the "'operator bool': is ambiguous or is not a member of 'lldb::SBFoo'" errors. llvm-svn: 355827
* Add "operator bool" to SB APIsPavel Labath2019-03-11168-18/+551
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix invalid use of StringRef::data in Socket::DecodeHostAndPortPavel Labath2019-03-111-5/+3
| | | | | | | | | | | | the input StringRef is not guaranteed to be null-terminated, so using data to get the c string is wrong. Luckily, in two of the usages the target function already accepts a StringRef so we can just drop the data() call, and the third one is easily replaced by a stringref-aware function. Issue found by msan. llvm-svn: 355817
* Quiet command regex instructions during batch executionDave Lee2019-03-1013-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Within .lldbinit, regex commands can be structured as a list of substitutions over multiple lines. It's possible that this is uninentional, but it works and has benefits. For example: command regex <command-name> s/pat1/repl1/ s/pat2/repl2/ ... I use this form of `command regex` in my `~/.lldbinit`, because it makes it clearer to write and read compared to a single line definition, because multiline substitutions don't need to be quoted, and are broken up one per line. However, multiline definitions result in usage instructions being printed for each use. The result is that every time I run `lldb`, I get a dozen or more lines of noise. With this change, the instructions are only printed when `command regex` is invoked interactively, or from a terminal, neither of which are true when lldb is sourcing `~/.lldbinit`. Reviewers: clayborg, jingham Reviewed By: clayborg Subscribers: jdoerfert, kastiglione, xiaobai, keith, lldb-commits Differential Revision: https://reviews.llvm.org/D48752 llvm-svn: 355793
* [lldb] [test] Make 2lwp_process_SIGSEGV test more portableMichal Gorny2019-03-104-5/+8
| | | | | | | | | | Fix 2lwp_process_SIGSEGV NetBSD core test to terminate inside regular function rather than libc call, in order to get reproducible backtrace on different platforms. Differential Revision: https://reviews.llvm.org/D59177 llvm-svn: 355786
* [lldb] [test] Adjust XFAIL list to match buildbot resultsMichal Gorny2019-03-099-10/+2
| | | | | | | | Adjust the XFAIL-ing tests to match consistent results from buildbot. I'm going to work on differences between them and my local results following this. llvm-svn: 355774
* Actually implement the TestQueues.py workaroundFrederic Riss2019-03-091-5/+4
| | | | | | | | The code commited in r355764 didn't do what I want as I typed GetThreadID instead of GetQueueID. This commit contains a (hopefully) better version of the workaround. llvm-svn: 355766
* Try to workaround the TestQueues.py flakynessFrederic Riss2019-03-091-0/+5
| | | | | | | | This is not a fix, but if I understand enough of the issue, it should bail out early of the test when in a situation that would result in a failure down the road. llvm-svn: 355764
* Break cycle lldb/Commands [3->] lldb/Expression [1->] lldb/CommandsJonas Devlieghere2019-03-093-21/+31
| | | | | | | | | | Inspired by Zachary's mail on lldb-dev, this seemed like low hanging fruit. This patch breaks the circular dependency between commands and expression. Differential revision: https://reviews.llvm.org/D59158 llvm-svn: 355762
* Add parens to force the order of operations in an expression tryingJason Molenda2019-03-091-1/+1
| | | | | | | | | | | to do "databuffer + offset" so that we don't overflow the uint64_t's we're using for addresses when working with high addresses. Found with clang's ubsan while doing darwin kernel debugging. <rdar://problem/48728940> llvm-svn: 355761
* [lldb] [test] Skip broken NetBSD core testMichal Gorny2019-03-081-0/+1
| | | | | | | Apparently the problem is harder than anticipated. Skip the test for now to fix buildbots. llvm-svn: 355750
* [lldb] [test] Do not check libc function names in NetBSD core testMichal Gorny2019-03-081-1/+1
| | | | | | | | | Fix the NetBSD core test not to verify libc function names in backtrace. This obviously requires the same libc.so as originally used to produce the core file, and so it is going to fail everywhere except on my system. llvm-svn: 355747
* [lldb] [Process] Add proper support for NetBSD core files with threadsMichal Gorny2019-03-0813-30/+507
| | | | | | | | | | | | | | Improve the support for processing NetBSD cores. Fix reading process identifier, thread information and associating the terminating signal with the correct thread. Includes test cases for single-threaded program receiving SIGSEGV, and two dual-threaded programs: one where thread receives the signal, and the other one when the whole process is signalled. Differential Revision: https://reviews.llvm.org/D32149 llvm-svn: 355736
* Remove dependency edges from Host to Target/Core.Zachary Turner2019-03-082-2/+0
| | | | | | After recent changes, Host is now dependency-free. llvm-svn: 355730
* [Reproducers] Add missing LLDB_RECORD_DUMMY macrosJonas Devlieghere2019-03-0812-13/+111
| | | | | | | Re-ran lldb-inst on the API folder to insert missing LLDB_RECORD_DUMMY macros. llvm-svn: 355711
* [lldb-instr] Support LLDB_RECORD_DUMMYJonas Devlieghere2019-03-085-13/+34
| | | | | | | Extend lldb-instr to insert LLDB_RECORD_DUMMY macros for currently unsupported signatures (void and function pointers). llvm-svn: 355710
* [Reproducers] Add LLDB_RECORD_DUMMYJonas Devlieghere2019-03-082-3/+14
| | | | | | | | | | | | | Add a macro that doesn't actually record anything but still toggles the API boundary. Removing just the register macros for lldb::thread_t wasn't sufficient on NetBSD because the serialization logic needed the underlying type to be complete. This macro should be used by functions that are currently unsupported, as they might trip the API boundary logic. This should be easy using the lldb-instr tool. llvm-svn: 355709
* [lldb-vscode] Fix warningJonas Devlieghere2019-03-081-2/+2
| | | | | | | | I changed the variable to an unsigned to get rid of a signed and unsigned compare without realizing the value could be negative. This fixes the assert instead. llvm-svn: 355708
* Add more logging to TestQueues.pyFrederic Riss2019-03-081-2/+4
| | | | | | | | | The last round of logging taught us that when the test fails, lldb is indeed aware of the thread it's failing to associate to a given queue. Add more logging to try to figure out why the thread and the queue do not appear related to the Queue APIs. llvm-svn: 355706
* Make function definition in header inlineBenjamin Kramer2019-03-081-9/+9
| | | | | | | Otherwise including this header from more than one place will break linking. llvm-svn: 355684
* Add ASAN llvm build directory variants toJason Molenda2019-03-081-0/+3
| | | | | | get_llvm_bin_dirs(). llvm-svn: 355661
* [Reproducers] TestImagineList.test -> TestImageList.testJonas Devlieghere2019-03-081-0/+1
| | | | | | And run the actual binary so we load the shared libraries. llvm-svn: 355658
* [Reproducers] Mark partial specialization as inlineJonas Devlieghere2019-03-081-1/+2
| | | | | | | | | The overload and/or template specialization are regular functions and should be marked inline when implemented in the header. Writing the previous commit message should've made that obvious but I was already overthinking it. This will fix the windows bot. llvm-svn: 355657
* [lldb-vscode] Report an error if an invalid program is specified.Zachary Turner2019-03-082-97/+104
| | | | | | | | | | | | | | | Previously if an invalid program was specified, there was a bug which, when we attempted to launch the program, would report that the operation succeeded, causing LLDB to then hang while waiting indefinitely to receive some events from the process. After this patch, when an invalid program is specified, we immediately return to vs code with an error message that indicates that the program can not be found. Differential Revision: https://reviews.llvm.org/D59114 llvm-svn: 355656
* [Reproducers] Use partial template specialization instead of overloadJonas Devlieghere2019-03-071-1/+3
| | | | | | | Not sure if this is what's causing MSVC to claim the function to be already defined elsewhere, but worth a shot. llvm-svn: 355654
* Make bytes_read an unsignedJonas Devlieghere2019-03-071-1/+1
| | | | llvm-svn: 355651
* Remove unused functionJonas Devlieghere2019-03-071-6/+0
| | | | llvm-svn: 355650
* [SBAPI] Log from record macroJonas Devlieghere2019-03-0739-3032/+124
| | | | | | | | | | | | | | | | 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
* Fix TestPaths.py on windowsAlex Langford2019-03-072-11/+2
| | | | | | | | | | | | I committed an implementation of GetClangResourceDir on windows but forgot to update this test. I merged the tests like I intended to, but I realized that the test was actually failing. After looking into it, it appears that FileSystem::Resolve was taking the path and setting the FileSpec's Directory to "/path/to/lldb/lib/clang/" and the File to "9.0.0" which isn't what we want. So I removed the resolve line from DefaultComputeClangResourceDir. llvm-svn: 355648
* Add logging to TestQueues.pyFrederic Riss2019-03-071-0/+20
| | | | | | | In an attempt to understand why the test is still failing after r355555, add some logging. llvm-svn: 355647
* Fix TestAppleSimulatorOSType.py with Xcode 10.2Frederic Riss2019-03-071-1/+3
| | | | | | | It looks like the simctl tool shipped in Xcode10.2 changed the format of its json output. llvm-svn: 355644
* [testsuite] Recommit the TestTerminal directory.Davide Italiano2019-03-071-0/+111
| | | | | | | Turns out this is actually testing that editline doesn't screw up the terminal. llvm-svn: 355640
* [lldb-vscode] Support running in server mode on Windows.Zachary Turner2019-03-077-86/+278
| | | | | | | | | | | | | | | | Windows can't use standard i/o system calls such as read and write to work with sockets, it instead needs to use the specific send and recv calls. This complicates matters for the debug adapter, since it needs to be able to work in both server mode where it communicates over a socket, as well as non-server mode where it communicates via stdin and stdout. To abstract this out, I've introduced a class IOStream which hides all these details and exposes a read/write interface that does the right on each platform. Differential Revision: https://reviews.llvm.org/D59104 llvm-svn: 355637
* Add an LLVM-style dump method to CompilerType for extra convenience during ↵Adrian Prantl2019-03-075-0/+39
| | | | | | | | | | debugging This change has no effect on Release (NoAsserts) builds. Differential Revision: https://reviews.llvm.org/D59102 llvm-svn: 355632
* [ExpressionParser] Implement ComputeClangResourceDir for WindowsAlex Langford2019-03-077-55/+41
| | | | | | | | | | | | | | | | Summary: This function is useful for expression evaluation, especially when doing swift debugging on windows. Reviewers: aprantl, labath Reviewed By: labath Subscribers: teemperor, jdoerfert, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D59072 llvm-svn: 355631
* [lldb] Fix DW_OP_addrx uses.Ali Tamur2019-03-075-3/+81
| | | | | | | | | | | | | | | | Summary: DW_OP_GNU_addr_index has been renamed as DW_OP_addrx in the standard. clang produces DW_OP_addrx tags and with this change lldb starts to process them. Reviewers: aprantl, jingham, davide, clayborg, serge-sans-paille Reviewed By: aprantl Subscribers: jdoerfert, dblaikie, labath, shafik, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D59004 llvm-svn: 355629
* [testsuite] Spring cleaning: this tests `stty`, not `lldb`.Davide Italiano2019-03-071-111/+0
| | | | llvm-svn: 355615
* [testsuite] Drop characters that can't be decoded, restoring parity with Py2.Davide Italiano2019-03-071-0/+3
| | | | | | | Tests that check the output of `memory find` may trip over unreadable characters, and in Python 3 this is an error. llvm-svn: 355612
* Fix TestDataFormatter.test uninitialized variableJan Kratochvil2019-03-073-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After D55626 I see a failure in my Fedora buildbot. There is uninitialized variable as the Foo constructor has not been run and foo is an autovariable. (lldb) breakpoint set -f foo.cpp -l 11 Breakpoint 1: where = TestDataFormatter.test.tmp.out`main + 30 at foo.cpp:11:7, address = 0x000000000040112e (lldb) run Process 801065 stopped * thread #1, name = 'TestDataFormatt', stop reason = breakpoint 1.1 frame #0: 0x000000000040112e TestDataFormatter.test.tmp.out`main(argc=1, argv=0x00007fffffffcc48) at foo.cpp:11:7 8 }; 9 10 int main(int argc, char **argv) { -> 11 Foo foo(1, 2.22); 12 return 0; 13 } Process 801065 launched: '.../tools/lldb/lit/Reproducer/Functionalities/Output/TestDataFormatter.test.tmp.out' (x86_64) (lldb) frame var (int) argc = 1 (char **) argv = 0x00007fffffffcc48 (Foo) foo = (m_i = 4198432, m_d = 0) While the testcase expects m_i will be 0. Differential Revision: https://reviews.llvm.org/D59088 llvm-svn: 355611
* [Reproducers] Disable registering lldb::thread_t everywhereJonas Devlieghere2019-03-071-11/+0
| | | | | | | | | As discussed on the mailing list, default serialization for thread ids is not correct, even if they're represented as basic types. I'm purposely leaving the corresponding record macros in place so that we don't break the API boundary detection. llvm-svn: 355610
* Skip TestGdbserverPort.test on WindowsJan Kratochvil2019-03-071-1/+3
| | | | | | | | | | | lldb/cmake/modules/LLDBConfig.cmake does not build lldb-server on Windows: if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD") set(LLDB_CAN_USE_LLDB_SERVER 1) Also do not append 'platform' parameter twice - although that was quietly ignored. llvm-svn: 355579
* When disassembling Aarch64 target and vendor Apple, set the cpu toJason Molenda2019-03-074-0/+90
| | | | | | | | | | | | "apple-latest" which llvm uses to indicate the newest supported ISA. Add a unit test; I'm only testing an armv8.1 instruction in this unit test which would already be disassembled correctly because we set the disassembler to ARM v8.2 mode, but it ensures that nothing has been broken by adding this cpu spec. <rdar://problem/38714781> llvm-svn: 355578
* Repair the build when LLDB_DISABLE_PYTHON is setAlex Langford2019-03-071-20/+28
| | | | | | | | | | | Summary: If LLDB_DISABLE_PYTHON is set, some functions are unavailable but SBReproducer assumes they are. Let's conditionally register those functions since they are conditionally declared. Differential Revision: https://reviews.llvm.org/D59056 llvm-svn: 355575
* Avoid using -S in combination with "script"; it's unreliable.Adrian Prantl2019-03-071-1/+1
| | | | llvm-svn: 355573
* crashlog.py: Catch exception from subprocess.Adrian Prantl2019-03-071-1/+5
| | | | llvm-svn: 355572
* Relax testcase.Adrian Prantl2019-03-071-1/+1
| | | | | | | Recent versions of llvm monorepo builds build libc++abi.dylib as libc++abi.1.dylib. This accespts both variants. llvm-svn: 355571
* [Reproducers] Add tests for different types of functionalityJonas Devlieghere2019-03-076-0/+201
| | | | | | | | | | | | | This patch adds test that check that functionality in lldb continues to work when replaying a reproducer. - Entries in image list are identical. - That stepping behaves the same. - That the data formatters behave the same. Differential revision: https://reviews.llvm.org/D55626 llvm-svn: 355570
* Promote more debug-only assertions to regular assertions.Adrian Prantl2019-03-075-22/+2
| | | | llvm-svn: 355569
OpenPOWER on IntegriCloud