summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Recommit lldb realtime output for POSIX.Matt Kopec2013-03-141-1/+2
| | | | | | -Adds workaround for assertion in lldb for TestEvents.py llvm-svn: 177116
* Improve/Cleanup ptrace wrapper and remove dependency on user.hMatt Kopec2013-03-061-51/+68
| | | | | | Patch by Ashok Thirumurthi. llvm-svn: 176558
* Add initial support to trace spawned threads in a process on Linux.Matt Kopec2013-01-081-1/+18
| | | | llvm-svn: 171864
* Implement -w flag to process launch (allow launching inferior process in ↵Daniel Malea2013-01-081-3/+16
| | | | | | | | different working directory) on Linux/FreeBSD - fixes test case TestProcessLaunch llvm-svn: 171854
* Allow reading registers by thread ID in ProcessMonitor (Linux implementation)Daniel Malea2012-12-181-32/+40
| | | | | | | | - make FreeBSD ProcessMonitor API thread-ready Patch by Matt Kopec! llvm-svn: 170445
* Avoid possible overflow when reading inferior memory (and logging is enabled)Daniel Malea2012-12-141-4/+8
| | | | | | Patch by Matt Kopec! llvm-svn: 170242
* Fix a few more clang (3.2) warnings on Linux:Daniel Malea2012-12-071-13/+12
| | | | | | | | | | | | | | | | | - remove unused members - add NO_PEDANTIC to selected Makefiles - fix return values (removed NULL as needed) - disable warning about four-char-constants - remove unneeded const from operator*() declaration - add missing lambda function return types - fix printf() with no format string - change sizeof to use a type name instead of variable name - fix Linux ProcessMonitor.cpp to be 32/64 bit friendly - disable warnings emitted by swig-generated C++ code Patch by Matt Kopec! llvm-svn: 169645
* Fix Linux build warnings due to redefinition of macros:Daniel Malea2012-12-051-0/+2
| | | | | | | | | - add new header lldb-python.h to be included before other system headers - short term fix (eventually python dependencies must be cleaned up) Patch by Matt Kopec! llvm-svn: 169341
* Resolve printf formatting warnings on Linux:Daniel Malea2012-11-291-5/+5
| | | | | | | | - use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
* Fix Linux bug that leaves lldb in invalid state after expression evaluation ↵Daniel Malea2012-11-231-7/+23
| | | | | | | | | | | | times out. - Handle EINVAL return code from ptrace(GETSIGINFO, ...): not an error, but 'group-stop' state on Linux - propagate SIGSTOP to inferior in above case - this commit resolves the failure in expression_command/timeout testcase Thanks to Sean Callanan & Matt Kopec for helping debug this problem llvm-svn: 168523
* Remove call to StopMonitor() from ProcessMonitor::Detach()Daniel Malea2012-11-221-2/+2
| | | | | | | | | - StopMonitor() is called anyways from ProcessMonitor destructor later - resolves hang in TestEvents.py Patch by Matt Kopec! llvm-svn: 168503
* Patch from Matt Kopec:Greg Clayton2012-10-161-29/+25
| | | | | | This patch fixes an issue where if lldb fails to attach to a process (ie. invalid pid) on Linux, the process monitor thread gets stuck waiting for a signal from the attach thread, which never comes due to not being signaled. It also implements StopOpThread which is used for both attach/launch cases as I'm not aware of any special handling needed for the attach case. Also, propagate 'Error' from the Detach function instead of using a bool. llvm-svn: 166055
* Patch from Daniel Malea that cleans up the process parameters for ↵Greg Clayton2012-10-121-4/+2
| | | | | | Process/Thread classes for POSIX and Linux. llvm-svn: 165806
* Modified patch from Matt Kopec that makes sure the run lock is acquired when ↵Greg Clayton2012-10-121-0/+2
| | | | | | attaching and makes sure the pid is being set on linux in the process info. llvm-svn: 165804
* Patch from Andrew Kaylor for linux:Greg Clayton2012-09-071-26/+26
| | | | | | | | | | | | | | | The attached patch adds support for debugging 32-bit processes when running a 64-bit lldb on an x86_64 Linux system. Making this work required two basic changes: 1) Getting lldb to report that it could debug 32-bit processes 2) Changing an assumption about how ptrace works when debugging cross-platform For the first change, I took a conservative approach and only enabled this for x86_64 Linux platforms. It may be that the change I made in Host.cpp could be extended to other 64-bit Linux platforms, but I'm not familiar enough with the other platforms to know for sure. For the second change, the Linux ProcessMonitor class was assuming that ptrace(PTRACE_[PEEK|POKE]DATA...) would read/write a "word" based on the child process word size. However, the ptrace documentation says that the "word" size read or written is "determined by the OS variant." I verified experimentally that when ptracing a 32-bit child from a 64-bit parent a 64-bit word is read or written. llvm-svn: 163398
* Linux/ProcessMonitor: include sys/user.h for user_regs_struct and ↵Benjamin Kramer2012-04-071-0/+1
| | | | | | user_fpregs_struct. llvm-svn: 154255
* Linux fix patch from Dmitry Vyukov.Greg Clayton2012-02-211-2/+4
| | | | llvm-svn: 151072
* This patch combines common code from Linux and FreeBSD intoJohnny Chen2012-01-051-48/+44
| | | | | | | | | | a new POSIX platform. It also contains fixes for 64bit FreeBSD. The patch is based on changes by Mark Peek <mp@FreeBSD.org> and "K. Macy" <kmacy@freebsd.org> in their github repo located at https://github.com/fbsd/lldb. llvm-svn: 147609
* Patch from Dawn that fixes up linux debugging and a first passs at an Greg Clayton2011-11-291-7/+33
| | | | | | implementation of the linux platform. llvm-svn: 145433
* Update ProcessMonitor::MonitorCallback signature.Peter Collingbourne2011-11-211-0/+1
| | | | llvm-svn: 145021
* Patch from Dragos Tatulea which was a modified version of a patch fromGreg Clayton2011-11-051-2/+74
| | | | | | | | | Joel Dillon that fixed 64 debugging for Linux. I also added a patch to fix up the ProcessLinux::DoLaunch() to be up to date. I wasn't able to verify it compiles, but it should b really close. llvm-svn: 143772
* This patch fixes debugging of single threaded apps on Linux. Johnny Chen2011-10-181-20/+155
| | | | | | | | It also adds some asserts and additional logging support. from dawn@burble.org llvm-svn: 142384
* Patch from dawn@burble.org to build on linux!Johnny Chen2011-10-101-1/+1
| | | | llvm-svn: 141593
* Primitive attach support for linuxJohnny Chen2011-06-141-16/+162
| | | | | | | This patch is a starting point for the attach functionality. Signed-off-by: Johnny Chen <johnny.chen@apple.com> llvm-svn: 133006
* Improve error reporting in ProcessMonitor::LaunchPeter Collingbourne2011-06-141-8/+46
| | | | llvm-svn: 132972
* Fix mistakes relating to ProcessMonitor::DupDescriptorPeter Collingbourne2011-06-141-4/+4
| | | | llvm-svn: 132971
* If ProcessMonitor::Launch fails, post semaphore to notify callerPeter Collingbourne2011-06-141-1/+3
| | | | llvm-svn: 132970
* Implement RegisterContextLinux_x86_64::{Read,Write}AllRegisterValuesPeter Collingbourne2011-06-031-0/+70
| | | | llvm-svn: 132587
* This patch add a "fake" attach waiting for a real implementation andJohnny Chen2011-05-131-7/+8
| | | | | | | | | | | | | | | | solve the build break due to the lack of this method. It also propose a solution to the API changes in RegisterContext. I upgraded also the the python version in the makefile. My linux installation has python2.7 and AFAIK also the latest ubuntu has this version of python so maybe is worth upgrading. Patch by Marco Minutoli <mminutoli@gmail.com> [Note: I had to hand merge in the diffs since patch thinks it is a corrupt patch.] llvm-svn: 131313
* linux: initial support for 'real' signal handlingStephen Wilson2011-03-301-75/+262
| | | | | | | | This patch upgrades the Linux process plugin to handle a larger range of signal events. For example, we can detect when the inferior has "crashed" and why, interrupt a running process, deliver an arbitrary signal, and so on. llvm-svn: 128547
* linux: simple support for process input and outputStephen Wilson2011-03-231-0/+27
| | | | llvm-svn: 128137
* linux: use IS_VALID_LLDB_HOST_THREAD.Stephen Wilson2011-02-091-4/+4
| | | | | | | Update the linux plugin code to use the new check for a valid host thread introduced in r125067. llvm-svn: 125213
* Delay sync with the parent thread in ProcessLinux/ProcessMonitor.Stephen Wilson2011-01-191-4/+7
| | | | | | | This patch removes a potential race condition between a process monitor thread and its parent waiting to interrogate the success/failure of the launch. llvm-svn: 123803
* Support the reading of registers en masse via the linux ProcessMonitor.Stephen Wilson2011-01-191-0/+70
| | | | llvm-svn: 123797
* Miscellaneous cleanups in ProcessMonitor.Stephen Wilson2011-01-151-8/+15
| | | | | | | Propagate the environment if one is not provided. Also, do not allocate the monitor threads launch arguments on the stack. llvm-svn: 123502
* Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.Greg Clayton2011-01-081-2/+2
| | | | | | Thanks Bruce! llvm-svn: 123083
* Host::StopMonitoringChildProcess has been removed. Provide a substitute.Stephen Wilson2011-01-041-3/+16
| | | | llvm-svn: 122835
* Replace old "CurrentThread" calls with equivalent "SelectedThread" calls.Stephen Wilson2011-01-041-1/+1
| | | | llvm-svn: 122834
* Add a new Process plugin for Linux.Stephen Wilson2010-07-241-0/+925
This component is still at an early stage, but allows for simple breakpoint/step-over operations and basic process control. The makefiles are set up to build the plugin under Linux only. llvm-svn: 109318
OpenPOWER on IntegriCloud