summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver
Commit message (Collapse)AuthorAgeFilesLines
...
* Update DebugServer to support IPv6 over TCPChris Bieneman2017-04-184-132/+134
| | | | | | | | | | | | | | Summary: This patch adds IPv6 support to debugserver. It follows a similar pattern to the changes proposed for LLDB/Host except that the listen implementation is only with kqueue(2) because debugserver is only supported on Darwin. Reviewers: jingham, jasonmolenda, clayborg Reviewed By: clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D31824 llvm-svn: 300580
* Support Unit Testing debugserverChris Bieneman2017-04-122-85/+69
| | | | | | | | | | | | | | | | | Summary: This patch refactors the CMake build system's support for building debugserver to allow us to build the majority of debugserver's sources into the debugserverCommon library which can then be reused by unit tests. The first unit test I've written tests debug server's ability to accept incoming connections from LLDB. The test forks the process, and one side creates a listening socket using debugserver's socket API, the other side creates a transmitting socket using LLDB's TCPSocket class. I have no clue where to even start getting this connected into the LLDB Xcode project, so for now these tests are CMake-only. Reviewers: zturner, labath, jasonmolenda Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D31357 llvm-svn: 300111
* Back out temporary masking of EXC_SYSCALL mach exceptions.Jason Molenda2017-04-031-1/+1
| | | | | | <rdar://problem/31359720> llvm-svn: 299345
* Mask out EXC_SYSCALL exceptions as well.Jason Molenda2017-03-301-1/+1
| | | | | | <rdar://problem/31335814> llvm-svn: 299040
* [debugserver] NFC. One more small cleanup to DNBArchImplX86_64::SetFPUStateChris Bieneman2017-03-151-13/+9
| | | | | | This is another similar cleanup to other changes I've been making to simplify the AVX code in debugserver. llvm-svn: 297880
* [debugserver] NFC. Cleanup Get/Set Register Value/ContextChris Bieneman2017-03-142-978/+535
| | | | | | This patch modifies the Get/Set Register Value/Context functions for Intel to not duplicate code for reading non-AVX registers. This is similar to other transformations I've been making to the AVX register handling code. llvm-svn: 297787
* [debugserver] Fixing a small logic error from r297685Chris Bieneman2017-03-141-1/+1
| | | | | | I had mixed up the logic during patch review. This resolves the test failure reading YMM registers on Darwin. llvm-svn: 297774
* [debugserver] NFC. Missed one bit of cleanup in r297688Chris Bieneman2017-03-131-22/+13
| | | | | | I did this cleanup in the x86_64, but missed it in the i386 code. This just simplifies the calls to thread_get_state. llvm-svn: 297691
* [debugserver] NFC. Cleanup DNBArchImpl*::GetFPUState()Chris Bieneman2017-03-133-242/+125
| | | | | | | | This patch consolidates the DEBUG_FPU_REGS code for i386 and x86_64 to take advantage of the fact that the non-AVX members of the avx register state structure overlap with the standard fpu register state structure. This reduces the amount of code required to set debug values into the register state structures because the register state structures are stored in a union. llvm-svn: 297688
* [debugserver] This is a small cleanup patch to AVX support detectionChris Bieneman2017-03-136-121/+55
| | | | | | | | | | | | | | | | | | | | | Summary: The first Sandybridge iMacs with AVX support shipped in Spring 2011 with Snow Leopard as their OS. Unfortunately due to a kernel bug debugging AVX code was not really possible until 10.7.4. The old code here checked the kernel build number to determine when to support AVX, but that code was incorrect. It verified that the kernel build number was greater than xnu-2020, which is the build of the kernel that had the fix for 10.8. The fix was also back ported to 10.7.4. Which means all publicly available OS builds 10.7.4 and later have working AVX support. This new patch verifies that the host OS is greater than or equal to 10.7.4 by checking that the build number is greater than or equal to 11Exx. The patch also removes the HasAVX assembly blob in favor of querying the kernel via sysctl for the hardware features. Using sysctl is slower, however since the code is executed once and the result cached it is a better approach because it is possible for the kernel to disable AVX support on hardware that supports it, so listening to the kernel is a better approach for the debugger to take. Reviewers: jasonmolenda, spyffe Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D30918 llvm-svn: 297685
* fix format specifier warningsTim Hammerquist2017-03-073-14/+21
| | | | llvm-svn: 297228
* Fix darwin build (llvm::once_flag fallout)Pavel Labath2017-02-061-2/+2
| | | | llvm-svn: 294221
* Switch std::call_once to llvm::call_onceKamil Rytarowski2017-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: The std::call_once implementation in libstdc++ has problems on few systems: NetBSD, OpenBSD and Linux PPC. LLVM ships with a homegrown implementation llvm::call_once to help on these platforms. This change is required in the NetBSD LLDB port. std::call_once with libstdc++ results with crashing the debugger. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg, emaste, mehdi_amini, clayborg Reviewed By: labath, clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29288 llvm-svn: 294202
* [CMake] Add accurate dependency specificationsChris Bieneman2017-01-312-16/+19
| | | | | | | | | | | | | | | | | 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
* 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
* 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-061-13/+2
| | | | | | | | | 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
* 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
* [CMake] Refactor LLDB libraries and tools to be componentsChris Bieneman2016-12-151-5/+1
| | | | | | 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
* Increase timeout for Frontboard app launch request from 9 to 20 secondsJason Molenda2016-12-081-1/+1
| | | | | | to match other timeouts. llvm-svn: 289023
* 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
* [CMake] Initial support for LLDB.frameworkChris Bieneman2016-09-211-18/+9
| | | | | | | | | | | | | | | | | | | Summary: This patch adds a CMake option LLDB_BUILD_FRAMEWORK, which builds libLLDB as a macOS framework instead of as a *nix shared library. With this patch any LLDB executable that has the INCLUDE_IN_FRAMEWORK option set will be built into the Framework's resources directory, and a symlink to the exeuctable will be placed under the build directory's bin folder. Creating the symlinks allows users to run commands from the build directory without altering the workflow. The framework generated by this patch passes the LLDB test suite, but has not been tested beyond that. It is not expected to be fully ready to ship, but it is a first step. With this patch binaries that are placed inside the framework aren't being properly installed. Fixing that would increase the patch size significantly, so I'd like to do that in a follow-up. Reviewers: zturner, tfiala Subscribers: beanz, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D24749 llvm-svn: 282110
* fix Xcode build after r281226Todd Fiala2016-09-121-1/+1
| | | | llvm-svn: 281243
* Move StdStringExtractor to tools/debugserverPavel Labath2016-09-125-5/+533
| | | | | | | | The class is only used in the debugserver. The rest of lldb has the StringExtractor class. Xcode project will need to be updated after this. llvm-svn: 281226
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-06103-33925/+32473
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Fix darwin cmake build for r279997Pavel Labath2016-08-301-1/+1
| | | | llvm-svn: 280087
* Update debugserver project to pull in StdStringExtractor.cpp instead of the newJason Molenda2016-08-301-8/+6
| | | | | | llvm-using StringExtractor.cpp in the xcode project file settings. llvm-svn: 280039
* Copy StringExtractor to StdStringExtractor.Zachary Turner2016-08-293-16/+16
| | | | | | | | | | | I have some improvements to make to StringExtractor that require using LLVM. debugserver can't take a dependency on LLVM but uses this file, so I'm forking it off into StdStringExtractor and StringExtractor, so that StringExtractor can take advantage of some performance improvements and readability improvements that LLVM can provide. llvm-svn: 279997
* Fix warnings preventing copy elision.Pavel Labath2016-08-251-10/+10
| | | | | | | | | | | | | | | | | Summary: Moving a temporary object prevents copy elision, which is exactly what clang points out by warning about this pattern. The fix is simply removal of std::move applied to temporary objects. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D23825 Author: Taras Tsugrii <ttsugrii@fb.com> llvm-svn: 279724
* Add StructuredData plugin type; showcase with new DarwinLog featureTodd Fiala2016-08-1936-32/+3675
| | | | | | | | | | | | Take 2, with missing cmake line fixed. Build tested on Ubuntu 14.04 with clang-3.6. See docs/structured_data/StructuredDataPlugins.md for details. differential review: https://reviews.llvm.org/D22976 reviewers: clayborg, jingham llvm-svn: 279202
* Revert "Add StructuredData plugin type; showcase with new DarwinLog feature"Todd Fiala2016-08-1936-3675/+32
| | | | | | This reverts commit 1d885845d1451e7b232f53fba2e36be67aadabd8. llvm-svn: 279200
* Add StructuredData plugin type; showcase with new DarwinLog featureTodd Fiala2016-08-1936-32/+3675
| | | | | | | | | See docs/structured_data/StructuredDataPlugins.md for details. differential review: https://reviews.llvm.org/D22976 reviewers: clayborg, jingham llvm-svn: 279198
* Switch over to using socketpair for local debugserver connections as they ↵Greg Clayton2016-08-121-1/+46
| | | | | | | | | | | | | | | | are twice as fast as TCP sockets (on macOS at least). This change opens a socket pair and passes the second socket pair file descriptor down to the debugserver binary using a new option: "--fd=N" where N is the file descriptor. This file descriptor gets passed via posix_spawn() so that there is no need to do any bind/listen or bind/accept calls and eliminates the hanshake unix socket that is used to pass the result of the actual port that ends up being used so it can save time on launch as well as being faster. This is currently only enabled on __APPLE__ builds. Other OSs should try modifying the #define from ProcessGDBRemote.cpp but the first person will need to port the --fd option over to lldb-server. Any OSs that enable USE_SOCKETPAIR_FOR_LOCAL_CONNECTION in their native builds can use the socket pair stuff. The #define is Apple only right now, but looks like: #if defined (__APPLE__) #define USE_SOCKETPAIR_FOR_LOCAL_CONNECTION 1 #endif <rdar://problem/27814880> llvm-svn: 278524
* Undo usage of LLVM macros in debugserverTodd Fiala2016-08-101-2/+2
| | | | | | | We don't take a dependency on LLVM in debugserver. This was failing to compile before. llvm-svn: 278190
* Delete Host/windows/win32.hZachary Turner2016-08-092-5/+5
| | | | | | | | | | | | | | | | | | | It's always hard to remember when to include this file, and when you do include it it's hard to remember what preprocessor check it needs to be behind, and then you further have to remember whether it's windows.h or win32.h which you need to include. This patch changes the name to PosixApi.h, which is more appropriately named, and makes it independent of any preprocessor setting. There's still the issue of people not knowing when to include this, because there's not a well-defined set of things it exposes other than "whatever is missing on Windows", but at least this should make it less painful to fix when problems arise. This patch depends on LLVM revision r278170. llvm-svn: 278177
* Remove CFData from the xcodeproj as wellEnrico Granata2016-08-091-8/+0
| | | | llvm-svn: 278158
* [debugserver] Delete CFData.{h,cpp}, since they appear to be dead (NFCI)Vedant Kumar2016-08-094-114/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D23070 llvm-svn: 278142
* [lldb] Delete dead, infinitely-recursive code (NFC)Vedant Kumar2016-08-012-12/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D22985 llvm-svn: 277351
* Add a new DynamicLoader plugin that uses SPI that are in developmentJason Molenda2016-07-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | for the fall (northern hemisphere) 2016 Darwin platforms to learn about loaded images, instead of reading dyld internal data structures. These new SPI don't exist on older releases, and new packets are needed from debugserver to use them (those changes are already committed). I had to change the minimum deployment target for debugserver in the xcode project file to macOS 10.10 so that debugserver will use the [[NSProcessInfo processInfo] operatingSystemVersion] call in MachProcess::GetOSVersionNumbers to get the operarting system version # -- this API is only available in macOS 10.10 and newer ("OS X Yosemite", released Oct 2014). If we have many people building llvm.org lldb on older systems still, we can back off on this for the llvm.org sources. There should be no change in behavior with this commit, either to older darwin systems or newer darwin systems. For now the new DynamicLoader plugin is never activated - I'm forcing the old plugin to be used in DynamicLoaderDarwin::UseDYLDSPI. I'll remove that unconditional use of the old plugin soon, so the newer plugin is used on the newest Darwin platforms. <rdar://problem/25251243> llvm-svn: 276254
* Try to fix the OSX build with old SDK after r274725Tamas Berghammer2016-07-071-2/+12
| | | | llvm-svn: 274743
* debugserver will now report the minimum version load commandJason Molenda2016-07-072-0/+47
| | | | | | | | | | | | os name and version # from the mach-o binary as it scans the header/load commands from memory and sends the details back in the jGetLoadedDynamicLibrariesInfos response. lldb isn't using these fields yet but I have a suspicion I'm going to need them soon. <rdar://problem/25251243> llvm-svn: 274725
OpenPOWER on IntegriCloud