summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix darwin build broken by r287920Pavel Labath2016-11-251-2/+1
| | | | | | I accidentally used the wrong brackets when including llvm headers. llvm-svn: 287923
* Introduce Chrono to the Connection class. NFCI.Pavel Labath2016-11-258-29/+29
| | | | llvm-svn: 287922
* Fix FreeBSD build error in r287920Pavel Labath2016-11-251-2/+4
| | | | | | | The conditional expression is ambiguous there, so help it by explicitly casting. This will go away once we use chrono all the way down. llvm-svn: 287921
* Introduce chrono to the Communication classPavel Labath2016-11-259-60/+113
| | | | | | | | This replaces the raw integer timeout parameters in the class with their chrono-based equivalents. To achieve this, I have moved the Timeout class to a more generic place and added a quick unit test for it. llvm-svn: 287920
* Use Clang for D language support.Johan Engelen2016-11-251-1/+3
| | | | | | Differential revision: https://reviews.llvm.org/D24794 llvm-svn: 287917
* Merge Linux and FreeBSD arm64 register contextsPavel Labath2016-11-258-199/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a test-the-water change about possibilities of reducing duplication in the register context definitions. I've named the new class RegisterInfoPOSIX, as RegisterContextPOSIX was already taken :(. The two files were identical except for a fix by Tamas in D12636, which was applied to the Linux version only, which fixed a discrepancy between the definitions of fpsr and fpcr on one hand, and all other floating point register definitions on the other. Linux test suite still passes after this change. For freebsd, make the floating point register behavior consistent, but I don't know whether it will be consistently fixed, or consistently broken. By eyeballing the code, I have a feeling that a similar fix to D12636 will be required in RegisterContextPOSIXProcessMonitor_arm64::ReadRegister, but I can't be sure as I have no way to test it (the assert in that function should fire upon accessing the registers if it is wrong though). Reviewers: emaste, clayborg Subscribers: aemerson, rengolin, beanz, mgorny, modocache, dmikulin, lldb-commits Differential Revision: https://reviews.llvm.org/D25947 llvm-svn: 287916
* Add a couple of tests for the Listener classPavel Labath2016-11-242-0/+115
| | | | | | | I'm considering doing some refactor there, so I am adding these to guard the current behavior. llvm-svn: 287896
* Fix TestMiExec.test_lldbmi_exec_next_instructionPavel Labath2016-11-241-1/+1
| | | | | | | | The line numbers come out slightly differently when the test is run with gcc-4.9 as a compiler. The test probably should not depend on that, but that is a different story. llvm-svn: 287893
* Enable MiExecTestCase-test_lldbmi_exec_next_instructionPavel Labath2016-11-241-3/+0
| | | | | | Test passes consistently, at least on linux. llvm-svn: 287887
* Enable TestMultithreaded-sb_api_listener_event_process_state on linux/gccPavel Labath2016-11-241-8/+0
| | | | | | Passing consistently now. llvm-svn: 287885
* Enable TestBitfields on linux with clangPavel Labath2016-11-241-7/+0
| | | | | | The test has been passing for a while now. llvm-svn: 287884
* Enable TestRegisterVariables for some configurationsPavel Labath2016-11-241-5/+2
| | | | | | It consistently passes for linux-clang-i386, and linux-gcc-x86_64. llvm-svn: 287883
* Enable WatchpointPythonCommandTestCase-test_continue_in_watchpoint_commandPavel Labath2016-11-241-2/+0
| | | | | | | | This test passes consistently on linux, so I am removing the overall XFAIL. If it fails on your configuration, please put a targeted xfail instead (i'll add them my self if I get any breakage emails). llvm-svn: 287881
* Use more chrono in AdbClientPavel Labath2016-11-243-11/+13
| | | | | | This refactors AdbClient interface in terms of std::chrono. llvm-svn: 287880
* Use chrono in AdbClientPavel Labath2016-11-242-29/+19
| | | | | | | This refactors the class implementations to use chrono. I'll follow this up with a refactor of the class interface. llvm-svn: 287879
* Attempt to fix freebsd build after r287864Pavel Labath2016-11-242-8/+10
| | | | | | | | | | the chrono library there uses long long as the underlying chrono type, but defines int64_t as long (or the other way around, I am not sure). In any case, this caused the implicit conversion to not trigger. This should address that. Also fix up the relevant unit test. llvm-svn: 287867
* Introduce chrono to more gdb-remote functionsPavel Labath2016-11-248-105/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This replaces the usage of raw integers with duration classes in the gdb-remote packet management functions. The values are still converted back to integers once they go into the generic Communication class -- that I am leaving to a separate change. The changes are mostly straight-forward (*), the only tricky part was representation of infinite timeouts. Currently, we use UINT32_MAX to denote infinite timeout. This is not well suited for duration classes, as they tend to do arithmetic on the values, and the identity of the MAX value can easily get lost (e.g. microseconds(seconds(UINT32_MAX)).count() != UINT32_MAX). We cannot use zero to represent infinity (as Listener classes do) because we already use it to do non-blocking polling reads. For this reason, I chose to have an explicit value for infinity. The way I achieved that is via llvm::Optional, and I think it reads quite natural. Passing llvm::None as "timeout" means "no timeout", while passing zero means "poll". The only tricky part is this breaks implicit conversions (seconds are implicitly convertible to microseconds, but Optional<seconds> cannot be easily converted into Optional<microseconds>). For this reason I added a special class Timeout, inheriting from Optional, and enabling the necessary conversions one would normally expect. (*) The other tricky part was GDBRemoteCommunication::PopPacketFromQueue, which was needlessly complicated. I've simplified it, but that one is only used in non-stop mode, and so is untested. Reviewers: clayborg, zturner, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26971 llvm-svn: 287864
* Remove \x13 (^S) character that was likely added by mistake.Adrian Kuegel2016-11-241-1/+1
| | | | | | | | | r287386 added a \x13 character inside a string literal. Most likely this was by mistake, so remove it. Differential Revision: https://reviews.llvm.org/D26973 llvm-svn: 287862
* Patch for lldb bug 26322 “core load hangs”Howard Hellyer2016-11-244-0/+0
| | | | | | Correct 0 byte core files uploaded by arc. llvm-svn: 287861
* Patch for lldb bug 26322 “core load hangs”Howard Hellyer2016-11-2415-2/+477
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch changes the way ProcessElfCore.cpp handles signal information. The patch changes ProcessElfCore.cpp to use the signal from si_signo in SIGINFO notes in preference to the value of cursig in PRSTATUS notes. The value from SIGINFO seems to be more thread specific. The value from PRSTATUS is usually the same for all threads even if only one thread received a signal. If it cannot find any SIGINFO blocks it reverts to the old behaviour and uses the value from cursig in PRSTATUS. If after that no thread appears to have been stopped it forces the status of the first thread to be SIGSTOP to prevent lldb hanging waiting for any thread from the core file to change state. The order is: - If one or more threads have a non-zero si_signo in SIGINFO that will be used. - If no threads had a SIGINFO block with a non-zero si_signo set all threads signals to the value in cursig in their PRSTATUS notes. - If no thread has a signal set to a non-zero value set the signal for only the first thread to SIGSTOP. This resolves two issues. The first was identified in bug 26322, the second became apparent while investigating this problem and looking at the signal values reported for each thread via “thread list”. Firstly lldb is able to load core dumps generated by gcore where each thread has a SIGINFO note containing a signal number but cursig in the PRSTATUS block for each thread is 0. Secondly if a SIGINFO note was found the “thread list” command will no longer show the same signal number for all threads. At the moment if a process crashes, for example with SIGILL, all threads will show “stop reason = signal SIGILL”. With this patch only the thread that executed the illegal instruction shows that stop reason. The other threads show “stop reason = signal 0”. Reviewers: jingham, clayborg Subscribers: sas, labath, lldb-commits Differential Revision: https://reviews.llvm.org/D26676 llvm-svn: 287858
* Fix a comparison of integers of different signs warning.Taras Tsugrii2016-11-241-1/+1
| | | | | | | | | | source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:403:21: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] for (int i = 0; i < llvm::array_lengthof (magicks); i++) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Differential Revision: https://reviews.llvm.org/D27081 llvm-svn: 287848
* Refactor LLDB's Windows process plugin (NFC)Adrian McCarthy2016-11-2325-1764/+1230
| | | | | | | | | | | | | | | | | | | | The Windows process plugin was broken up into multiple pieces a while back in order to share code between debugging live processes and minidumps (postmortem) debugging. The minidump portion was replaced by a cross-platform solution. This left the plugin split into a formerly "common" base classes and the derived classes for live debugging. This extra layer made the code harder to understand and work with. This patch simplifies these class hierarchies by rolling the live debugging concrete classes up to the base classes. Last week I posted my intent to make this change to lldb-dev, and I didn't hear any objections. This involved moving code and changing references to classes like ProcessWindowsLive to ProcessWindows. It still builds for both 32- and 64-bit, and the tests still pass on 32-bit. (Tests on 64-bit weren't passing before this refactor for unrelated reasons.) llvm-svn: 287770
* Re-add "demonstrate new Args API"Zachary Turner2016-11-228-92/+90
| | | | | | This fixes the build breakage due to the use of C++14. llvm-svn: 287647
* Improve detection of global vs local variablesSam McCall2016-11-221-12/+16
| | | | | | | | | | | | | | | | | | Summary: Improve detection of global vs local variables. Currently when a global variable is optimized out or otherwise has an unknown location (DW_AT_location is empty) it gets reported as local. I added two new heuristics: - if a mangled name is present, the variable is global (or static) - if DW_AT_location is present but invalid, the variable is global (or static) Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26908 llvm-svn: 287636
* Fix build failure on Linux and BSD by reverting r287597Omair Javaid2016-11-228-88/+92
| | | | | | Linux and BSD builds failing after this changes from rev 287597. llvm-svn: 287631
* Turn on LLDB_EDITLINE_USE_WCHAR on FreeBSDEd Maste2016-11-221-1/+1
| | | | llvm-svn: 287609
* Fix a bug caught by adding LLVM_NODISCARD to StringRef.Zachary Turner2016-11-211-1/+1
| | | | llvm-svn: 287598
* Add the new Args / entry-access API.Zachary Turner2016-11-218-92/+88
| | | | | | | | | | | | The long-term goal here is to get rid of the functions GetArgumentAtIndex() and GetQuoteCharAtIndex(), instead replacing them with operator based access and range-based for enumeration. There are a lot of callsites, though, so the changes will be done incrementally, starting with this one. Differential Revision: https://reviews.llvm.org/D26883 llvm-svn: 287597
* Fix remote-linux regression due to stringRef changesOmair Javaid2016-11-211-1/+1
| | | | | | | | This is to fix a regression in remote-linux lldb-server connections. We were wrongly passing a copy of uri and expecting a stringRef back. llvm-svn: 287542
* ELF core: Adding parsing of the floating-point and SSE registers on x86 ↵Dimitar Vlahovski2016-11-2014-21/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32/64 bit elf core files Summary: The floating-point and SSE registers could be present in the elf-core file in the note NT_FPREGSET for 64 bit ones, and in the note NT_PRXFPREG for 32 bit ones. The entire note is a binary blob matching the layout of the x87 save area that gets generated by the FXSAVE instruction (see Intel developers manual for more information). This CL mainly modifies the RegisterRead function in RegisterContextPOSIXCore_x86_64 for it to return the correct data both for GPR and FPR/SSE registers, and return false (meaning "this register is not available") for other registers. I added a test to TestElfCore.py that tests reading FPR/SSE registers both from a 32 and 64 bit elf-core file and I have inluded the source which I used to generate the core files. I tried to also add support for the AVX registers, because this info could also be present in the elf-core file (note NT_X86_XSTATE - that is the result of the newer XSAVE instruction). Parsing the contents from the file is easy. The problem is that the ymm registers are split into two halves and they are in different places in the note. For making this work one would either make a "hacky" approach, because there won't be any other way with the current state of the register contexts - they assume that "this register is of size N and at offset M" and don't have the notion of discontinuos registers. Reviewers: labath Subscribers: emaste, lldb-commits Differential Revision: https://reviews.llvm.org/D26300 llvm-svn: 287506
* Fix some accidental Prints of StringRefs that snuck in.Zachary Turner2016-11-192-4/+8
| | | | llvm-svn: 287412
* Fix some build errors.Zachary Turner2016-11-181-7/+4
| | | | llvm-svn: 287409
* [CMake] NFC. Updating CMake dependency specificationsChris Bieneman2016-11-184-14/+26
| | | | | | This patch updates a bunch of places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system. llvm-svn: 287408
* Convert CommandHistory functions to StringRef.Zachary Turner2016-11-183-45/+50
| | | | llvm-svn: 287401
* Removing myself from CODE_OWNERS, and distributing those duties among other ↵Enrico Granata2016-11-181-7/+4
| | | | | | | | members of the community That's All, Folks llvm-svn: 287397
* Fix "thread step until" handling of multiple line inputs.Jim Ingham2016-11-184-3/+122
| | | | | | Also document that it handles same, and add some tests. llvm-svn: 287386
* Change CreateTarget and dependents to accept StringRef.Zachary Turner2016-11-1813-51/+51
| | | | llvm-svn: 287376
* Re-add the StringRef interface changes for Variable.Zachary Turner2016-11-184-117/+126
| | | | | | | | This concludes the changes I originally tried to make and then had to back out. This way if anything is still broken, it should be easier to bisect it back to a more specific changeset. llvm-svn: 287367
* Resubmit "Remove an output-parameter from Variable function".Zachary Turner2016-11-185-147/+108
| | | | | | | | | | | The scanning algorithm had a few little subtleties that I overlooked, but this patch should fix everything. I still haven't changed the function to take a StringRef since that has some trickle down effect and is mostly mechanical, I just wanted to get the tricky part as isolated as possible. llvm-svn: 287354
* Revert "Remove an out param from ValueObject::GetValueForExpressionPath."Zachary Turner2016-11-185-37/+96
| | | | | | | This reverts commit r287315, as it introduces a bug that breaks many things. llvm-svn: 287320
* Remove an out param from ValueObject::GetValueForExpressionPath.Zachary Turner2016-11-185-96/+37
| | | | | | | | | | This argument was only used in one place in the codebase, and it was in a non-critical log statement and can be easily substituted for an equally meaningful field instead. The payoff of computing this value is not worth the added complexity. llvm-svn: 287315
* Delete more dead code in ValueObject.Zachary Turner2016-11-182-415/+0
| | | | | | | | Apparently these two enormous functions were dead. Which is good, since one was largely a copy of another function with only a few minor tweaks. llvm-svn: 287308
* Remove some dead code in ValueObject.Zachary Turner2016-11-181-44/+21
| | | | | | | | | Originally I converted this entire function and all dependents to use StringRef, but there were some test failures that were tricky to track down, as this is a complicated function. So I'm starting over, this time in smaller increments. llvm-svn: 287307
* Resubmit "Change RegisterValue getters / setters to use StringRef."Zachary Turner2016-11-175-97/+101
| | | | | | | This resubmits r287279 with a fix for the original issue, which was a trivial typo. llvm-svn: 287282
* Revert "Change RegisterValue getters / setters to use StringRef."Zachary Turner2016-11-175-101/+97
| | | | | | | This reverts commit r287279, which breaks some register tests on Linux. llvm-svn: 287281
* Change RegisterValue getters / setters to use StringRef.Zachary Turner2016-11-175-97/+101
| | | | | | | | In the process, found some functions that were duplicates of existing StringRef member functions. So deleted those functions and used the StringRef functions instead. llvm-svn: 287279
* Fix step-over when SymbolContext.function is missing and symbol is present.Sam McCall2016-11-171-14/+15
| | | | | | | | | | | | | | | | | | | | | | | Summary: Fix step-over when SymbolContext.function is missing and symbol is present. With targets from our build configuration, ThreadPlanStepOverRange::IsEquivalentContext fails to fire for relevant frames, leading to ShouldStop() returning true prematurely. The frame's SymbolContext, and m_addr_context have: - comp_unit set and matching - function = nullptr - symbol set and matching (but this is never checked) My naive guess is that the context should be equivalent in this case :-) Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26804 llvm-svn: 287274
* Make GetRegisterByName() take a StringRef.Zachary Turner2016-11-174-28/+25
| | | | | | | This one is fairly trivial and only really involves changing function signatures and a few simple call-sites. llvm-svn: 287266
* Convert Platform, Process, and Connection functions to StringRef.Zachary Turner2016-11-1723-108/+108
| | | | | | All tests pass on Linux and Windows. llvm-svn: 287259
* Rewrite all Property related functions in terms of StringRef.Zachary Turner2016-11-1724-345/+269
| | | | | | | | | | | | | | | This was a bit tricky, especially for things like OptionValueArray and OptionValueDictionary since they do some funky string parsing. Rather than try to re-write line-by-line I tried to make the StringRef usage idiomatic, even though it meant often re-writing from scratch large blocks of code in a different way while keeping true to the original intent. The finished code is a big improvement though, and often much shorter than the original code. All tests and unit tests pass on Windows and Linux. llvm-svn: 287242
OpenPOWER on IntegriCloud