summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
Commit message (Collapse)AuthorAgeFilesLines
...
* Add qModuleInfo request in order to get module information (uuid, triple,..) ↵Oleksiy Vyalov2015-02-251-4/+35
| | | | | | | | by module path from remote platform. http://reviews.llvm.org/D7709 llvm-svn: 230556
* Revert "Fix warnings found with clang-cl."Zachary Turner2015-02-258-17/+27
| | | | | | | SWIG doesn't like enum : unsigned. Revert this until I can fix this in a way that swig likes. llvm-svn: 230531
* Fix warnings found with clang-cl.Zachary Turner2015-02-258-27/+17
| | | | | | | | | | | Earlier this week I was able to get clang-cl on Windows to be able to self host. This opened the door to being able to get a whole new slew of warnings for the Windows build. This patch fixes all of the warnings, many of which were real bugs. llvm-svn: 230522
* Skip symlinks to the original file when searching for debug infoPavel Labath2015-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: Symbols::LocateExecutableSymbolFile tries to locate the file in containing the debug info in a splitdebug configuration. It tries to skip over the original file in its search path, but it was easily fooled by symlinks. This changes the function to use llvm::sys::fs::equivalent, which can correctly compare symlinks. As a side effect, I had to fix one test because the address for the "abort" function resolves on my system to "__GI_abort" now. With the debug info, the libc on my system contains two symbols associated with the address of the abort function, and lldb prefers __GI_abort, possibly because the debug info is associated with it. It would be nice at some point to have it prefer the public symbol name. Reviewers: emaste, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7836 llvm-svn: 230476
* When FileSpec::Resolve is given a bare file like "ls",Jason Molenda2015-02-251-0/+13
| | | | | | | | | | | and llvm::sys::fs::make_absolute prepends the current working directory to that path, leave the original bare file name unchanged if $cwd/ls doesn't exist. http://reviews.llvm.org/D7477 <rdar://problem/18775190> llvm-svn: 230451
* Fix typo that breaks FileSystem::IsLocalVince Harron2015-02-241-1/+1
| | | | llvm-svn: 230312
* Compile fix for FileSystem::IsLocal on LinuxVince Harron2015-02-241-2/+25
| | | | llvm-svn: 230311
* Avoid crashing by not mmap'ing files on network mounted file systems.Greg Clayton2015-02-233-0/+33
| | | | | | | | | | | | | | | | | | | | This is implemented by making a new FileSystem function: bool FileSystem::IsLocal(const FileSpec &spec) Then using this in a new function: DataBufferSP FileSpec::MemoryMapFileContentsIfLocal(off_t file_offset, size_t file_size) const; This function only mmaps data if the file is a local file since that means we can reliably page in data. We were experiencing crashes where people would use debug info files on network mounted file systems and that mount would go away and cause the next access to a page that wasn't paged in to crash LLDB. We now avoid this by just copying the data into a heap buffer and keeping a permanent copy to avoid the crash. Updated all previous users of FileSpec::MemoryMapFileContentsIfLocal() in ObjectFile subclasses over to use the new FileSpec::MemoryMapFileContentsIfLocal() function. <rdar://problem/19470249> llvm-svn: 230283
* Add missing #include. This should fix the Windows build.Zachary Turner2015-02-211-0/+1
| | | | llvm-svn: 230128
* This should fix the Windows buildEnrico Granata2015-02-201-0/+1
| | | | llvm-svn: 230080
* Rename the "glob arguments" feature to "shell expand arguments"Enrico Granata2015-02-204-25/+25
| | | | | | This should not bring any feature change, except changing names of things here and there llvm-svn: 230077
* Start the refactoring of globbingEnrico Granata2015-02-204-1/+184
| | | | | | | | | | | | | - 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
* Introduce FileSystem::CalculateMD5AsString that supports any platform and ↵Oleksiy Vyalov2015-02-204-33/+73
| | | | | | | | make existing FileSystem::CalculateMD5 to use it. http://reviews.llvm.org/D7771 llvm-svn: 230036
* Prevent LLGS from crashing when exiting - make NativeProcessLinux to wait ↵Oleksiy Vyalov2015-02-191-0/+6
| | | | | | | | until ThreadStateCoordinator is fully stopped before entering ~NativeProcessLinux. http://reviews.llvm.org/D7692 llvm-svn: 229875
* Remove the CMake duplication for liblldb.Zachary Turner2015-02-171-0/+1
| | | | | | | | | Previously the CMake had a lot of duplication for the public API due to some differences regarding how we link on Windows. This fixes the issue, so making changes to the public API should be much easier now. llvm-svn: 229568
* Fix configure+make build broken by r228943Tamas Berghammer2015-02-131-0/+6
| | | | llvm-svn: 229098
* Remove an unused variable found with a Clang warning.Chandler Carruth2015-02-131-1/+0
| | | | llvm-svn: 229083
* Create new platform: remote-androidTamas Berghammer2015-02-124-16/+102
| | | | | | | | | | * Create new platform plugin for lldb * Create HostInfo class for android * Create ProcessLauncher for android Differential Revision: http://reviews.llvm.org/D7584 llvm-svn: 228943
* Cast EOF to get a proper comparison.Justin Hibbits2015-02-121-1/+1
| | | | | | | | On PowerPC, and maybe some other architectures, 'char' is unsigned. Comparing an unsigned char with a signed int (-1) is always false. To fix this, down-cast EOF to a char. llvm-svn: 228909
* Make PipeWindows::CreateWithUniqueName() use GUIDs on Windows.Zachary Turner2015-02-111-6/+16
| | | | | | | Patch by Adrian McCarthy Differential Revision: http://reviews.llvm.org/D7509 llvm-svn: 228859
* Fix Mingw build.Hafiz Abid Qadeer2015-02-112-1/+6
| | | | | | | | | | | | | Following changes are done. Add missing headers. Replace _snprintf with snprintf. It is already changed to _snprintf for MSVC. Add a file in the build for autoconf. Call DynamicLoaderWindows::Terminate and DynamicLoaderWindows::Initialize only for MSVC build. Reviewed in http://reviews.llvm.org/D7536. llvm-svn: 228822
* 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
* 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
OpenPOWER on IntegriCloud