summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
AgeCommit message (Collapse)Author
2013-09-04Fixing a problem with inferior exit caused by signalAndrew Kaylor
llvm-svn: 189953
2013-08-09Handle SI_KERNEL signal code for SIGSEGV exceptions.Matt Kopec
Patch by Richard Mitton. llvm-svn: 188075
2013-07-31Fix thread name updating in Linux. "thread list" should report correct names ↵Michael Sartain
always now. Created new LinuxThread class inherited from POSIXThread and removed linux / freebsd ifdefs Removed several un-needed set thread name calls CR (and multiple suggestions): mkopec llvm-svn: 187545
2013-07-17Correct comment to match class nameEd Maste
llvm-svn: 186509
2013-07-11Fix unhandled SIGTRAP signal on Linux causing assertion.Matt Kopec
llvm-svn: 186112
2013-07-10Add support for listing inferior thread names on Linux.Matt Kopec
llvm-svn: 186033
2013-07-09Reverting ProcessMonitor shared pointer changesAndrew Kaylor
llvm-svn: 185981
2013-07-09Use shared pointers to hold the process in ProcessMonitorAndrew Kaylor
llvm-svn: 185946
2013-07-09Fix signal handling for POSIX (only tested on Linux) processes in ↵Matt Kopec
multi-threaded programs. Also fix a related issue where if a thread exits after a thread continue, lldb would hang. llvm-svn: 185944
2013-06-24Update comment to match class nameEd Maste
llvm-svn: 184745
2013-06-03Fix various build warnings.Matt Kopec
llvm-svn: 183140
2013-05-31Add ability to attach/detach to multi-threaded inferiors on Linux.Matt Kopec
All running threads will be detected and stopped on attach and all threads get resumed on detach. llvm-svn: 183049
2013-05-28Adding support for stopping all threads of multithreaded inferiors on Linux. ↵Andrew Kaylor
Also adding multithreaded test cases. llvm-svn: 182809
2013-05-17The Linux process plugin wasn't returning the correct linux signals. This ↵Matt Kopec
fixes that. Thus, this patch also negates a previous fix for handling SIGCHLD. llvm-svn: 182166
2013-05-17ProcessMonitor improvements for Linux.Matt Kopec
-Remove tracing of fork/vfork until we add support for tracing inferiors' children on Linux. -Add trace exec option for ptrace so that we don't receive legacy SIGTRAP signals on execve calls. -Add handling of SIGCHLD sent by kernel (for now, deliver the signal to the inferior). llvm-svn: 182153
2013-05-13Fix Linux warning about missing virtual destructor in Operation classesDaniel Malea
llvm-svn: 181712
2013-05-09Fixed "log enable linux registers" and added a test.Ashok Thirumurthi
- Eliminated the use of static for methods that read m_register_infos, so that these routines can be implemented in the base class. - Eliminated m_register_infos in the base class because this is not used when derived classes call UpdateRegisterInfo. - Also moved the namespace using declarations from headers to source files. Thanks to Daniel and Samuel for their review feedback. llvm-svn: 181538
2013-05-07Add watchpoint support for Linux on 64-bit host.Matt Kopec
llvm-svn: 181341
2013-04-18After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton
the macros and just use C++11. llvm-svn: 179805
2013-04-18Since we use C++11, we should switch over to using std::unique_ptr when ↵Greg Clayton
C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. llvm-svn: 179779
2013-03-28Fix the Linux build issues introduced by r178191.Ashok Thirumurthi
- All Linux logging channels now use a single global instance of lldb_private::Log, to handle the case of logging during process tear down. - Also removed a single use of LogSP in FreeBSD and fixed a typo in a comment while reading through ProcessKDPLog. Reviewed by Daniel Malea. llvm-svn: 178242
2013-03-27test commitAshok Thirumurthi
- modified a comment llvm-svn: 178178
2013-03-20Add Linux support for reading/writing extended register sets.Matt Kopec
Patch by Ashok Thirumurthi. llvm-svn: 177568
2013-03-15Rollback r177173. Some OSs may not have ptrace extensions which lldb expects ↵Matt Kopec
when building. This needs to be accounted for. llvm-svn: 177176
2013-03-15Add ptrace extensions to query a register set.Matt Kopec
Patch by Ashok Thirumurthi. llvm-svn: 177173
2013-03-14Recommit lldb realtime output for POSIX.Matt Kopec
-Adds workaround for assertion in lldb for TestEvents.py llvm-svn: 177116
2013-03-06Improve/Cleanup ptrace wrapper and remove dependency on user.hMatt Kopec
Patch by Ashok Thirumurthi. llvm-svn: 176558
2013-01-08Add initial support to trace spawned threads in a process on Linux.Matt Kopec
llvm-svn: 171864
2013-01-08Implement -w flag to process launch (allow launching inferior process in ↵Daniel Malea
different working directory) on Linux/FreeBSD - fixes test case TestProcessLaunch llvm-svn: 171854
2012-12-18Allow reading registers by thread ID in ProcessMonitor (Linux implementation)Daniel Malea
- make FreeBSD ProcessMonitor API thread-ready Patch by Matt Kopec! llvm-svn: 170445
2012-12-14Avoid possible overflow when reading inferior memory (and logging is enabled)Daniel Malea
Patch by Matt Kopec! llvm-svn: 170242
2012-12-07Fix a few more clang (3.2) warnings on Linux:Daniel Malea
- 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
2012-12-05Fix Linux build warnings due to redefinition of macros:Daniel Malea
- 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
2012-11-29Resolve printf formatting warnings on Linux:Daniel Malea
- use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
2012-11-23Fix Linux bug that leaves lldb in invalid state after expression evaluation ↵Daniel Malea
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
2012-11-22Remove call to StopMonitor() from ProcessMonitor::Detach()Daniel Malea
- StopMonitor() is called anyways from ProcessMonitor destructor later - resolves hang in TestEvents.py Patch by Matt Kopec! llvm-svn: 168503
2012-10-16Patch from Matt Kopec:Greg Clayton
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
2012-10-12Patch from Daniel Malea that cleans up the process parameters for ↵Greg Clayton
Process/Thread classes for POSIX and Linux. llvm-svn: 165806
2012-10-12Modified patch from Matt Kopec that makes sure the run lock is acquired when ↵Greg Clayton
attaching and makes sure the pid is being set on linux in the process info. llvm-svn: 165804
2012-09-07Patch from Andrew Kaylor for linux:Greg Clayton
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
2012-04-07Linux/ProcessMonitor: include sys/user.h for user_regs_struct and ↵Benjamin Kramer
user_fpregs_struct. llvm-svn: 154255
2012-02-21Linux fix patch from Dmitry Vyukov.Greg Clayton
llvm-svn: 151072
2012-01-05This patch combines common code from Linux and FreeBSD intoJohnny Chen
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
2011-11-29Patch from Dawn that fixes up linux debugging and a first passs at an Greg Clayton
implementation of the linux platform. llvm-svn: 145433
2011-11-21Update ProcessMonitor::MonitorCallback signature.Peter Collingbourne
llvm-svn: 145021
2011-11-05Patch from Dragos Tatulea which was a modified version of a patch fromGreg Clayton
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
2011-10-18This patch fixes debugging of single threaded apps on Linux. Johnny Chen
It also adds some asserts and additional logging support. from dawn@burble.org llvm-svn: 142384
2011-10-10Patch from dawn@burble.org to build on linux!Johnny Chen
llvm-svn: 141593
2011-06-14Primitive attach support for linuxJohnny Chen
This patch is a starting point for the attach functionality. Signed-off-by: Johnny Chen <johnny.chen@apple.com> llvm-svn: 133006
2011-06-14Improve error reporting in ProcessMonitor::LaunchPeter Collingbourne
llvm-svn: 132972