summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor Timer classPavel Labath2016-11-034-121/+122
| | | | | | | | | | | | | | | | | | | | | | Summary: While removing TimeValue from this class I noticed a lot of room for small simplifications here. Main are: - instead of complicated start-stop dances to compute own time, each Timer just starts the timer once, and keeps track of the durations of child timers. Then the own time can be computed at the end by subtracting the two values. - remove double accounting in TimerStack - the stack object already knows the number of timers. The interface does not lend itself well to unit testing, but I have added a couple of tests which can (and did) catch any obvious errors. Reviewers: tberghammer, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D26243 llvm-svn: 285890
* Test for YMMRegisters.Ravitheja Addepally2016-11-033-0/+149
| | | | | | | | | | | | | | | | | Summary: This patch contains test for reading YMM Registers. The test basically contains an inferior that loads the ymm registers with a bit pattern and the python test executes register read to check if the bit pattern is correctly written in the registers. This test is repeated twice for each register with a different pattern for better sanity. Reviewers: tberghammer, zturner, clayborg Subscribers: tberghammer, danalbert, srhines Differential Revision: https://reviews.llvm.org/D26242 llvm-svn: 285885
* [cmake] Build gtest from LLVM when building standaloneMichal Gorny2016-11-021-0/+8
| | | | | | | | | | | Include the gtest utility directory from LLVM sources when performing a stand-alone build of LLDB. This is necessary to have a correct gtest library to link tests against, as the one used by LLVM is not installed (and not supposed to be). This is the same approach as used in clang. Differential Revision: https://reviews.llvm.org/D26245 llvm-svn: 285865
* Fix typo which broke debugging on older OSX systems after r285172.Dawn Perchik2016-11-021-1/+1
| | | | | | | | Reviewed by: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D26260 llvm-svn: 285858
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-0276-181/+163
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Remove KQueue.cppPavel Labath2016-11-024-136/+0
| | | | | | | | | | | | | Summary: This class is unused. Reviewers: clayborg Subscribers: mgorny, modocache, lldb-commits Differential Revision: https://reviews.llvm.org/D26237 llvm-svn: 285847
* Fix crash in PseudoTerminal on Windows.Zachary Turner2016-11-021-6/+9
| | | | | | | Patch by Rudy Pons Differential Revision: https://reviews.llvm.org/D25681 llvm-svn: 285843
* [CMake] Support LLDB_TEST_CLANG in check-lldb target(s)Chris Bieneman2016-11-021-0/+4
| | | | | | This just hooks up the in-tree compiler to be optionally used when running the test suite. llvm-svn: 285839
* Find clang resource directory via *nix-style lookupChris Bieneman2016-11-023-21/+40
| | | | | | | | | | | | | | | | | Summary: This patch allows the Darwin build to fall back to to Posix-style lookups for the clang resource directory if the debugger library isn't inside a framework. The patch also includes a bit of refactoring and cleanup around the *nix resolution of the binary and lib directories to reuse the code instead of duplicating it. With this patch Darwin builds that don't build a framework only have 3 failing tests on my system (TestExec.py). Reviewers: zturner, labath, spyffe, tfiala Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26170 llvm-svn: 285838
* Fix some warnings compiling with clang-cl on Windows.Zachary Turner2016-11-022-4/+3
| | | | llvm-svn: 285834
* Remove TimeValue usage from two filesPavel Labath2016-11-022-18/+20
| | | | llvm-svn: 285801
* Fix printf errors in ProcessMinidumpPavel Labath2016-11-021-6/+6
| | | | llvm-svn: 285798
* Remove TimeValue from UnwindLLDB.cppPavel Labath2016-11-021-8/+7
| | | | | | Really NFC, as the code is #ifdefed out, but I did make sure it compiles if I enable it. llvm-svn: 285797
* Remove TimeValue usages from MacOSX-Kernel process plugin. NFCPavel Labath2016-11-023-10/+7
| | | | llvm-svn: 285795
* Fix SBWatchpoint::SetEnabled to send an event.Jim Ingham2016-11-022-4/+4
| | | | | | | We really shouldn't be sending events for SB API's, dunno when we started doing that. We don't do it for other things. But first restore the status quo. llvm-svn: 285781
* Xfail this while I figure out why the event isn't getting sent.Jim Ingham2016-11-011-0/+1
| | | | llvm-svn: 285761
* Add missing #include.Zachary Turner2016-11-011-0/+1
| | | | llvm-svn: 285749
* Switch SBWatchpoint::SetEnabled over to using ↵Jim Ingham2016-11-014-8/+35
| | | | | | | | | | | | | Process::{Enable,Disable}Watchpoint. We don't have a good story for what happens to watchpoints when you don't have a process, or if your process exits. Clearing that up will instruct how to fix this for real. Also added a test to make sure disable->enable works as well. This resolves llvm.org/pr30789. llvm-svn: 285742
* Add helpers for the notion of a type scavenger that is "either this or that" ↵Enrico Granata2016-11-012-50/+83
| | | | | | | | source, and one that is "both this and that" source Use the helper to rewrite the ObjC type lookup logic (first modules, then runtime) in terms of an either scavenger llvm-svn: 285736
* Implement a general type scavenger that can dig types from debug info + a ↵Enrico Granata2016-11-013-69/+81
| | | | | | | | | | filtering mechanism to accept/reject results thusly obtained Implement the C++ type lookup support in terms of this general scavenger The idea is that we may want other languages to do debug info based search (exclusively, or as an add-on to runtime/module based searching) and it makes sense to avoid duplicating this functionality llvm-svn: 285727
* change ProcessAttach test to no-debug-infoTodd Fiala2016-11-011-0/+2
| | | | | | | Fixes: https://bugs.swift.org/browse/SR-3103 llvm-svn: 285726
* Fix RHEL 6 build with missing cerrno and some other Include What You Use ↵Eugene Zelenko2016-11-011-3/+6
| | | | | | | | warnings. Differential revision: https://reviews.llvm.org/D26171 llvm-svn: 285710
* Remove TimeValue usage from FileSpec.hPavel Labath2016-11-0120-78/+111
| | | | | | | | | | | | | | | | | | | | | Summary: The only usage there was in GetModificationTime(). I also took the opportunity to move this function from FileSpec to the FileSystem class - since we are using FileSpecs to also represent remote files for which we cannot (easily) retrieve modification time, it makes sense to make the decision to get the modification time more explicit. The new function returns a llvm::sys::TimePoint<>. To aid the transition from TimeValue, I have added a constructor to it which enables implicit conversion from a time_point. Reviewers: zturner, clayborg Subscribers: mehdi_amini, tberghammer, danalbert, beanz, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25392 llvm-svn: 285702
* Minidump plugin: Fix flaky testDimitar Vlahovski2016-11-013-17/+90
| | | | | | | | | | | | | | | | | | | Summary: One of the tests was flaky, because similarly to https://reviews.llvm.org/D18697 (rL265391) - if there is a process running which is with the same PID as in the core file, the minidump core file debugging will fail, because we get some information from the running process. The fix is routing the ProcessInfo requests through the Process class and overriding it in ProcessMinidump to return correct data. Reviewers: labath Subscribers: lldb-commits, beanz Differential Revision: https://reviews.llvm.org/D26193 llvm-svn: 285698
* Fix a bug where the EmulateInstructionARM64 handling of STP/LDP instructionsJason Molenda2016-11-012-120/+290
| | | | | | | | | | | | | | | for floating point registers was not recording them correctly. I needed to change the EmulateInstructionARM64 unwind plans from using the DWARF register numbering scheme to using the LLDB register numbering scheme (because dwarf doesn't define register numbers for the 64-bit "d" registers). Updated the EmulateInstructionARM64 unit tests to work with the LLDB register numbering scheme and added a unit test to check the floating point register spills & restores are correctly recorded. https://reviews.llvm.org/D25864 <rdar://problem/28745483> llvm-svn: 285662
* Remove executable bit on a source fileStephane Sezer2016-11-011-0/+0
| | | | llvm-svn: 285658
* [CMake] Populate the build directory's frameworkChris Bieneman2016-10-312-3/+14
| | | | | | | | This ensures that the Resources and clang headers are properly symlinked in LLDB's framework. This should fix the modules-related tests when building on Darwin with CMake if you are building a framework. I have another fix coming which gets them working on Darwin if you're building liblldb instead of a framework. llvm-svn: 285651
* [Test-Suite] Speculative fix for darwin botsChris Bieneman2016-10-311-2/+2
| | | | | | When building with Xcode it looks like some of the logic in my test changes went haywire. This should fix it. llvm-svn: 285646
* Remove usages of TimeValue from gdb-remote process pluginPavel Labath2016-10-319-94/+130
| | | | | | | | | | | | | | | Summary: Most of the changes are very straight-forward, the only tricky part was the "packet speed-test" function, which is very time-heavy. As the function was completely untested, I added a quick unit smoke test for it. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25391 llvm-svn: 285602
* Remove a couple of old TODOs and don't make a new ConstString each time; ↵Enrico Granata2016-10-311-12/+15
| | | | | | none of this is super-critical since it applies to older versions of macOS (or OSX, I guess?) but still.. llvm-svn: 285599
* Add the new minidump plugin files to the Xcode projectEnrico Granata2016-10-311-0/+18
| | | | llvm-svn: 285596
* Improve ".." handling in FileSpec normalizationPavel Labath2016-10-314-126/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: .. handling for windows path was completely broken because the function was expecting \ as path separators, but we were passing it normalized file paths, where these have been replaced by forward slashes. Apart from this, the function was incorrect for posix paths as well in some corner cases, as well as being generally hard to follow. The corner cases were: - /../bar -> should be same as /bar - /bar/.. -> should be same as / (slightly dodgy as the former depends on /bar actually existing, but since we're doing it in an abstract way, I think the transformation is reasonable) I rewrite the function to fix these corner cases and handle windows paths more correctly. The function should now handle the posix paths (modulo symlinks, but we cannot really do anything about that without a real filesystem). For windows paths, there are a couple of corner cases left, mostly to do with drive letter handling, which cannot be fixed until the rest of the class understands drive letters better. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26081 llvm-svn: 285593
* Minidump plugin: Adding ProcessMinidump, ThreadMinidump and register the ↵Dimitar Vlahovski2016-10-3120-8/+907
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plugin in SystemInitializerFull Summary: This plugin resembles the already existing Windows-only Minidump plugin. The WinMinidumpPlugin uses the Windows API for parsing Minidumps while this plugin is cross-platform because it includes a Minidump parser (which is already commited) It is able to produce a backtrace, to read the general puprose regiters, inspect local variables, show image list, do memory reads, etc. For now the only arches that this supports are x86_32 and x86_64. This is because I have only written register contexts for those. Others will come in next CLs. I copied the WinMinidump tests and adapted them a little bit for them to work with the new plugin (and they pass) I will add more tests, aiming for better code coverage. There is still functionality to be added, see TODOs in code. Reviewers: labath, zturner Subscribers: beanz, mgorny, modocache, lldb-commits, amccarth Differential Revision: https://reviews.llvm.org/D25905 llvm-svn: 285587
* Minidump plugin: Adding x86_32 register context converterDimitar Vlahovski2016-10-318-42/+322
| | | | | | | | | | | | | | | | | Summary: This, like the x86_64 case, reads the register values from the minidump file, and emits a binary buffer that is ordered using the offsets from the RegisterInfoInterface argument. That way we can reuse an existing register context. Added unit tests. Reviewers: labath, zturner Subscribers: beanz, mgorny, modocache, amccarth, lldb-commits Differential Revision: https://reviews.llvm.org/D25832 llvm-svn: 285584
* Use the right dwarf attributes for parsing location list entries (fixup for ↵Pavel Labath2016-10-311-2/+2
| | | | | | | | | | | | | r285441) Note that the parsing code here is still incorrect wrt. the new draft of the dwarf 5 spec (seconds arguments to DW_LLE_startx_length should be uleb128, not u32). Once we have compilers actually emitting dwarf conformant with the new spec, we'll need to revisit this and figure out the proper behavior there. This should unbreak the linux bot. llvm-svn: 285562
* [Test Suite] Pull generateSource into lldbtestChris Bieneman2016-10-3112-58/+48
| | | | | | | | | | | | | | | Summary: Convert tests using LLDB headers to use generateSource to put the right include paths in place regardless of whether or not you're building a framework. This also abstracted generateSource out of TestPublicAPIHeaders.py into lldbtest.py. Reviewers: tfiala, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25887 llvm-svn: 285542
* [Test Suite] Properly respect --framework optionChris Bieneman2016-10-313-12/+43
| | | | | | | | | | | | | | | Summary: dotest.py has a framework option that is not respected. This patch makes the framework path properly configurable via the --framework option. This patch also adds a function to the lldbtest.Base class named "hasDarwinFramework" which allows us to not rely on the host platform to determine if a framework is present. If running on Darwin, and not building a framework, this will follow the *nix code paths which are appropriate for Darwin. Reviewers: tfiala Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D25886 llvm-svn: 285541
* Limit LLDB_EXPORT_ALL_SYMBOLS to lldb symbolsTodd Fiala2016-10-292-6/+9
| | | | | | | | | | | | | | | | | | | LLDB_EXPORT_ALL_SYMBOLS used to instruct the build to export all the symbols in liblldb on CMake builds. This change limits the CMake define to only add in the lldb_private namespace to the symbols that normally get exported, such that we export all the symbols in the public lldb namespace and the lldb_private namespace. This is a fix for: https://llvm.org/bugs/show_bug.cgi?id=30822 Reviewers: labath, beanz Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26093 llvm-svn: 285484
* Rename DWARF 5 constants to adapt to change in LLVMAdrian Prantl2016-10-281-3/+3
| | | | llvm-svn: 285441
* Rename DWARF 5 constants to adapt to change in LLVMAdrian Prantl2016-10-281-4/+4
| | | | llvm-svn: 285424
* Add a couple of fun unit tests for FileSpec::EqualPavel Labath2016-10-281-9/+82
| | | | | | | Most of them fail right now and are commented out. The main problem is handling of backslashes on windows, but also the posix path code has a couple of issues. llvm-svn: 285393
* Check that we got back an object from MakeFunctionCallerJason Molenda2016-10-274-4/+4
| | | | | | | | before we call through it. <rdar://problem/28979705> llvm-svn: 285369
* Revert "[Test Suite] Pull generateSource into lldbtest"Chris Bieneman2016-10-2712-48/+58
| | | | | | | | This reverts commit r285357. I committed this patch accidentally out of order. Will recommit when the change this depends on is landed. llvm-svn: 285361
* [Test Suite] Pull generateSource into lldbtestChris Bieneman2016-10-2712-58/+48
| | | | | | | | | | | | | | | Summary: Convert tests using LLDB headers to use generateSource to put the right include paths in place regardless of whether or not you're building a framework. This also abstracted generateSource out of TestPublicAPIHeaders.py into lldbtest.py. Reviewers: tfiala, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25887 llvm-svn: 285357
* [CMake] Rename lldb-launcher to darwin-debugChris Bieneman2016-10-273-43/+2
| | | | | | | | | | | | Summary: This tool is only built on Darwin, and the name darwin-debug matches the Xcode project. We should have this in sync unless there is a good reason not to. Reviewers: zturner, tfiala, labath Subscribers: labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25745 llvm-svn: 285356
* Add support for "type lookup" to find C and C++ typesEnrico Granata2016-10-275-4/+104
| | | | | | | | This is an important first step in closing the functionality gap between "type lookup" and "images lookup -t" rdar://28971388 llvm-svn: 285332
* Fix an issue where frame variable -s <varname> would not show the scope even ↵Enrico Granata2016-10-265-36/+68
| | | | | | | | though the user asked for it Part of rdar://28434047 llvm-svn: 285226
* Actually use = delete to mark constructors and operators we want to not ↵Enrico Granata2016-10-261-2/+2
| | | | | | | | exist. Just declaring them as private works, but it can confuse certain tools as it doesn't actually declare intent, and the C++11 way is more expressive anyway, so this is pure win rdar://28960209 llvm-svn: 285216
* Don't set a software stepping breakpoint at 0 on arm or mips.Pavel Labath2016-10-262-6/+5
| | | | | | | | | | | | | | | | | | Summary: Check whether the setting the breakpoint failed during instruction emulation. If it did, the next pc is likely in unmapped memory, and the inferior will crash anyway after the next instruction. Do not return an error in this case, but just continue stepping. Reenabled the crash during step test for android/linux. Reviewers: labath Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D25926 Author: Jason Majors <jmajors@google.com> llvm-svn: 285187
* Enable the use of the new dyld SPI on the currentJason Molenda2016-10-261-5/+0
| | | | | | generation macosx/ios/tvos/watchos. llvm-svn: 285172
OpenPOWER on IntegriCloud