summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/macosx
Commit message (Collapse)AuthorAgeFilesLines
...
* Start the refactoring of globbingEnrico Granata2015-02-201-0/+86
| | | | | | | | | | | | | - Add Host::GlobArguments() to perform local-globbing I implemented this on OSX and Windows in terms of argdumper (Windows implementation is essentially the same as the OSX version + a change in binary name and some string magic) Other platforms did not specifically chime in, so I left it unimplemented for them for the time being. Please feel free to fill in the blanks - Add Platform::GlobArguments() to support remote-globbing For now, no feature change here - but now we have infrastructure to help GDBRemote targets to support globbing - and patches to that effect will follow No visible feature change llvm-svn: 230065
* Close terminal after LaunchInTerminalTestCase testIlia K2015-02-111-0/+2
| | | | | | | | | | | | | | | | Summary: The test_launch_in_terminal test leaves a running terminal. This patch adds "exit" after debugging with eLaunchFlagLaunchInTTY flag. Reviewers: jingham, zturner, clayborg Reviewed By: clayborg Subscribers: emaste, vharron, lldb-commits, clayborg, jingham, zturner Differential Revision: http://reviews.llvm.org/D7468 llvm-svn: 228801
* Remove unused function:Greg Clayton2015-01-201-43/+0
| | | | | | | | | | | lldb::pid_t Host::LaunchApplication (const FileSpec &app_file_spec); This had use of a function FSPathMakeRef(const UInt8*, FSRef *, ...) that was deprecated in 10.8. Removing this fucntion since it wasn't used and was causing warnings. llvm-svn: 226608
* Fix a -Wnull-conversion warning.Nico Weber2015-01-151-1/+1
| | | | llvm-svn: 226181
* Fix needed for the new terminal test I previously checked in. It was ↵Greg Clayton2015-01-061-12/+17
| | | | | | crashing due to a NULL dereference. llvm-svn: 225316
* More fixes to ensure if we are asked to launch a x86_64h process on darwin, ↵Greg Clayton2015-01-061-1/+2
| | | | | | that darwin-debug knows what to do and how to handle it. llvm-svn: 225225
* Add support for embedding Clang compiler headersSean Callanan2014-12-051-0/+20
| | | | | | | | | like tgmath.h and stdarg.h into the LLDB installation, and then finding them through the Host infrastructure. Also add a script to actually do this on Mac OS X. llvm-svn: 223430
* Fixed more fallout from running the test suite remotely on iOS devices.Greg Clayton2014-11-171-11/+9
| | | | | | | | | | | | | | | | Fixed include: - Change Platform::ResolveExecutable(...) to take a ModuleSpec instead of a FileSpec + ArchSpec to help resolve executables correctly when we have just a path + UUID (no arch). - Add the ability to set the listener in SBLaunchInfo and SBAttachInfo in case you don't want to use the debugger as the default listener. - Modified all places that use the SBLaunchInfo/SBAttachInfo and the internal ProcessLaunchInfo/ProcessAttachInfo to not take a listener as a parameter since it is in the launch/attach info now - Load a module's sections by default when removing a module from a target. Since we create JIT modules for expressions and helper functions, we could end up with stale data in the section load list if a module was removed from the target as the section load list would still have entries for the unloaded module. Target now has the following functions to help unload all sections a single or multiple modules: size_t Target::UnloadModuleSections (const ModuleList &module_list); size_t Target::UnloadModuleSections (const lldb::ModuleSP &module_sp); llvm-svn: 222167
* Remove always-true part of a conditional expression.Jason Molenda2014-10-171-1/+1
| | | | | | clang warning. llvm-svn: 220018
* Fix accidental over-checking of args in launcherXPCService.Jason Molenda2014-10-161-1/+1
| | | | llvm-svn: 219895
* Fix a potential null pointer deref & a potential memory leak,Jason Molenda2014-10-161-26/+54
| | | | | | | | also reformat to conform to the usual lldb coding conventions a little better. clang static analyzer fixit. llvm-svn: 219893
* Create a process launcher abstraction.Zachary Turner2014-10-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements Host::LaunchProcess for windows, and in doing so does some minor refactor to move towards a more modular process launching design. The original motivation for this is that launching processes on windows needs some very windows specific code, which would live most appropriately in source/Host/windows somewhere. However, there is already some common code that all platforms use when launching a process before delegating to the platform specific stuff, which lives in source/Host/common/Host.cpp which would be nice to reuse without duplicating. This commonality has been abstracted into MonitoringProcessLauncher, a class which abstracts out the notion of launching a process using an arbitrary algorithm, and then monitoring it for state changes. The windows specific launching code lives in ProcessLauncherWindows, and the posix specific launching code lives in ProcessLauncherPosix. When launching a process MonitoringProcessLauncher is created, and then an appropriate delegate launcher is created and given to the MonitoringProcessLauncher. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5781 llvm-svn: 219731
* Move ConnectionFileDescriptor to platform-specific Host directory.Zachary Turner2014-10-061-1/+1
| | | | | | | | | | | | As part of getting ConnectionFileDescriptor working on Windows, there is going to be alot of platform specific work to be done. As a result, the implementation is moving into Host. This patch performs the code move and fixes up call-sites appropriately. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5548 llvm-svn: 219143
* Test suite runs better again after recent fixes that would select a platform ↵Greg Clayton2014-09-191-1/+1
| | | | | | | | | | | | | if a "file a.out" auto selected a different platform than the selected one. Changes include: - fix it so you can select the "host" platform using "platform select host" - change all callbacks that create platforms to returns shared pointers - fix TestImageListMultiArchitecture.py to restore the "host" platform by running "platform select host" - Add a new "PlatformSP Platform::Find(const ConstString &name)" method to get a cached platform - cache platforms that are created and re-use them instead of always creating a new one llvm-svn: 218145
* Create a HostThread abstraction.Zachary Turner2014-09-093-124/+157
| | | | | | | | | | | | | This patch moves creates a thread abstraction that represents a thread running inside the LLDB process. This is a replacement for otherwise using lldb::thread_t, and provides a platform agnostic interface to managing these threads. Differential Revision: http://reviews.llvm.org/D5198 Reviewed by: Jim Ingham llvm-svn: 217460
* Add back a return that got lost in rebaseKeno Fischer2014-09-091-0/+1
| | | | llvm-svn: 217415
* Fix configure & make build with python disabledKeno Fischer2014-09-091-1/+4
| | | | | | | | | | | | | This makes sure that nothing that requires Python is being built when the LLDB_DISABLE_PYTHON flag is being passed in. It also changes a use of CPPFLAGS to CPP.Flags since the former is overridden when external flags are passed in while the later is not. I'm not sure exactly why LLDB_DISABLE_PYTHON is in CXXFLAGS rather than CPPFLAGS, but cleaning that up is for another commit. Differential Revision: http://reviews.llvm.org/D4918 llvm-svn: 217414
* Change back all paths returns for lldb::PathType enumerations from ↵Greg Clayton2014-08-251-5/+6
| | | | | | HostInfo::GetLLDBPath() to return the directories in the FileSpec.m_directory field to match previous implementations. This change previously broke some path stuff in upstream branches. llvm-svn: 216398
* Resurect preprocessor definitions that got lost moving to HostInfoKeno Fischer2014-08-231-0/+10
| | | | | | | | | | When building without XCode on sytems where these constants are not in the system header (or I presume with older versions of XCode), these are needed to make this file compile, since unlike most other uses of MachO specific constants, these use the system headers rather than the LLVM-defined ones. llvm-svn: 216332
* Bump the verison number in the xcode project files.Jason Molenda2014-08-212-2/+2
| | | | llvm-svn: 216245
* Two small fixes to get Mac native + debugserver working after theJason Molenda2014-08-211-2/+2
| | | | | | | HostInfo et al changes from Zachary. Changes suggested by Zachary - fixes the problems I was seeing. llvm-svn: 216243
* Move the rest of the HostInfo functions over.Zachary Turner2014-08-211-0/+27
| | | | | | | | | This should bring HostInfo up to 99% completion. The remainder of code in Host will be split into instantiatable classes representing host processes, threads, dynamic libraries, and process launching strategies. llvm-svn: 216230
* Move Host::GetLLDBPath to HostInfo.Zachary Turner2014-08-212-18/+125
| | | | | | | | This continues the effort to get Host code moved over to HostInfo, and removes many more instances of preprocessor defines along the way. llvm-svn: 216195
* Move Host::GetArchitecture to HostInfo::GetArchitecture.Zachary Turner2014-08-201-0/+66
| | | | | | | | As a side effect, this patch also eliminates all of the preprocessor conditionals previously used to implement GetArchitecture(). llvm-svn: 216074
* Move some Host logic into HostInfo class.Zachary Turner2014-08-192-66/+85
| | | | | | | | | | | | | | | | | | This patch creates a HostInfo class, a static class used to answer basic queries about the host platform. As part of this change, some functionality is moved from Host to HostInfo, and relevant fixups are performed in the rest of the codebase. This is part of a larger effort to isolate more code in the Host layer into platform-specific groups, to make it easier to make platform specific changes for a particular Host without breaking other hosts. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D4963 llvm-svn: 215992
* In the CMake build, convert lldbHost to be a single static library.Zachary Turner2014-08-151-14/+0
| | | | | | | | | Previously lldbHost was built as multiple static libraries such as lldbHostCommon, lldbHostLinux, etc. With this patch, the CMake build produces only a single static library, lldbHost, whose file set is dynamically created based on the platform. llvm-svn: 215792
* Refactor FileAction out of ProcessLaunchInfo.Zachary Turner2014-08-141-1/+1
| | | | | | | | | | | | | FileAction was previously a nested class in ProcessLaunchInfo. This led to some unfortunate style consequences, such as requiring the AddPosixSpawnFileAction() funciton to be defined in the Target layer, instead of the more appropriate Host layer. This patch makes FileAction its own independent class in the Target layer, and then moves AddPosixSpawnFileAction() into Host as a result. Differential Revision: http://reviews.llvm.org/D4877 llvm-svn: 215649
* Now that setting an architecture from a mach-o CPU type and subtype doesn't ↵Greg Clayton2014-08-021-0/+2
| | | | | | set the OS type, make sure to set it. llvm-svn: 214600
* __arm64__ and __aarch64__ #ifdef adjustmentsTodd Fiala2014-07-092-9/+9
| | | | | | | | Change by Paul Osmialowski See http://reviews.llvm.org/D4379 for details. llvm-svn: 212583
* Simplify Host::GetOSVersion() on macosx.Jean-Daniel Dupas2014-07-081-46/+7
| | | | | | It removes usage of the deprecated function CFURLCreateDataAndPropertiesFromResource(). llvm-svn: 212552
* Removing Carbon dependency by removing obsolete code.Jean-Daniel Dupas2014-07-021-93/+0
| | | | | | | The only part using Carbon is a function in Host.mm used to open a file in Xcode. That code is broken and it is no longer useful as Xcode supports LLDB natively. llvm-svn: 212208
* Fix typos.Bruce Mitchener2014-07-011-5/+5
| | | | llvm-svn: 212132
* Added an option to turn OFF the "detach on error" behavior that was addedJim Ingham2014-06-251-1/+1
| | | | | | | | to debugserver when launching processes. <rdar://problem/16216199> llvm-svn: 211658
* Rework fix in r201744. You really DO need to waitpid twice to get theJim Ingham2014-06-241-1/+6
| | | | | | | | | | | process fully reaped. The race & bad behavior was because we were letting the reaping thread in LLDB to also set the Process exit status, so debugserver would sometimes be shut down before it got a chance to report the exit status, and then we got confused. <rdar://problem/16555850> llvm-svn: 211636
* iOS simulator cleanup to make sure we use "*-apple-ios" for iOS simulator ↵Greg Clayton2014-05-291-7/+31
| | | | | | | | | | | | | | | | | | apps and binaries. Changes include: - ObjectFileMachO can now determine if a binary is "*-apple-ios" or "*-apple-macosx" by checking the min OS and SDK load commands - ArchSpec now says "<arch>-apple-macosx" is equivalent to "<arch>-apple-ios" since the simulator mixes and matches binaries (some from the system and most from the iOS SDK). - Getting process inforamtion on MacOSX now correctly classifies iOS simulator processes so they have "*-apple-ios" architectures in the ProcessInstanceInfo - PlatformiOSSimulator can now list iOS simulator processes correctly instead of showing nothing by using: (lldb) platform select ios-simulator (lldb) platform process list - debugserver can now properly return "*-apple-ios" for the triple in the process info packets for iOS simulator executables - GDBRemoteCommunicationClient now correctly passes along the triples it gets for process info by setting the OS in the llvm::Triple correctly <rdar://problem/17060217> llvm-svn: 209852
* Workaround for collision between enum members in LLVM's MachO.h and system ↵Jim Ingham2014-04-021-1/+1
| | | | | | | | | | headers on Mac OS X (in particular mach/machine.h). <rdar://problem/16494607> llvm-svn: 205480
* sanitise sign comparisonsSaleem Abdulrasool2014-04-021-5/+5
| | | | | | | | This is a mechanical change addressing the various sign comparison warnings that are identified by both clang and gcc. This helps cleanup some of the warning spew that occurs during builds. llvm-svn: 205390
* lldb arm64 import.Jason Molenda2014-03-292-8/+32
| | | | | | | | | | | | | | | | These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
* cleanup unreferenced functionsSaleem Abdulrasool2014-03-201-24/+0
| | | | | | | | | | | | | This is a mechanical cleanup of unused functions. In the case where the functions are referenced (in comment form), I've simply commented out the functions. A second pass to clean that up is warranted. The functions which are otherwise unused have been removed. Some of these were introduced in the initial commit and not in use prior to that point! NFC llvm-svn: 204310
* build: fix libxml2 detection via CMakeSaleem Abdulrasool2014-03-141-1/+1
| | | | | | | | | | | | | | | | | libxml2's include path was unconditionally set to /usr/include/libxml2. This would work previously, however, Mavericks removed the /usr/include directory. Since LLDB already requires clang, which via LLVM's build infrastructure searches for libxml2, we have a proper include path for libxml2. If LIBXML2_FOUND is set, do not touch the libxml2 search path. Instead, allow the clang's definition to propagate throughout the LLVM build. Otherwise, switch to find_package(LibXml2) as clang does. This will ensure that the correct path is used for libxml2 irrespective of the platform. Furthermore, treat libxml2 as a system provided library. It is not part of the LLVM source base so it is of little value to enable all warnings on its headers. This unifies the treatment of libxml2 across clang and LLDB. llvm-svn: 203955
* <rdar://problem/15996848>Han Ming Ong2014-02-103-4/+49
| | | | | | | Made sure we pass along the file action paths for stdin/stdout/stderr to the XPC service. [Reviewed by Greg Clayton] llvm-svn: 201103
* Unify OS X/POSIX/Linux Host spawn support.Todd Fiala2014-01-231-218/+1
| | | | | | | | | | | | | | | This fixes a bug under Linux where spawning a process via Host::LaunchProcess was disabling all blockable signals on the launched process. This caused strange behavior when attempting to kill the lldb-gdbserver process, as the child generally would not die unless killed with a non-blockable signal (e.g. 'kill -9'). This change moves several functions out of macosx/Host.mm into common/Host.cpp. In addition, two functions that needed to work across common/Host.cpp and macosx/Host.mm were moved into the Host.h header file. llvm-svn: 199856
* Add support for Haswell on x86_64.Greg Clayton2014-01-221-2/+4
| | | | | | <rdar://problem/15312873> llvm-svn: 199854
* Update the lldb version number in the xcode project files from 310.99.0 to ↵Jason Molenda2014-01-102-2/+2
| | | | | | 320.99.0. llvm-svn: 198917
* Only check os version for POSIX_SPAWN_CLOEXEC_DEFAULT on desktop builds of LLDB.Greg Clayton2014-01-081-1/+1
| | | | llvm-svn: 198800
* Fixed a kernel panic that would occur if you debug anything on MacOSX 10.7 ↵Greg Clayton2014-01-081-43/+72
| | | | | | or earlier due to the use of the POSIX_SPAWN_CLOEXEC_DEFAULT attribute flag that closes all file descriptors on exec. We now dyamically detect the OS version and do the right thing. llvm-svn: 198776
* <rdar://problem/15639995>Han Ming Ong2013-12-191-19/+8
| | | | | | Allow the root XPC launcher to launch any target as root. llvm-svn: 197634
* Remove useless includesJean-Daniel Dupas2013-12-121-3/+0
| | | | llvm-svn: 197147
* Enable POSIX_SPAWN_CLOEXEC_DEFAULT (a darwin specific flag) when available ↵Greg Clayton2013-12-041-4/+4
| | | | | | when using posix_spawn to spawn processes to close all file handles. llvm-svn: 196404
* Expose SBPlatform through the public API.Greg Clayton2013-11-201-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example code: remote_platform = lldb.SBPlatform("remote-macosx"); remote_platform.SetWorkingDirectory("/private/tmp") debugger.SetSelectedPlatform(remote_platform) connect_options = lldb.SBPlatformConnectOptions("connect://localhost:1111"); err = remote_platform.ConnectRemote(connect_options) if err.Success(): print >> result, 'Connected to remote platform:' print >> result, 'hostname: %s' % (remote_platform.GetHostname()) src = lldb.SBFileSpec("/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework", False) dst = lldb.SBFileSpec() # copy src to platform working directory since "dst" is empty err = remote_platform.Install(src, dst); if err.Success(): print >> result, '%s installed successfully' % (src) else: print >> result, 'error: failed to install "%s": %s' % (src, err) Implemented many calls needed in lldb-platform to be able to install a directory that contains symlinks, file and directories. The remote lldb-platform can now launch GDB servers on the remote system so that remote debugging can be spawned through the remote platform when connected to a remote platform. The API in SBPlatform is subject to change and will be getting many new functions. llvm-svn: 195273
OpenPOWER on IntegriCloud