summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
Commit message (Collapse)AuthorAgeFilesLines
* Failsafe directory for shared objects and support executables.Chaoren Lin2015-02-101-0/+9
| | | | llvm-svn: 228716
* Fix the LLDB build under Debian KfreebsdSylvestre Ledru2015-02-103-1/+12
| | | | | | | | | | | | | | Summary: I don't know if there is a better way for the change in source/Host/freebsd/ThisThread.cpp Reviewers: emaste Subscribers: hansw, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D7441 llvm-svn: 228710
* Fix sorting. Spotted by emaste.Justin Hibbits2015-02-081-1/+1
| | | | llvm-svn: 228549
* PowerPC64 host also supports 32-bit binaries, so note it.Justin Hibbits2015-02-081-1/+1
| | | | llvm-svn: 228548
* Fix a handling of full path in break-insert.Hafiz Abid Qadeer2015-02-081-0/+6
| | | | | | | | | | | | | | | | | | | | For some time, eclipse (CDT) uses full path of the file in break-insert command when putting breakpoint on a source line. On windows, a typical command looks like the following. 56-break-insert -f F:\\work\\ws\\test\\main.c:49 Current implementation in lldb-mi have problem in 2 ways. 1. It was assuming that there will be only one : in the path which is wrong if full path is supplied. 2. CDT sends out path with double backslashes in windows which gives error on resolution. Fixed the : issue in lldb-mi. Changed FileSpec::Normalize to make sure that it handles the path with \\ correctly. Added test cases to check for full path in both lldb-mi and lldb. Also added a test case to check SBFileSpec with double slashes. llvm-svn: 228538
* Fix TestThreadSpecificBreakpoint with LLGSTamas Berghammer2015-02-061-0/+4
| | | | | | | | | | | * Set the state of the process into running/stepping on continue/step operations * Add mutex to use transactions in Thread State Coordinator ** It is required because the events from two Signal Handler or form a Signal handler and a Resume request shouldn't overlap * Send Stop Replay Packet only when the state of the process changed Differential Revision: http://reviews.llvm.org/D7374 llvm-svn: 228387
* Avoid leaking log file descriptors into the inferior process.Pavel Labath2015-02-051-0/+2
| | | | | | | | | | | | | | Summary: This commit adds a new open flag File::eOpenOptionCloseOnExec (i.e., O_CLOEXEC), and adds it to the list of flags when opening log files (#ifndef windows). A regression test is included. Reviewers: vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7412 llvm-svn: 228310
* Fix warning about the use of mktemp and make platform agnostic by adding and ↵Oleksiy Vyalov2015-02-052-0/+55
| | | | | | | | using PipeBase::CreateWithUniqueName - on behalf of flackr. http://reviews.llvm.org/D7348 llvm-svn: 228307
* Fix compilation failure on Windows.Zachary Turner2015-02-031-1/+1
| | | | llvm-svn: 227998
* Fixed bugs in the multi-threaded access in HostInfoBase. Prior to this fix, ↵Greg Clayton2015-02-033-141/+187
| | | | | | | | | | static bool variables were used but this is not sufficient. We now use std::call_once in all places where the previous static bool code was used to try to implement thread safety. This was causing code that opened multiple targets to try and get a path to debugserver from the GDB remote communication class, and it would get the LLDB path and some instances would return empty strings and it would cause debugserver to not be found. <rdar://problem/18756927> llvm-svn: 227935
* Implement setting and clearing watchpoints.Chaoren Lin2015-02-034-8/+52
| | | | llvm-svn: 227930
* Moving header files from source/Host/common to proper location.Chaoren Lin2015-02-0313-609/+535
| | | | llvm-svn: 227929
* Share crash information between LLGS and local POSIX debugging withChaoren Lin2015-02-032-26/+1
| | | | | | | CrashReason class. Deliver crash information from LLGS to lldb via description field of thread stop packet. llvm-svn: 227926
* If lldb is being built with ASAN instrumentation, have lldbJason Molenda2015-01-291-0/+10
| | | | | | | | create its own threads with 8MB additional maximum stack size. Extra room is needed for the bookkeeping needed for this instrumentation. llvm-svn: 227421
* Fix copy paste error in file header.Chaoren Lin2015-01-271-1/+1
| | | | llvm-svn: 227222
* fixed up some logging messages (options and wait_pid were swapped)Vince Harron2015-01-231-3/+3
| | | | llvm-svn: 226956
* Workaround for what looks like an OS X-specific libedit issueKate Stone2015-01-231-0/+21
| | | | | | | | | | | Other platforms may benefit from something similar if issues arise. The libedit library doesn't explicitly initialize the curses termcap library, which it gets away with until TERM is set to VT100 where it stumbles over an implementation assumption that may not exist on other platforms. <rdar://problem/17581929> llvm-svn: 226891
* File::Read(), when asked to read the contents of a file into a heapJason Molenda2015-01-221-3/+4
| | | | | | | | | | | | buffer and to add a nul terminator byte, was incorrectly resizing its buffer so the nul terminator was not included. Problem found by clang ASAN instrumentation when using an expression prefix file which was read via this mechanism. <rdar://problem/19556459> llvm-svn: 226753
* Abstract the details from regex.h a bit more by not allowing people to ↵Greg Clayton2015-01-211-2/+1
| | | | | | | | | | specify compile and execute flags for regular expressions. Also enable better regular expressions if they are available by check if the REG_ENHANCED is available and using it if it is. Since REG_ENHANCED is available on MacOSX, this allow the use of \d (digits) \b (word boundaries) and much more without affecting other systems. <rdar://problem/12082562> llvm-svn: 226704
* Remove unused function:Greg Clayton2015-01-202-49/+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 creation of StringRef in FileSpec::ResolveUsername()Jason Molenda2015-01-201-1/+1
| | | | | | | | so it doesn't assume that the SmallVector<char> will have nul terminator. It did not in at least one case. Caught by ASAN instrumentation. llvm-svn: 226544
* Added Connection::GetURI()Vince Harron2015-01-173-8/+52
| | | | | | | | | | | | | This function returns a URI of the resource that the connection is connected to. This is especially important for connections established by accepting a connection from a remote host. Also added implementations for ConnectionMachPort, ConnectionSharedMemory, Also fixed up some documentation in Connection::Write Renamed ConnectionFileDescriptorPosix::SocketListen to ConnectionFileDescriptorPosix::SocketListenAndAccept Fixed a log message in Socket.cpp Differential Review: http://reviews.llvm.org/D7026 llvm-svn: 226362
* Compile fix for WIN32Vince Harron2015-01-161-7/+9
| | | | llvm-svn: 226301
* minor refactoring to remove unneeded/unspecific header filesVince Harron2015-01-161-5/+4
| | | | | | Differential review: http://reviews.llvm.org/D6919 llvm-svn: 226249
* Add Socket::Get[Remote/Local]IpAddress and unit testsVince Harron2015-01-162-9/+127
| | | | | | Differential Revision: http://reviews.llvm.org/D6917 llvm-svn: 226234
* Moved Args::StringToXIntYZ to StringConvert::ToXIntYZVince Harron2015-01-154-4/+99
| | | | | | | | | | The refactor was motivated by some comments that Greg made http://reviews.llvm.org/D6918 and also to break a dependency cascade that caused functions linking in string->int conversion functions to pull in most of lldb llvm-svn: 226199
* Fix a -Wnull-conversion warning.Nico Weber2015-01-151-1/+1
| | | | llvm-svn: 226181
* Extend PipePosix with support for named pipes/timeout-based IO and integrate ↵Oleksiy Vyalov2015-01-143-8/+2
| | | | | | | | it with GDBRemoteCommunication / lldb-gdbserver - include reviews fixes. http://reviews.llvm.org/D6954 llvm-svn: 225923
* Extend PipePosix with support for named pipes/timeout-based IO and integrate ↵Oleksiy Vyalov2015-01-134-81/+241
| | | | | | | | it with GDBRemoteCommunication / lldb-gdbserver. http://reviews.llvm.org/D6954 llvm-svn: 225849
* 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
* Fix being able to get a thread result when calling HostThreadPosix::Join(). ↵Greg Clayton2015-01-061-2/+5
| | | | | | | | It was broken when initially checked in by getting the thread result into a temporary variable and never doing anything with it. Most threads in LLDB don't look at their thread results, but launching processes in a terminal window on MacOSX does require getting a thread result and this broke "process launch --tty" on darwin. <rdar://problem/19308966> llvm-svn: 225224
* No need to call SetErrorToErrno when pipe2 succeeds.Oleksiy Vyalov2014-12-191-3/+0
| | | | | | http://reviews.llvm.org/D6743 llvm-svn: 224652
* Only compile RegisterContextWindows_x86.cpp for x86 host architecture.Zachary Turner2014-12-181-1/+9
| | | | | | | | | | This fixes compilation failures in the 64-bit build of LLDB on Windows. Patch by Aidan Dodds Differential Revision: http://reviews.llvm.org/D6704 llvm-svn: 224528
* Enhance the Pipe interface for better portability.Zachary Turner2014-12-173-178/+329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes a number of improvements to the Pipe interface. 1) An interface (PipeBase) is provided which exposes pure virtual methods for any implementation of Pipe to override. While not strictly necessary, this helps catch errors where the interfaces are out of sync. 2) All methods return lldb_private::Error instead of returning bool or void. This allows richer error information to be propagated up to LLDB. 3) A new ReadWithTimeout() method is exposed in the base class and implemented on Windows. 4) Support for both named and anonymous pipes is exposed through the base interface and implemented on Windows. For creating a new pipe, both named and anonymous pipes are supported, and for opening an existing pipe, only named pipes are supported. New methods described in points #3 and #4 are stubbed out on posix, but fully implemented on Windows. These should be implemented by someone on the linux / mac / bsd side. Reviewed by: Greg Clayton, Oleksiy Vyalov Differential Revision: http://reviews.llvm.org/D6686 llvm-svn: 224442
* Add a method to disable the Windows crash / assert dialogs.Zachary Turner2014-12-121-0/+7
| | | | | | | | | | | | | | | | | | When running the test suite on Windows, we can't have Windows popping up dialogs when LLDB crashes in native code because it will hang the test suite. This patch silences those dialogs by checking an environment variable at startup and configuring Windows based on its value. This patch also adds an environment variable to force inferiors to never spawn in their own console window. This is useful to prevent new window spawm when running the test suite. Reviewed by: Scott Graham Differential Revision: http://reviews.llvm.org/D6628 llvm-svn: 224137
* Add Linux support for HostInfo::GetOSBuildString and ↵Oleksiy Vyalov2014-12-091-0/+29
| | | | | | HostInfo::GetOSKernelDescription. llvm-svn: 223737
* Fix some posix assumptions related to running shell commands.Zachary Turner2014-12-084-28/+47
| | | | | | | | | | | | | | | | | | | This is a resubmit of r223548, which was reverted due to breaking tests on Linux and Mac. This resubmit fixes the reason for the revert by adding back some accidentally removed code which appends -c to the command line when running /bin/sh. This resubmit also differs from the original patch in that it sets the architecture on the ProcessLaunchInfo. A follow-up patch will refactor this to separate the logic for different platforms. Differential Revision: http://reviews.llvm.org/D6553 Reviewed By: Greg Clayton llvm-svn: 223695
* Reverting r223548 which broke running in the shell on OS X.Jim Ingham2014-12-064-45/+27
| | | | llvm-svn: 223568
* Fix a type (MAX_PATH instead of PATH_MAX) and remove an unused variable.Jim Ingham2014-12-061-2/+1
| | | | llvm-svn: 223559
* Fix some posix assumptions related to running shell commands.Zachary Turner2014-12-064-26/+45
| | | | | | | | Differential Revision: http://reviews.llvm.org/D6553 Reviewed By: Greg Clayton llvm-svn: 223548
* Add support for embedding Clang compiler headersSean Callanan2014-12-052-0/+32
| | | | | | | | | 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
* Only normalize FileSpec paths *after* resolving them.Zachary Turner2014-12-011-2/+6
| | | | | | | Normalizing paths before resolving them can cause the path to become denormalized after resolution. llvm-svn: 223087
* Refactor SocketAddress::getaddrinfo - avoid calling IsValid if ::getaddrinfo ↵Oleksiy Vyalov2014-11-271-3/+7
| | | | | | | | has failed. Otherwise, IsValid crashes on assertation in GetFamilyLength. llvm-svn: 222862
* This is the first step of making lldb able to create target-specific thingsJim Ingham2014-11-221-22/+0
| | | | | | | | | | | | | (e.g. breakpoints, stop-hooks) before we have any targets - for instance in your ~/.lldbinit file. These will then get copied over to any new targets that get created. So far, you can only make stop-hooks. Breakpoints will have to learn to move themselves from target to target for us to get them from no-target to new-target. We should also make a command & SB API way to prime this ur-target. llvm-svn: 222600
* Extend PipePosix with child_processes_inherit support - to control whether ↵Oleksiy Vyalov2014-11-212-2/+39
| | | | | | | | pipe handles should be inherited by a child process. http://reviews.llvm.org/D6348 llvm-svn: 222541
* Change HostThread::GetNativeThread() to return a derived reference.Zachary Turner2014-11-171-4/+4
| | | | | | | | Previously using HostThread::GetNativeThread() required an ugly cast to most-derived type. This solves the issue by simply returning the derived type directly. llvm-svn: 222185
* Disable Editline on Windows.Zachary Turner2014-11-172-4/+8
| | | | | | | | | | | | | | | | | | | | Editline does not work correctly on Windows. This goes back at least to r208369, and as a result r210105 was submitted to disable libedit at runtime on Windows. More recently, r222163 was submitted which re-writes editline entirely, but makes the situation even worse on Windows, to the point that it doesn't even compile. While it would be easy to fix the compilation failure, this patch simply stops compiling Editline entirely on Windows, as the simple compilation fix would still result in a broken use of select on Windows, and as such a broken implementation of Editline. Since Editline was already disabled to begin with on Windows, we don't attempt to fix the compilation failure or the underlying issues, and instead just disable it "even more". llvm-svn: 222177
* Fix broken build after signature change of ResolveExecutable.Zachary Turner2014-11-171-1/+3
| | | | llvm-svn: 222176
* Small tweaks to make the editline sources match the lldb Jason Molenda2014-11-171-36/+72
| | | | | | source layout. llvm-svn: 222171
OpenPOWER on IntegriCloud