summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
Commit message (Collapse)AuthorAgeFilesLines
...
* Windows: fix bug in getcwd() and add chdir().Ted Woodward2015-05-121-3/+15
| | | | | | | | | | | | | | | | | Summary: GetCurrentDirectory() returns the number of characters copied; 0 is a failure, not a success. Add implementation for chdir(). Reviewers: zturner Reviewed By: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9300 llvm-svn: 237162
* Get lldb-server building on android-9Vince Harron2015-05-123-1/+65
| | | | | | Build lldb-server with an android-9 sysroot. llvm-svn: 237078
* Set path syntax for remote executable FileSpec.Chaoren Lin2015-05-091-6/+10
| | | | | | | | | | Reviewers: ovyalov, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9579 llvm-svn: 236925
* Use hard links to link sysroot files within ModuleCache.Oleksiy Vyalov2015-05-082-0/+18
| | | | | | http://reviews.llvm.org/D9587 llvm-svn: 236917
* Use /data/local/tmp as temp directory on androidTamas Berghammer2015-05-082-5/+29
| | | | | | | | | | | If no temp directory specified by the user on android then fall back to /data/local/tmp what is always present on the device. It removes the dependency of specifying TMPDIR for executing platform commands on android. Differential revision: http://reviews.llvm.org/D9569 llvm-svn: 236843
* Use file locks to synchronize access to ModuleCache.Oleksiy Vyalov2015-05-074-0/+302
| | | | | | http://reviews.llvm.org/D9056 llvm-svn: 236736
* Make sure that the following paths say they are equal:Greg Clayton2015-05-051-0/+2
| | | | | | | | | | | /private/tmp/main.cpp /private/tmp/..//tmp/main.cpp We saw paths like this in makefile generate binaries when someone left an extra '/' on the end of a makefile variable. <rdar://problem/18945972> llvm-svn: 236541
* Fixed some compiler warnings because of bit-width mismatches.Chaoren Lin2015-05-011-3/+6
| | | | llvm-svn: 236323
* Support remote-android with multiple connected devices.Chaoren Lin2015-05-011-0/+8
| | | | | | | | | | | | | | | | | | Summary: This change introduces a new URL scheme for `platform connect`: ``` adb://device-id:port ``` Reviewers: vharron, tberghammer, clayborg, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9358 llvm-svn: 236321
* PosixPipes should not be copyable but should be movable.Chaoren Lin2015-05-011-1/+19
| | | | | | | | | | | | | | Summary: This addresses Oleksiy's comment in D9307. Reviewers: clayborg, ovyalov Reviewed By: clayborg, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9405 llvm-svn: 236320
* Fixed some compiler warnings because of bit-widthSean Callanan2015-05-011-3/+3
| | | | | | mismatches. llvm-svn: 236295
* Expose Close{Read/Write}FileDescriptor for pipes.Chaoren Lin2015-04-291-5/+5
| | | | llvm-svn: 236136
* Add file descriptor constructor for PipePosix.Chaoren Lin2015-04-291-13/+4
| | | | llvm-svn: 236133
* Remove trap code from disassembly.Chaoren Lin2015-04-293-24/+50
| | | | | | | | | | | | | | | | | | | | Summary: NativeProcessProtocol uses ReadMemory internally for setting/checking breakpoints but also for generic memory reads (Handle_m), this change adds a ReadMemoryWithoutTrap for that purpose. Also fixes a bunch of misuses of addr_t as size/length. Test Plan: `disassemble` no longer shows the trap code. Reviewers: jingham, vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9330 llvm-svn: 236132
* Add an unnamed pipe fail-safe to launching lldb-gdbserver.Chaoren Lin2015-04-271-0/+9
| | | | | | | | | | | | | | | | | | Summary: Currently, launching lldb-gdbserver from platform on Android requires root for mkfifo() and an explicit TMPDIR variable. This should remove both requirements. Test Plan: Successfully launched lldb-gdbserver on a non-rooted Android device. Reviewers: tberghammer, vharron, clayborg Reviewed By: clayborg Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9307 llvm-svn: 235940
* Fix LLDB ARM build error on ubuntu precise with gcc4.7Omair Javaid2015-04-271-1/+1
| | | | | | Differential revision: http://reviews.llvm.org/D9100 llvm-svn: 235865
* Look for both .debug and dsym debugging symbol information for stripped ↵Robert Flack2015-04-242-408/+249
| | | | | | | | | | | | | | | | | executable. Currently Symbols::LocateExecutableSymbolFile on MacOSX only looks for external dsym debugging information, however if running on a stripped dwarf executable it should also check for a .debug file as well. Test Plan: ./dotest.py $DOTEST_OPTS -t -p TestSharedLibStrippedSymbols.py This test now passes when running a remote Mac -> Linux test, and still passes running locally on Mac or locally on Linux. Differential Revision: http://reviews.llvm.org/D9174 llvm-svn: 235737
* ConnectionFileDescriptor::BytesAvailable reading too many command bytesVince Harron2015-04-201-4/+7
| | | | | | | | | | | | | | ConnectionFileDescriptor::BytesAvailable was reading multiple command bytes from the command pipe but only processing the first. This change only allows one byte to be read at a time, ensuring that all get handled. This isn't known to cause any bugs, but it might cause current/future bugs. Differential Revision: http://reviews.llvm.org/D9098 llvm-svn: 235322
* Fix a bug where argdumper would not launch inferiors correctly in the ↵Enrico Granata2015-04-172-20/+25
| | | | | | | | presence of arguments of the form word1\ word2 (vs. the quoted form "word1 word2") Fixes rdar://20493444 llvm-svn: 235157
* Use llvm::sys::fs::create_directories to create new directory on Windows.Oleksiy Vyalov2015-04-101-2/+7
| | | | | | http://reviews.llvm.org/D8977 llvm-svn: 234610
* Wrap socket error handling with SetLastError and IsInterrupted internal ↵Oleksiy Vyalov2015-04-101-32/+38
| | | | | | | | functions which can properly treat Windows and POSIX errors. http://reviews.llvm.org/D8939 llvm-svn: 234559
* [Python] Fix issue configuring sys.path during startup.Zachary Turner2015-04-092-13/+21
| | | | | | | | | | Previously, users on Windows had to manually specify PYTHONPATH to point to the site-packages directory before running LLDB. The reason for this was because sys.path was being initialized with a path containing unescaped backslashes, causing escape sequences to end up in the paths. llvm-svn: 234516
* Missed moving a variable during my previous revision 234455.Greg Clayton2015-04-091-1/+2
| | | | llvm-svn: 234456
* Darwin read()/pread()/fread() and write()/pwrite()/fwrite() calls can only ↵Greg Clayton2015-04-091-5/+142
| | | | | | | | | | write INT_MAX bytes at a time. Modify all read/write calls to allow any system to define MAX_READ_SIZE or MAX_WRITE_SIZE so large reads and writes can be divided up correctly. <rdar://problem/20471411> llvm-svn: 234455
* Fix bug where an additional O packet is sent after inferior exits.Chaoren Lin2015-04-071-2/+6
| | | | | | | | | | | | | | | | | Summary: ConnectionFileDescriptor::Read was returning eConnectionStatusError instead of 0 on m_shutting_down, which caused the caller to think that some number of bytes were read. Reviewers: jingham, vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8850 llvm-svn: 234341
* Fix warnings generated by clang-cl.Zachary Turner2015-04-028-25/+29
| | | | | | | | | | | | | | There were a couple of real bugs here regarding error checking and signed/unsigned comparisons, but mostly these were just noise. There was one class of bugs fixed here which is particularly annoying, dealing with MSVC's non-standard behavior regarding the underlying type of enums. See the comment in lldb-enumerations.h for details. In short, from now on please use FLAGS_ENUM and FLAGS_ANONYMOUS_ENUM when defining enums which contain values larger than can fit into a signed integer. llvm-svn: 233943
* Move several plugin to its own namespaceTamas Berghammer2015-03-312-7/+7
| | | | | | | | | | | | | Affected paths: * Plugins/Platform/Android/* * Plugins/Platform/Linux/* * Plugins/Platform/gdb-server/* * Plugins/Process/Linux/* * Plugins/Process/gdb-remote/* Differential revision: http://reviews.llvm.org/D8654 llvm-svn: 233679
* Increate backlog of lldb-platform's listener socketVince Harron2015-03-311-2/+7
| | | | | | | | | | | | | | | lldb-platform's listener socket only had a backlog of one connection. That means that if more than one client connected simultaneously, the connection would be refused. The test suite can be run remotely with dozens of threads connecting simultaneously. Raised this limit to 100 to effectively eliminate lost connections. Test Plan: run tests against a remote target Differential Revision: http://reviews.llvm.org/D8696 llvm-svn: 233652
* Allow multiple simultaneous connections to platform.Robert Flack2015-03-251-9/+22
| | | | | | | | | | | | | Adds the --server argument to lldb-server platform which when specified will allow multiple simultaneous connections by forking off to handle each individual connection. This will allow us to run the remote tests in parallel. Test Plan: Run: lldb-server platform --listen *:1234 --server Connect from multiple lldb clients simultaneously. I will also test running the test suite remotely with multiple simultaneous jobs. Differential Revision: http://reviews.llvm.org/D8452 llvm-svn: 233185
* ComputeSupportExeDirectory for LinuxChaoren Lin2015-03-243-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes http://reviews.llvm.org/D8511 The original method of using dladdr() could return the incorrect relative path if not dynamically linked against liblldb and the working directory has changed. This is not a problem when built with python, since ScriptInterpreterPython::InitializePrivate calls HostInfo::GetLLDBPath(ePathTypeLLDBShlibDir, ...) and caches the correct path before any changes to the working directory. The /proc/self/exe approach fails if run using Python, but works for all other cases (including for android, which doesn't have dladdr()). So if we combine the two, we should reasonably cover all corner cases. Reviewers: vharron, ovyalov, clayborg Reviewed By: ovyalov, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8570 llvm-svn: 233129
* Reverted r232883 due to failing tests.Vince Harron2015-03-222-2/+11
| | | | llvm-svn: 232904
* Fix ComputeSupportExeDirectory for Linux (merge with Android).Chaoren Lin2015-03-212-11/+2
| | | | | | | | | | | | | | | | | Summary: ComputeSupportExeDirectory relied on ComputeSharedLibraryDirectory which was not always reliable. Using procfs seems to be the best way to deal with it on Linux (since it's already done on Android, might as well merge it). Reviewers: ovyalov Reviewed By: ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8511 llvm-svn: 232883
* Report watchpoint hits during single stepping.Chaoren Lin2015-03-191-2/+11
| | | | | | | | | | | | | | | | | | Summary: Reorganized NativeProcessLinux::MonitorSIGTRAP to check for watchpoint hits on TRAP_TRACE. Added test for stepping over watchpoints. https://llvm.org/bugs/show_bug.cgi?id=22814 Reviewers: ovyalov, tberghammer, vharron, clayborg Subscribers: jingham, labath, lldb-commits Differential Revision: http://reviews.llvm.org/D8404 llvm-svn: 232784
* Move LLDB initialization/shutdown to Initialization.Zachary Turner2015-03-191-5/+0
| | | | | | | | | | | | | | | | This creates a new top-level folder called Initialization which is intended to hold code specific to LLDB system initialization. Currently this holds the Initialize() and Terminate() functions, as well as the fatal error handler. This provides a means to break the massive dependency cycle which is caused by the fact that Debugger depends on Initialize and Terminate which then depends on the entire LLDB project. With this structure, it will be possible for applications to invoke lldb_private::Initialize() directly, and have that invoke Debugger::Initialize. llvm-svn: 232768
* Add NameMatches.h header to fix FreeBSD build after r232673Ed Maste2015-03-191-0/+1
| | | | llvm-svn: 232702
* Move some functions from source/lldb.cpp to Utility.Zachary Turner2015-03-181-0/+1
| | | | | | | | | | Specifically, there were some functions for converting enums to strings and a function for matching a string using a specific matching algorithm. This moves those functions to more appropriate headers in lldb/Utility and updates references to include the new headers. llvm-svn: 232673
* Move lldb-log.cpp to core/Logging.cppZachary Turner2015-03-182-3/+0
| | | | | | | | | So that we don't have to update every single #include in the entire codebase to #include this new header (which used to get included by lldb-private-log.h, we automatically #include "Logging.h" from within "Log.h". llvm-svn: 232653
* Report stopped by trace if none of the watchpoint was hitTamas Berghammer2015-03-171-0/+18
| | | | | | | | | | Some linux kernel reports a watchpoint hit after single stepping even when no watchpoint was hit. This CL looks for a watchpoint which was hit and reports a stop by trace if it haven't found any. Differential revision: http://reviews.llvm.org/D8081 llvm-svn: 232482
* [MIPS] - Register Context for MIPS64Mohit K. Bhakkad2015-03-171-0/+1
| | | | | | | | | | | | | | | | Patch by Jaydeep Patil Summery: 1. Add MIPS variants by parsing e_flags of the ELF 2. Create RegisterInfoInterface and RegisterContext for MIPS64 and MIPS64EL Reviewers: clayborg Subscribers: tberghammer, bhushan, mohit.bhakkad, sagar Differential Revision: http://reviews.llvm.org/D8166 llvm-svn: 232467
* Fix missing data in GetProcessInfo on linuxTamas Berghammer2015-03-131-0/+2
| | | | | | | | | Fill in the missing part of the architecture in GetProcessInfo from the HostArchitecture (e.g. Environment). Differential revision: http://reviews.llvm.org/D8292 llvm-svn: 232157
* Add filepath to qModuleInfo packetTamas Berghammer2015-03-131-0/+55
| | | | | | | | | | | The file path is currently required on android because the executables only contain the name of the system libraries without their path. This CL add an extra field to the qModuleInfo packet to return the full path of a modul and add logic to locate a shared module on android. Differential revision: http://reviews.llvm.org/D8221 llvm-svn: 232156
* Add code to exit the NativeProcessLinux Monitor thread on androidTamas Berghammer2015-03-131-10/+43
| | | | | | | | | | This CL change the logic used to terminate the monitor thread of NativeProcessLinux to use a signal instead of pthread_cancel as pthread_cancel is not supported on android. Differential revision: http://reviews.llvm.org/D8205 llvm-svn: 232155
* Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer ↵Oleksiy Vyalov2015-03-101-17/+45
| | | | | | | | - in order to allow modules caching from remote targets. http://reviews.llvm.org/D8037 llvm-svn: 231734
* Remove Host::Backtrace in favor of llvm::sys::PrintStackTrace()Zachary Turner2015-03-064-76/+0
| | | | | | | | | | | | This removes Host::Backtrace from the codebase, and changes all call sites to use llvm::sys::PrintStackTrace(). This makes the functionality available for all platforms, and even for platforms which currently had a supported implementation of Host::Backtrace, this patch should enable richer information in stack traces, such as file and line number information, as well as giving it the ability to unwind through inlined functions. llvm-svn: 231511
* Bump major vers # in xcode project file from 330 to 340.Jason Molenda2015-03-062-2/+2
| | | | llvm-svn: 231441
* Don't #include ClangASTContext.h from Module.hZachary Turner2015-03-031-0/+2
| | | | | | | | | | | | This is part of a larger effort to reduce header file footprints. Combined, these patches reduce the build time of LLDB locally by over 30%. However, they touch many files and make many changes, so will be submitted in small incremental pieces. Reviewed By: Greg Clayton Differential Revision: http://reviews.llvm.org/D8022 llvm-svn: 231097
* Fix execution of platform shell commands on androidTamas Berghammer2015-03-032-7/+61
| | | | | | | | | | * Add missing functionality to the process launcher * Fixup PATH environment variable to workaround an OS bug * Add default shell path to the host info structure Differential revision: http://reviews.llvm.org/D8009 llvm-svn: 231065
* Fix FileSpec::GetPath to return null-terminated stringsIlia K2015-02-274-44/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this fix the FileSpec::GetPath() returned string which might be without '\0' at the end. It could have happened if the size of buffer for path was less than actual path. Test case: ``` FileSpec test("/path/to/file", false); char buf[]="!!!!!!"; test.GetPath(buf, 3); ``` Before fix: ``` 233 FileSpec test("/path/to/file", false); 234 char buf[]="!!!!!!"; 235 test.GetPath(buf, 3); 236 -> 237 if (core_file) 238 { 239 if (!core_file.Exists()) 240 { (lldb) print buf (char [7]) $0 = "/pa!!!" ``` After fix: ``` 233 FileSpec test("/path/to/file", false); 234 char buf[]="!!!!!!"; 235 test.GetPath(buf, 3); 236 -> 237 if (core_file) 238 { 239 if (!core_file.Exists()) 240 { (lldb) print buf (char [7]) $0 = "/p" ``` Reviewers: zturner, abidh, clayborg Reviewed By: abidh, clayborg Subscribers: tberghammer, vharron, lldb-commits, clayborg, zturner, abidh Differential Revision: http://reviews.llvm.org/D7553 llvm-svn: 230787
* Use getProcessTriple inside HostInfoBase::ComputeHostArchitectureSupport ↵Oleksiy Vyalov2015-02-261-1/+1
| | | | | | | | instead of getDefaultTargetTriple. http://reviews.llvm.org/D7893 llvm-svn: 230674
* Return a current executable's directory from ↵Oleksiy Vyalov2015-02-261-0/+7
| | | | | | | | HostInfoAndroid::ComputeSupportExeDirectory. http://reviews.llvm.org/D7876 llvm-svn: 230604
OpenPOWER on IntegriCloud