summaryrefslogtreecommitdiffstats
path: root/lldb/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix missing include after r293660Ismail Donmez2017-02-011-0/+1
| | | | llvm-svn: 293767
* [CMake] Partial revert of r293686Chris Bieneman2017-01-311-12/+125
| | | | | | This change reverts the lldb-server part of r293686, which is having trouble on Linux bots. I'm not sure if I can make lldb-server work correctly until the full dependency graph is fixed. llvm-svn: 293690
* [CMake] Add accurate dependency specificationsChris Bieneman2017-01-316-176/+72
| | | | | | | | | | | | | | | | | Summary: This patch adds accurate dependency specifications to the mail LLDB libraries and tools. In all cases except lldb-server, these dependencies are added in addition to existing dependencies (making this low risk), and I performed some code cleanup along the way. For lldb-server I've cleaned up the LLVM dependencies down to just the minimum actually required. This is more than lldb-server actually directly references, and I've left a todo in the code to clean that up. Reviewers: labath, zturner Subscribers: lldb-commits, danalbert, srhines, ki.stfu, mgorny, jgosnell Differential Revision: https://reviews.llvm.org/D29333 llvm-svn: 293686
* Add a command to access and manipulate the Intel(R) MPX Boundary Tables.Valentina Giusti2017-01-317-0/+679
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The Boundary Table Entries are stored in the application memory and allow to store boundary info for all the pointers of the program, also those that otherwise wouldn't fit in the 4 bound registers provided by the HW. Here is an example of how it works: * mpx-table show <pointer> lbound = 0x..., ubound = 0x..., (pointer value = 0x..., metadata = 0x...) * mpx-table set <pointer> Signed-off-by: Valentina Giusti <valentina.giusti@intel.com> Reviewers: labath, clayborg Reviewed By: clayborg Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D29078 llvm-svn: 293660
* Removed an unneccesary #if now that debugserver-mini links Foundation.Sean Callanan2017-01-261-2/+0
| | | | llvm-svn: 293161
* Add Foundation to the debugserver-mini dependencies;Jason Molenda2017-01-261-0/+2
| | | | | | debugserver-mini can use Foundation. llvm-svn: 293140
* Instead of weak-linking against LoggingSupport framework (whichJason Molenda2017-01-261-0/+1
| | | | | | | | | | | | requires that this private framework be available - and it is not available earlier than macOS 10.12 - to build lldb), dlopen the framework binary on demand in debugserver. We're already using dlsym() to look up all the symbols so there is no need to use weak linking here. <rdar://problem/30158797> llvm-svn: 293135
* Link debugserver against Foundation to get access to NSProcessInfo.Sean Callanan2017-01-252-14/+14
| | | | | | debugserver-mini can't use Foundation so disable that code there. llvm-svn: 293098
* Reverted 292880 to fix a linker error.Sean Callanan2017-01-251-49/+0
| | | | | | <rdar://problem/30180883> llvm-svn: 293022
* Conditionalized OsLogger.cpp on a modern SDK.Sean Callanan2017-01-251-1/+3
| | | | llvm-svn: 293020
* Fix the last commit; compression was being enabled on mac nativeJason Molenda2017-01-241-1/+1
| | | | | | | | | | | | | | | | | | | which led to ERROR: test_auxv_chunked_reads_work_debugserver (tools/lldb-server/TestGdbRemoteAuxvSupport.py) ERROR: test_auxv_data_is_correct_size_debugserver (tools/lldb-server/TestGdbRemoteAuxvSupport.py) ERROR: test_auxv_keys_look_valid_debugserver (tools/lldb-server/TestGdbRemoteAuxvSupport.py) ERROR: test_qSupported_returns_known_stub_features_debugserver (tools/lldb-server/TestLldbGdbServer.py) failures because debugserver was advertising compression being available, e.g. send packet: $qSupported:xmlRegisters=i386,arm,mips#12 read packet: $qXfer:features:read+;PacketSize=20000;qEcho+;SupportedCompressions=zlib-deflate;DefaultCompressionMinSize=384#00 maybe these tests should be a little more accepting of additional features. but I didn't mean for this to be enabled on mac native. llvm-svn: 292890
* Enable compression capability in debugserver for all of ios/watchos/tvosJason Molenda2017-01-241-6/+1
| | | | | | | | environments. <rdar://problem/30159019> llvm-svn: 292882
* weak-link debugserver against the LoggingSupport framework;Jason Molenda2017-01-241-0/+49
| | | | | | | | systems without this framework will not get a link error. <rdar://problem/30158797> llvm-svn: 292880
* Add a more succinct logging syntaxPavel Labath2017-01-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds the LLDB_LOG macro, which enables one to write more succinct log statements. if (log) log->Printf("log something: %d", var); becomes LLDB_LOG(log, "log something: {0}, var); The macro still internally does the "if(log)" dance, so the arguments are only evaluated if logging is enabled, meaning it has the same overhead as the previous syntax. Additionally, the log statements will be automatically prefixed with the file and function generating the log (if the corresponding new argument to the "log enable" command is enabled), so one does not need to manually specify this in the log statement. It also uses the new llvm formatv syntax, which means we don't have to worry about PRIx64 macros and similar, and we can log complex object (llvm::StringRef, lldb_private::Error, ...) more easily. Differential Revision: https://reviews.llvm.org/D27459 llvm-svn: 292360
* [cmake] Make lldb build with the android ndk toolchain filePavel Labath2017-01-171-1/+1
| | | | | | | | | | | | | | | | | Summary: The NDK cmake toolchain file defines CMAKE_SYSTEM_NAME=Android, so switch the build to use that. I have also updated the in-tree toolchain file to do that (instead of defining __ANDROID_NDK__), so it can still be used to build. After migrating the last bits of non-toolchainy bits out of the in-tree toolchain, I intend to delete it. Reviewers: tberghammer, danalbert Subscribers: srhines, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D28775 llvm-svn: 292212
* [cmake] Fix LLVM_LINK_LLVM_DYLIB build, againPavel Labath2017-01-101-1/+7
| | | | | | | | | | | | | The llvm_config hack for lldb-server is only necessary for !DYLIB builds, as otherwise we would get unresolved symbols from lldb libraries which do not track their dependencies correctly (all of them). In a DYLIB build, the so will already be added to the link dependencies and we can use that to resolve all missing symbols. The proper fix for this would be to have each lldb library track its dependencies correctly. llvm-svn: 291555
* Another windows build fixPavel Labath2017-01-061-0/+1
| | | | llvm-svn: 291234
* Revert part of cleanup to fix a build breakDavid Blaikie2017-01-061-2/+13
| | | | | | | | Wasn't sure I could include ErrorHandling.h here, and evidently I wasn't building this part (must've made the change using sed after getting tired of fixing each compilation error individually). llvm-svn: 291204
* Make lldb -Werror clean for -Wstring-conversionDavid Blaikie2017-01-063-23/+7
| | | | | | | | | Also found/fixed one bug identified by this warning in RenderScriptx86ABIFixups.cpp where a string literal was being used in an effort to provide a name for an instruction/register, but was instead being passed as the bool 'isVolatile' parameter. llvm-svn: 291198
* [lldb-mi] Fix implementation for a few mi commandsHafiz Abid Qadeer2017-01-059-7/+91
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Some of the mi commands implemented in lldb-mi are incomplete/not confirming to the spec. - `gdb-show` and `gdb-set` doesn't support getting/setting `disassembly-flavor` - `environment-cd` should also change the working directory for inferior - debugger CLI output should be printed as console-stream-output record, rather than being dumped directly to stdout - `target-select` should provide inner error message in mi response Related bug report: - https://llvm.org/bugs/show_bug.cgi?id=28026 - https://llvm.org/bugs/show_bug.cgi?id=28718 - https://llvm.org/bugs/show_bug.cgi?id=30265 Reviewers: ki.stfu, abidh Subscribers: abidh, ki.stfu, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D24711 llvm-svn: 291104
* Quiet a warning where we weren't checking if this was the same and rhs.Greg Clayton2016-12-281-1/+2
| | | | llvm-svn: 290687
* Change the timeout in CallBoardSystemServiceOpenApplication to Jason Molenda2016-12-201-1/+1
| | | | | | | | 30 seconds to match the old springboard timeout; the launcher should time out before that and we will hopefully get back an informative error message instead of timing out ourselves. llvm-svn: 290163
* Remove an unused type declaration.Hafiz Abid Qadeer2016-12-161-6/+0
| | | | llvm-svn: 289947
* [CMake] Refactor LLDB libraries and tools to be componentsChris Bieneman2016-12-156-24/+6
| | | | | | In LLVM's CMake we have a convention that components have both a build and an install target. Making LLDB follow this convention will allow LLDB to take advantage of the LLVM_DISTRIBUTION_COMPONENTS build option from LLVM. llvm-svn: 289879
* Fix build for mingw.Hafiz Abid Qadeer2016-12-153-4/+4
| | | | | | | | | | | | Summary: I was building lldb using cross mingw-w64 toolchain on Linux and observed some issues. This is first patch in the series to fix that build. It mostly corrects the case of include files and adjusts some #ifdefs from _MSC_VER to _WIN32 and vice versa. I built lldb on windows with VS after applying this patch to make sure it does not break the build there. Reviewers: zturner, labath, abidh Subscribers: ki.stfu, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27759 llvm-svn: 289821
* Increase timeout for Frontboard app launch request from 9 to 20 secondsJason Molenda2016-12-081-1/+1
| | | | | | to match other timeouts. llvm-svn: 289023
* Clean up some use of __ANDROID_NDK__ in the cmake filesPavel Labath2016-12-054-15/+12
| | | | | | | | | | | | | | | Rationale: scripts/Python/modules: android is excluded at a higher level, so no point in checking here tools/lldb-mi: lldb-mi builds fine (with some cosmetic tweaks) on android, and there is no reason it shouldn't. tools/lldb-server: LLDB_DISABLE_LIBEDIT/CURSES already take the platform into account, so there is no point in checking again. I am reasonably confident this should not break the build on any platform, but I'll keep an eye out on the bots. llvm-svn: 288661
* Replace __ANDROID_NDK__ with __ANDROID__Pavel Labath2016-12-021-2/+0
| | | | | | | | | | | | | | | | | | | | Summary: This replaces all the uses of the __ANDROID_NDK__ define with __ANDROID__. This is a preparatory step to remove our custom android toolchain file and rely on the standard android NDK one instead, which does not provide this define. Instead I rely, on __ANDROID__, which is set by the compiler. I haven't yet removed the cmake variable with the same name, as we will need to do something completely different there -- NDK toolchain defines CMAKE_SYSTEM_NAME to Android, while our current one pretends it's linux. Reviewers: tberghammer, zturner Subscribers: danalbert, srhines, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27305 llvm-svn: 288494
* Remove a spurious reference to ProcessElfCorePavel Labath2016-11-301-1/+0
| | | | | | | | | | | We were referencing a the process class from a register context, which seems intuitively wrong. Also, the comment above that code is now definitely incorrect, as ProcessElfCore now does support floating point registers. Also, the code wasn't really doing anything, as it was just skipping a zero-initialization of a field that was most likely zero-initialized anyway. Linux elf core FPR test still passes after this. llvm-svn: 288237
* Add back some of the previous lldb-server dependenciesPavel Labath2016-11-291-0/+5
| | | | | | | | It seems a debug build of lldb-server will not complete without these, as the linker is not able to strip out code that aggressively. Add those back until I can figure out how to break the dependency chains. llvm-svn: 288181
* Remove some OS-specific plugins from lldb-server dependenciesPavel Labath2016-11-291-29/+0
| | | | | | | | I don't believe the code in those plugins could be in any way useful for lldb-server, but I can't be sure if this will break some transitive dependencies. Builtbots should be able to tell us that. llvm-svn: 288169
* Remove assorted other plugins which are not needed by lldb-serverPavel Labath2016-11-291-14/+0
| | | | | | language runtime, structured data, sanitizers, process plugins. llvm-svn: 288166
* Remove dynamic loader, platform and ABI plugins from lldb-server dependenciesPavel Labath2016-11-291-27/+0
| | | | | | These packages are not used on the server. llvm-svn: 288164
* Specify the dependencies of lldb-server manuallyPavel Labath2016-11-291-1/+209
| | | | | | | | | | | | | | | | | | | | | Summary: This basically just inlines the LLDBDependencies.cmake file into lldb-server CMakeLists.txt. The reason is that most of these dependencies are not actually necessary for lldb-server (some of them can't be removed because of cross-dependencies, but most of the plugins can). I intend to start cleaning these up in follow-up commits, but I want to do this first, so the subsequent ones can be easily reverted if they don't build in some configurations. When I cleaned these up locally, I was able to get a 30%--50% improvement in lldb-server size. Reviewers: zturner, beanz, tfiala Subscribers: danalbert, srhines, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D26975 llvm-svn: 288159
* Introduce chrono to more gdb-remote functionsPavel Labath2016-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* Fix one more build error with lldb-server.Zachary Turner2016-11-171-3/+3
| | | | llvm-svn: 287212
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-161-2/+1
| | | | | | | | | | | | | | | This is a large API change that removes the two functions from StreamString that return a std::string& and a const std::string&, and instead provide one function which returns a StringRef. Direct access to the underlying buffer violates the concept of a "stream" which is intended to provide forward only access, and makes porting to llvm::raw_ostream more difficult in the future. Differential Revision: https://reviews.llvm.org/D26698 llvm-svn: 287152
* Prevent at compile time converting from Error::success() to Expected<T>Mehdi Amini2016-11-111-1/+1
| | | | | | | | This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562
* Make the Error class constructor protectedMehdi Amini2016-11-111-1/+1
| | | | | | | | | This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
* Link lldb-mi only to the llvm components it usesPavel Labath2016-11-031-4/+3
| | | | | | | | | | | | | | Summary: liblldb does not re-export the llvm library contained within, so lldb-mi needs to manage its own dependencies. Right now it only uses the llvm support library. Reviewers: beanz, zturner, tfiala, clayborg, abidh Subscribers: ki.stfu, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D26190 llvm-svn: 285894
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-022-4/+3
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* [CMake] Rename lldb-launcher to darwin-debugChris Bieneman2016-10-271-2/+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
* Fixup r284466 - try to unbreak NetBSDPavel Labath2016-10-181-3/+4
| | | | | | | NetBSD does not have getopt as well - we need to apply the workaround there too. FreeBSD seems to be fine though. llvm-svn: 284469
* [cmake] Make dependencies of lldb libraries private, take 2Pavel Labath2016-10-183-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The dependencies of our libraries (only liblldb, really) we marked as public, which caused all their dependencies to be repeated when linking any executables to them. This is a problem because then all the .a files could end up being linked twice, once to liblldb and once again to to the executable linking against liblldb (lldb, lldb-mi). As it turns out, our build actually depends on this behavior: - on windows, lldb does not have getopt, so it pulls it from inside liblldb, even though getopt is not a part of the exported interface of liblldb (maybe some of the bsd variants have this problem as well) - lldb-mi uses llvm, which again is not exported by liblldb This change does not actually fix these problems (that is going to be a hard one), but it does make them explicit by moving this magic from add_lldb_library to the places the executable targets are defined. That way, I can link the additional .a files only on targets that really need it, and the other targets can build cleanly and make sure we don't regress further. It also fixes the LLVM_LINK_LLVM_DYLIB build on linux. Reviewers: zturner, beanz Subscribers: ki.stfu, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D25680 llvm-svn: 284466
* [LLDB-MI] Minor cleanup of CMICmnLLDBUtilSBValue classVadim Macagon2016-10-142-16/+17
| | | | | | | | | | | | | Summary: Placeholder c-strings don't need to be instance variables. Reviewers: ki.stfu, abidh Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25592 llvm-svn: 284231
* Make lldb -Werror clean on Windows.Zachary Turner2016-10-052-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D25247 llvm-svn: 283344
* Add the ability for the task port to change when a process execs.Greg Clayton2016-09-283-3/+34
| | | | | | <rdar://problem/28476369> llvm-svn: 282632
* Fix parsing expressions to evaluate with spaces and optional args (MI)Ilia K2016-09-221-10/+2
| | | | | | | | | | | | | | | | | | | | | Summary: When extracting options for long options (starting with `--`), the use of `MIUtilString::SplitConsiderQuotes` to split all the arguments was being conditioned on the option type to be expected. This was wrong as this caused other options to be parsed incorrectly since it was not taking into account the presence of quotes. Patch by Ed Munoz <edmunoz@microsoft.com> Reviewers: edmunoz, ki.stfu Subscribers: ki.stfu, lldb-commits Projects: #lldb Differential Revision: https://reviews.llvm.org/D24202 llvm-svn: 282135
* Fix typo in lldb --helpEd Maste2016-09-211-1/+1
| | | | | | | | Patch by Yacine Belkadi Differential Revision: https://reviews.llvm.org/D12158 llvm-svn: 282123
OpenPOWER on IntegriCloud