summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
Commit message (Collapse)AuthorAgeFilesLines
...
* Create a ConnectionGenericFile class for Windows.Zachary Turner2014-10-062-0/+338
| | | | | | | | | | | | | This is the first step in getting ConnectionFileDescriptor ported to Windows. It implements a connection against a disk file for windows. This supports connection strings of the form file://PATH which are currently supported only on posix platforms in ConnectionFileDescriptor. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5608 llvm-svn: 219145
* Move ConnectionFileDescriptor to platform-specific Host directory.Zachary Turner2014-10-063-1/+785
| | | | | | | | | | | | 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
* Fixup some minor issues with HostProcess.Zachary Turner2014-09-303-0/+12
| | | | llvm-svn: 218684
* Enable llgs to build against experimental Android AOSP ↵Todd Fiala2014-09-275-2/+51
| | | | | | | | | | | | lldb/llvm/clang/compiler-rt repos. See http://reviews.llvm.org/D5495 for more details. These are changes that are part of an effort to support building llgs, within the AOSP source tree, using the Android.mk build system, when using the llvm/clang/lldb git repos from AOSP replaced with the experimental ones currently in github.com/tfiala/aosp-{llvm,clang,lldb,compiler-rt}. llvm-svn: 218568
* Fix up the HostThread interface, making the interface simpler.Zachary Turner2014-09-234-47/+35
| | | | | | | Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5417 llvm-svn: 218325
* Test suite runs better again after recent fixes that would select a platform ↵Greg Clayton2014-09-192-2/+2
| | | | | | | | | | | | | 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
* Clean-up warnings on Linux/GCCDavid Majnemer2014-09-161-2/+2
| | | | llvm-svn: 217862
* Nope, I was right originally. ResolveUsername should resolve "~" to the Jim Ingham2014-09-121-2/+3
| | | | | | | current user, and ResolvePartialUsername will resolve "~" to the list of users. llvm-svn: 217723
* Don't make paths with /Foo//bar, that confuses everybody down the line.Jim Ingham2014-09-121-1/+10
| | | | | | This gets the file completer for absolute paths working again. llvm-svn: 217722
* Revert 217719, that wasn't the right fix, that should complete user names, andJim Ingham2014-09-121-2/+2
| | | | | | | anyway /Vol doesn't complete correctly either. Somehow we're chopping the names up incorrectly before passing them into the completer. llvm-svn: 217720
* ResolveUsername should resolve "~" to the user's home directory as well as ↵Jim Ingham2014-09-121-2/+2
| | | | | | | | "~/". This gets command-line file completion from ~ working again. llvm-svn: 217719
* llgs: fix thread names broken by recent native thread changes.Todd Fiala2014-09-121-1/+1
| | | | | | | | * Fixes the local stack variable return pointer usage in NativeThreadLinux::GetName(). * Changes NativeThreadProtocol::GetName() to return a std::string. * Adds a unit test to verify thread names don't regress in the future. Currently only run on Linux since I know default thread names there. llvm-svn: 217717
* llgs: fix Ctrl-C inferior interrupt handling to do the right thing.Todd Fiala2014-09-112-7/+37
| | | | | | | | | | | | | | | | * Sends a SIGSTOP to the process. * Fixes busted SIGSTOP handling. Now builds a list of non-stopped that we wait for the PTRACE group-stop for. When the final must-stop tid gets its group stop, we propagate the process state change. Only the signal receiving the notification of the pending SIGSTOP is marked with the SIGSTOP signal. All the rest, if they weren't already stopped, are marked as stopped with signal 0. * Fixes a few broken tests. * Marks the Linux test I added earlier as expect-pass (no longer XFAIL). Implements fix for http://llvm.org/bugs/show_bug.cgi?id=20908. llvm-svn: 217647
* Add missing constructor definition.Zachary Turner2014-09-111-0/+5
| | | | llvm-svn: 217634
* Update HostProcess to use the same facade pattern as HostThread.Zachary Turner2014-09-114-61/+81
| | | | llvm-svn: 217632
* Move FreeBSD's thread SetName implementation to ThisThreadEd Maste2014-09-102-7/+1
| | | | | | | | SetName is only used in LLDB to set a thead's own name. Move it there to match OS X and Windows and slightly reduce the effort in any future HostThread/ThisThread name refactoring. llvm-svn: 217521
* Fix FreeBSD build after thread changesEd Maste2014-09-102-4/+5
| | | | | | | More work on the GetName/SetName arguments (thread_t vs tid_t) is needed but this change should restore the build and basic operation. llvm-svn: 217502
* Include the correct headers for kinfo_proc on FreeBSD.Zachary Turner2014-09-091-0/+2
| | | | llvm-svn: 217464
* Try to fix the FreeBSD build.Zachary Turner2014-09-092-4/+5
| | | | llvm-svn: 217462
* Create a HostThread abstraction.Zachary Turner2014-09-0922-500/+868
| | | | | | | | | | | | | 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-093-2/+9
| | | | | | | | | | | | | 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
* Fix MacOSX cmake build for new HostInfoMacOSX file.Todd Fiala2014-09-021-0/+1
| | | | | | Change by Stephane Sezer. llvm-svn: 216948
* Consolidate UnixSignals setting/getting in Process.Todd Fiala2014-08-293-1/+31
| | | | | | | | | | | | | | | | See http://reviews.llvm.org/D5108 for details. This change does the following: * eliminates the Process::GetUnixSignals() virtual method and replaces with a fixed getter. * replaces the Process UnixSignals storage with a shared pointer. * adds a Process constructor variant that can be passed the UnixSignalsSP. When the constructor without the UnixSignalsSP is specified, the Host's default UnixSignals is used. * adds a host-specific version of GetUnixSignals() that is used when we need the host's appropriate UnixSignals variant. * replaces GetUnixSignals() overrides in PlatformElfCore, ProcessGDBRemote, ProcessFreeBSD and ProcessLinux with code that appropriately sets the Process::UnixSignals for the process. This change also enables some future patches that will enable llgs to be used for local Linux debugging. llvm-svn: 216748
* Ensure the Host wait4 thread is able to show pid in thread name.Todd Fiala2014-08-281-1/+12
| | | | | | | | | For hosts that cannot support long thread names, shrink the host wait4 thread name so that it does not truncate the PID in the thread name. Change by Shawn Best. llvm-svn: 216686
* llgs: add proper exec support for Linux.Todd Fiala2014-08-282-0/+27
| | | | | | | | | | | | | | | This change: * properly captures execs in NativeProcessLinux. * clears out all non-main-thread thread metadata in NativeProcessLinux on exec. * adds a DidExec() method to the NativeProcessProtocol delegate. * clears out the auxv data cache when we exec (on Linux). This is a small part of the llgs for local Linux debugging work going on here: https://github.com/tfiala/lldb/tree/dev-llgs-local I'm breaking it into small patches. llvm-svn: 216670
* Fix linker error due to missing static variable instantiation.Zachary Turner2014-08-271-0/+2
| | | | llvm-svn: 216612
* Create a HostProcess class.Zachary Turner2014-08-273-0/+215
| | | | | | | | | | | This is a lightweight wrapper around a pid. It is intended to be lightweight enough to serve as a replacement anywhere we currently store a pid. It provides convenience methods and common process operations. This patch does not yet make use of HostProcess anywhere. llvm-svn: 216607
* Update LLDB to use LLVM's DynamicLibrary.Zachary Turner2014-08-274-180/+0
| | | | | | | | | LLDB had implemented its own DynamicLibrary class for plugin support. LLVM has an equivalent mechanism, so this patch deletes the duplicated code in LLDB and updates LLDB to reference the mechanism provided by LLVM. llvm-svn: 216606
* lldb AArch64 should be listed as yet another 64-bit architecture in ↵Todd Fiala2014-08-271-0/+1
| | | | | | | | | | HostInfoBase. See http://reviews.llvm.org/D5070. Change by Paul Osmialowski. llvm-svn: 216556
* Change back all paths returns for lldb::PathType enumerations from ↵Greg Clayton2014-08-255-16/+17
| | | | | | 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
* Fixes a few more places where we were manually setting the filename.Zachary Turner2014-08-211-1/+1
| | | | llvm-svn: 216247
* 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-217-117/+106
| | | | | | | | | 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
* Fix compile error on Linux due to previous commit.Zachary Turner2014-08-212-2/+3
| | | | llvm-svn: 216227
* Move GetUsername and GetGroupname to HostInfoPosixZachary Turner2014-08-213-90/+54
| | | | llvm-svn: 216210
* Convert static constructors to be explicitly initialized at startupZachary Turner2014-08-212-53/+91
| | | | llvm-svn: 216197
* Move Host::GetLLDBPath to HostInfo.Zachary Turner2014-08-217-359/+415
| | | | | | | | 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
* Revert "Avoid global contstructors and place static variablesZachary Turner2014-08-201-19/+18
| | | | | | | | | | | | | | | | | inside classes as static local variables and remove the static ivars. Subclasses should use the accessor functions." This change moved global statics to function local statics, but forgot to make the locals static in the function, breaking all platforms. Furthermore, MSVC doesn't support thread-safe function local statics, so any use of a function local static on non primitive types is undefined behavior on MSVC. Reverting due to the fact that it's broken on all platforms, but would like to have a discussion about the thread-safety issue before it goes back in. llvm-svn: 216123
* Avoid global contstructors and place static variables inside classes as ↵Greg Clayton2014-08-201-18/+19
| | | | | | static local variables and remove the static ivars. Subclasses should use the accessor functions. llvm-svn: 216080
* Move Host::GetArchitecture to HostInfo::GetArchitecture.Zachary Turner2014-08-205-154/+149
| | | | | | | | As a side effect, this patch also eliminates all of the preprocessor conditionals previously used to implement GetArchitecture(). llvm-svn: 216074
* Add includes needed for FreeBSD.Zachary Turner2014-08-191-0/+3
| | | | llvm-svn: 216000
* Move some Host logic into HostInfo class.Zachary Turner2014-08-1912-439/+507
| | | | | | | | | | | | | | | | | | 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
* Fix an issue with source file groupings in the CMake build.Zachary Turner2014-08-181-1/+1
| | | | llvm-svn: 215901
* In the CMake build, convert lldbHost to be a single static library.Zachary Turner2014-08-157-76/+65
| | | | | | | | | 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
* Try to fix the Make buildZachary Turner2014-08-152-0/+17
| | | | llvm-svn: 215782
* Move FileSystem functions out of Host and into their own classes.Zachary Turner2014-08-1511-493/+569
| | | | | | | | | | | | | | | | More specifically, this change can be summarized as follows: 1) Makes an lldbHostPosix library which contains code common to all posix platforms. 2) Creates Host/FileSystem.h which defines a common FileSystem interface. 3) Implements FileSystem.h in Host/windows and Host/posix. 4) Creates Host/FileCache.h, implemented in Host/common, which defines a class useful for storing handles to open files needed by the debugger. Differential Revision: http://reviews.llvm.org/D4889 llvm-svn: 215775
* Don't crash when specifying a core file that isn't readable.Greg Clayton2014-08-151-0/+9
| | | | | | | | | | | | | Fixes include: 1 - added new FileSpec method: bool FileSpec::Readable() 2 - detect when an executable is not readable and give an appropriate error for: (lldb) file /tmp/unreadablefile 3 - detect when a core file is not readable and give an appropriate error 4 - detect when a specified core file doesn't exist and give an appropriate error <rdar://problem/17727734> llvm-svn: 215741
OpenPOWER on IntegriCloud