summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/debugserver.xcodeproj
Commit message (Collapse)AuthorAgeFilesLines
* Un-conditionalize use of libcompression. debugserver only buildsJason Molenda2018-12-181-93/+2
| | | | | | | | | | | | | | | | | | | | on Darwin systems and libcompression has been in the OS for over three years. Remove use of / linking to zlib. We'll always have libcompression available now. Create a scratch buffer via compression_encode_scratch_buffer_size() and use it in calls to compression_encode_buffer() to avoid compression_encode_buffer having to malloc & free a scratch buffer on each call. Tested by forcing compression to be enabled on macos native (normally only enabled on iOS et al devices), running the testsuite. <rdar://problem/41601084> llvm-svn: 349553
* Sort the files in the PBXBuildFile and PBXFileReference sectionsJason Molenda2018-06-151-152/+152
| | | | | | | | of debugserver's xcode project file to reduce automerger issues with the github swift repository of lldb where the order of these entries has drifted significantly over the years. llvm-svn: 334873
* Add an entitlement to debugserverFrederic Riss2018-06-141-1/+1
| | | | | | | | | On macOS 10.14, debugserver needs to have an entitlement do be allowed to debug processes. Adding this to both the Xcode and cmake build system. This shouldn't have any impact on previous OSs. llvm-svn: 334772
* Rename remotectl_com.apple.internal.xpc.remote.debugserver.plistJason Molenda2018-03-191-4/+4
| | | | | | | | | to com.apple.internal.xpc.remote.debugserver.plist, not sure where that remotectl_ prefix came from. <rdar://problem/36751222> llvm-svn: 327922
* I didn't see that SocketAddress.cpp was already being pulledJason Molenda2018-03-191-6/+2
| | | | | | | | in to debugserver; my re-addition resulted in duplicated symbols. Remove my added SocketAddress.cpp, and change the original one to also be included for the debugserver-mini target. llvm-svn: 327918
* Add the ios-mini target to the top-level xcodeproj, which buildsJason Molenda2018-03-191-0/+8
| | | | | | | | the debugserver-mini target in debugserver. Add a new plist which needs to be installed for debugserver-mini. <rdar://problem/36751222> llvm-svn: 327915
* I added CFLAGS etc to one part of the project file I should not have.Jason Molenda2018-03-091-49/+1
| | | | llvm-svn: 327097
* More cleanups of debugserver project file and the libpmenergy/libpmsampleJason Molenda2018-03-091-67/+132
| | | | | | | | stuff. Activate it when an internal SDK is selected. Update the name of the LDFLAGS to match the rest of the settings. Update the default arch for ios builds. llvm-svn: 327095
* Remove unneeded per-arch sdk specifications from debugserver xcode project file.Jason Molenda2018-03-091-42/+0
| | | | llvm-svn: 327088
* Remove the explicit dependency on libpmenergy and libpmsample.Jason Molenda2018-03-091-6/+2
| | | | llvm-svn: 327087
* Fixed two more sdk inconsistencies with the pmenergy stuff.Jason Molenda2018-03-091-5/+3
| | | | llvm-svn: 327085
* Three little cleanups in the debugserver xcode project file.Jason Molenda2018-03-091-103/+32
| | | | | | | | | | | | | | | | | 1. Link against libpmenergy and pmsample unconditionally. It is available on macOS 10.10 ("Yosemite") and newer. We're already linking against libcompression unconditionally which is only available on macOS 10.11 & newer. 2. Change a few "sdk=macosx.internal"'s to sdk=macosx. 3. Clean up a few places where libcompression was being enabled inconsistently. Note: the -DLLDB_ENERGY define is only set when building against the macosx.internal SDK; it includes a header file that is not public. We link against the dylibs unconditionally for simplicity. llvm-svn: 327084
* Add ability to collect memory limit.Han Ming Ong2018-02-281-0/+14
| | | | | | | | Reviewer: Jason Molenda <rdar://problem/37686560> llvm-svn: 326374
* Got rid of weak imports of libpenergy and libpsample because we are already ↵Han Ming Ong2018-02-271-84/+24
| | | | | | | requiring a modern macOS (at least 10.11) Reviewer: Jason Molenda llvm-svn: 326213
* Turn off the deprecated ALWAYS_SEARCH_USER_PATHS featureJason Molenda2018-02-031-0/+7
| | | | | | | | in debugserver. This is already set this way in the lldb project files but not in debugserver. Updating for consistency. llvm-svn: 324158
* Remove the hardcoded macos deployment targets altogetherJason Molenda2018-01-171-21/+0
| | | | | | | from the xcode project files. We'll build for the current OS only, by default. llvm-svn: 322603
* This change updates the deployment target for lldb and debugserverJason Molenda2018-01-091-40/+110
| | | | | | | | | | | | | | | | (built with Xcode) from 10.9 to 10.11. It also enables the use of libcompression in debugserver by default (these API are only present in macOS 10.11 and newer -- 10.11 was released c. Sep 2015). I don't know if we have people / bots building lldb on older mac releases; if this turns out to be a problem I will revert the change. There are some parts of lldb (e.g. debugserer's ability to report the OS version #) that only work with 10.10 and this changes the behavior of lldb (whether the older or newer dyld interfaces are used) so there is some importance to updating the min required version. llvm-svn: 322128
* Tweak to the debugserver entitlements setup in the xcode projectJason Molenda2017-12-191-22/+12
| | | | | | | file. For macos builds specifically, use the macosx entitlements files; for all other builds, use the ios etc entitlements. llvm-svn: 321051
* Re-landing IPv6 support for LLDB HostChris Bieneman2017-04-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | This support was landed in r300579, and reverted in r300669 due to failures on the bots. The failures were caused by sockets not being properly closed, and this updated version of the patches should resolve that. Summary from the original change: This patch adds IPv6 support to LLDB/Host's TCP socket implementation. Supporting IPv6 involved a few significant changes to the implementation of the socket layers, and I have performed some significant code cleanup along the way. This patch changes the Socket constructors for all types of sockets to not create sockets until first use. This is required for IPv6 support because the socket type will vary based on the address you are connecting to. This also has the benefit of removing code that could have errors from the Socket subclass constructors (which seems like a win to me). The patch also slightly changes the API and behaviors of the Listen/Accept pattern. Previously both Listen and Accept calls took an address specified as a string. Now only listen does. This change was made because the Listen call can result in opening more than one socket. In order to support listening for both IPv4 and IPv6 connections we need to open one AF_INET socket and one AF_INET6 socket. During the listen call we construct a map of file descriptors to addrin structures which represent the allowable incoming connection address. This map removes the need for taking an address into the Accept call. This does have a change in functionality. Previously you could Listen for connections based on one address, and Accept connections from a different address. This is no longer supported. I could not find anywhere in LLDB where we actually used the APIs in that way. The new API does still support AnyAddr for allowing incoming connections from any address. The Listen implementation is implemented using kqueue on FreeBSD and Darwin, WSAPoll on Windows and poll(2) everywhere else. https://reviews.llvm.org/D31823 llvm-svn: 301492
* Revert yesterdays IPv6 patchesPavel Labath2017-04-191-4/+0
| | | | | | | | | | | | | The break the linux bots (and probably any other machine which would run the test suite in a massively parallel way). The problem is that it can happen that we only successfully create an IPv6 listening socket (because the relevant IPv4 port is used by another process) and then the connecting side attempts to connect to the IPv4 port and fails. It's not very obvious how to fix this problem, so I am reverting this until we come up with a solution. llvm-svn: 300669
* Update DebugServer to support IPv6 over TCPChris Bieneman2017-04-181-0/+4
| | | | | | | | | | | | | | 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
* [debugserver] This is a small cleanup patch to AVX support detectionChris Bieneman2017-03-131-8/+0
| | | | | | | | | | | | | | | | | | | | | 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
* Add Foundation to the debugserver-mini dependencies;Jason Molenda2017-01-261-0/+2
| | | | | | debugserver-mini can use Foundation. llvm-svn: 293140
* Link debugserver against Foundation to get access to NSProcessInfo.Sean Callanan2017-01-251-14/+12
| | | | | | 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
* 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
* fix Xcode build after r281226Todd Fiala2016-09-121-1/+1
| | | | llvm-svn: 281243
* 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
* Add StructuredData plugin type; showcase with new DarwinLog featureTodd Fiala2016-08-191-3/+148
| | | | | | | | | | | | 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-191-148/+3
| | | | | | This reverts commit 1d885845d1451e7b232f53fba2e36be67aadabd8. llvm-svn: 279200
* Add StructuredData plugin type; showcase with new DarwinLog featureTodd Fiala2016-08-191-3/+148
| | | | | | | | | See docs/structured_data/StructuredDataPlugins.md for details. differential review: https://reviews.llvm.org/D22976 reviewers: clayborg, jingham llvm-svn: 279198
* Remove CFData from the xcodeproj as wellEnrico Granata2016-08-091-8/+0
| | | | llvm-svn: 278158
* 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
* Fix the "Release" build on MacOSX for debugserver. Extra bad include paths ↵Greg Clayton2016-06-211-1/+0
| | | | | | were making things not build due to header file issues with stdio.h. llvm-svn: 273306
* Change the "debugserver-mini" target (a version of debugserverJason Molenda2016-06-211-16/+24
| | | | | | | | | | | | | | | | | | which doesn't like against all the extra UI frameworks on ios) so it now generates a binary called "debugserver-nonui" and puts it in /usr/local/bin instead of /Developer/usr/bin. Add some cruft to RNBDefs.h to get the version number (provided by Xcode at build time) with either the name "debugserver" or "debugserver_nonui" as appropriate. Add the "debugserver-mini" target to the top level "ios" target in lldb xcode project file, so this nonui debugserver will be built along with the normal lldb / debugserver. <rdar://problem/24730789> llvm-svn: 273236
* Bump the lldb version # in the xcode project files fromJason Molenda2016-03-151-19/+19
| | | | | | 350.99.0 to 360.99.0. llvm-svn: 263529
* Xcode suggested enabling a "no common blocks" warningJason Molenda2015-10-292-9/+22
| | | | | | | (whatever that is) and wanted to clean up some duplicated entries in the project files. llvm-svn: 251586
* Remove some unnecessary macosx.internal SDK settings inJason Molenda2015-10-251-9/+9
| | | | | | the debugserver xcode project file. llvm-svn: 251221
* Upstreaming the apple internal changes that accumulated during theJason Molenda2015-10-231-28/+1013
| | | | | | | | | | | | previous release. Most of the diffs are duplication in the xcode project file caused by adding a "debugserver-mini" target. Jim Ingham added support for a new SPI needed to request app launches on iOS. Greg Clayton added code to indicate the platform of the binary (macosx, ios, watchos, tvos) based on Mach-O load commands. Jason Molenda added code so debugserver will identify when it is running on a tvos/watchos device to lldb. llvm-svn: 251091
* Remove DNBConfig.hBruce Mitchener2015-08-131-26/+0
| | | | | | | | | | | | | | | Summary: This was no longer needed and hasn't been needed since r143244 in 2011. This removes everything associated with generating or using it. Reviewers: clayborg, jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11971 llvm-svn: 244850
* Bump the version # in the xcode proj file from major number 340 to 350.Jason Molenda2015-08-041-8/+8
| | | | | | The SB API for major version 340 won't be changing any more. llvm-svn: 243943
* Fix debugserver build after someone moved StrintExtractor.h.Greg Clayton2015-07-071-4/+4
| | | | llvm-svn: 241628
* Resubmitting 240466 after fixing the linux test suite failures.Greg Clayton2015-06-251-0/+2
| | | | | | | | | | | | | | | A few extras were fixed - Symbol::GetAddress() now returns an Address object, not a reference. There were places where people were accessing the address of a symbol when the symbol's value wasn't an address symbol. On MacOSX, undefined symbols have a value zero and some places where using the symbol's address and getting an absolute address of zero (since an Address object with no section and an m_offset whose value isn't LLDB_INVALID_ADDRESS is considered an absolute address). So fixing this required some changes to make sure people were getting what they expected. - Since some places want to access the address as a reference, I added a few new functions to symbol: Address &Symbol::GetAddressRef(); const Address &Symbol::GetAddressRef() const; Linux test suite passes just fine now. <rdar://problem/21494354> llvm-svn: 240702
* Revert "Reduced packet counts to the remote GDB server where possible."Chaoren Lin2015-06-231-2/+0
| | | | | | | | | | This reverts commit 0cc0745ea9c68d7fdcadc9904cee3f13c96dae60. Due to breakage on Linux build bot: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/3436 llvm-svn: 240371
* Reduced packet counts to the remote GDB server where possible.Greg Clayton2015-06-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have been working on reducing the packet count that is sent between LLDB and the debugserver on MacOSX and iOS. Our approach to this was to reduce the packets required when debugging multiple threads. We currently make one qThreadStopInfoXXXX call (where XXXX is the thread ID in hex) per thread except the thread that stopped with a stop reply packet. In order to implement multiple thread infos in a single reply, we need to use structured data, which means JSON. The new jThreadsInfo packet will attempt to retrieve all thread infos in a single packet. The data is very similar to the stop reply packets, but packaged in JSON and uses JSON arrays where applicable. The JSON output looks like: [ { "tid":1580681, "metype":6, "medata":[2,0], "reason":"exception", "qaddr":140735118423168, "registers": { "0":"8000000000000000", "1":"0000000000000000", "2":"20fabf5fff7f0000", "3":"e8f8bf5fff7f0000", "4":"0100000000000000", "5":"d8f8bf5fff7f0000", "6":"b0f8bf5fff7f0000", "7":"20f4bf5fff7f0000", "8":"8000000000000000", "9":"61a8db78a61500db", "10":"3200000000000000", "11":"4602000000000000", "12":"0000000000000000", "13":"0000000000000000", "14":"0000000000000000", "15":"0000000000000000", "16":"960b000001000000", "17":"0202000000000000", "18":"2b00000000000000", "19":"0000000000000000", "20":"0000000000000000"}, "memory":[ {"address":140734799804592,"bytes":"c8f8bf5fff7f0000c9a59e8cff7f0000"}, {"address":140734799804616,"bytes":"00000000000000000100000000000000"} ] } ] It contains an array of dicitionaries with all of the key value pairs that are normally in the stop reply packet. Including the expedited registers. Notice that is also contains expedited memory in the "memory" key. Any values in this memory will get included in a new L1 cache in lldb_private::Process where if a memory read request is made and that memory request fits into one of the L1 memory cache blocks, it will use that memory data. If a memory request fails in the L1 cache, it will fall back to the L2 cache which is the same block sized caching we were using before these changes. This allows a process to expedite memory that you are likely to use and it reduces packet count. On MacOSX with debugserver, we expedite the frame pointer backchain for a thread (up to 256 entries) by reading 2 pointers worth of bytes at the frame pointer (for the previous FP and PC), and follow the backchain. Most backtraces on MacOSX and iOS now don't require us to read any memory! We will try these packets out and if successful, we should port these to lldb-server in the near future. <rdar://problem/21494354> llvm-svn: 240354
* Add a new wart, I mean feature, on to gdb-remote protocol: compression.Jason Molenda2015-06-181-8/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some communication channels, sending large packets can be very slow. In those cases, it may be faster to compress the contents of the packet on the target device and decompress it on the debug host system. For instance, communicating with a device using something like Bluetooth may be an environment where this tradeoff is a good one. This patch adds a new field to the response to the "qSupported" packet (which returns a "qXfer:features:" response) -- SupportedCompressions and DefaultCompressionMinSize. These tell you what the remote stub can support. lldb, if it wants to enable compression and can handle one of those algorithms, it can send a QEnableCompression packet specifying the algorithm and optionally the minimum packet size to use compression on. lldb may have better knowledge about the best tradeoff for a given communication channel. I added support to debugserver an lldb to use the zlib APIs (if -DHAVE_LIBZ=1 is in CFLAGS and -lz is in LDFLAGS) and the libcompression APIs on Mac OS X 10.11 and later (if -DHAVE_LIBCOMPRESSION=1). libz "zlib-deflate" compression. libcompression can support deflate, lz4, lzma, and a proprietary lzfse algorithm. libcompression has been hand-tuned for Apple hardware so it should be preferred if available. debugserver currently only adds the SupportedCompressions when it is being run on an Apple watch (TARGET_OS_WATCH). Comment that #if out from RNBRemote.cpp if you want to enable it to see how it works. I haven't tested this on a native system configuration but surely it will be slower to compress & decompress the packets in a same-system debug session. I haven't had a chance to add support for this to GDBRemoteCommunciationServer.cpp yet. <rdar://problem/21090180> llvm-svn: 240066
* Bump major vers # in xcode project file from 330 to 340.Jason Molenda2015-03-061-8/+8
| | | | llvm-svn: 231441
* Separate monolithic GDBRemoteCommunicationServer class into 4 partTamas Berghammer2015-02-111-1/+1
| | | | | | | | | | | GDBRemoteCommunicationServer: Basic packet handling, handler registration LLDBCommonPacketHandler: Common packet handling for lldb-platform and lldb-gdbserver LLDBPlatformPacketHandler: lldb-platform specific packet handling LLGSPacketHandler: lldb-gdbserver specific packet handling Differential Revision: http://reviews.llvm.org/D7538 llvm-svn: 228823
* Remove unused service plist.Jason Molenda2014-10-301-2/+0
| | | | llvm-svn: 220892
* Enable warnings in the debugserver project file..Jason Molenda2014-10-161-1/+17
| | | | llvm-svn: 219917
OpenPOWER on IntegriCloud