summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove POSIX thread/process abstractionEd Maste2015-07-281-2/+2
| | | | | | | | | As of r240543 ProcessPOSIX and POSIXThread are used only on FreeBSD, so just roll them into ProcessFreeBSD and FreeBSDThread. Differential Revision: http://reviews.llvm.org/D10698 llvm-svn: 243427
* Refactor many file functions to use FileSpec over strings.Ed Maste2015-06-011-17/+18
| | | | | | This is the FreeBSD change for r238604. llvm-svn: 238752
* Fix TestProcesslaunch regression caused by D7372Pavel Labath2015-02-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: After closing all the leaked file descriptors to the inferior tty, the following problem occured: - when stdin, stdout and stderr are redirected, there are no slave descriptors open (which is good) - lldb has a reader thread, which attempts to read from the master end of the tty - this thread receives an EOF - in response, it closes it's master end - as this is the last open file descriptor for the master end, this deletes the tty and sends SIGHUP to the inferior (this is bad) I fix this problem by making sure the master end remains open for the duration of the inferior process by storing a copy of the file descriptor in ProcessMonitor. I create a copy to avoid ownership issues with the reading thread. Reviewers: ovyalov, emaste Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7440 llvm-svn: 228391
* Share crash information between LLGS and local POSIX debugging withChaoren Lin2015-02-031-12/+0
| | | | | | | CrashReason class. Deliver crash information from LLGS to lldb via description field of thread stop packet. llvm-svn: 227926
* Add test for denied process attach by pid and fix found bugs in ↵Oleksiy Vyalov2014-11-191-1/+1
| | | | | | | | | | Process/ProcessPOSIX.cpp and FreeBSD/ProcessMonitor. http://reviews.llvm.org/D6240 llvm-svn: 222372
* Fix FreeBSD build after thread changesEd Maste2014-09-101-2/+2
| | | | | | | More work on the GetName/SetName arguments (thread_t vs tid_t) is needed but this change should restore the build and basic operation. llvm-svn: 217502
* Create a HostThread abstraction.Zachary Turner2014-09-091-2/+3
| | | | | | | | | | | | | This patch moves creates a thread abstraction that represents a thread running inside the LLDB process. This is a replacement for otherwise using lldb::thread_t, and provides a platform agnostic interface to managing these threads. Differential Revision: http://reviews.llvm.org/D5198 Reviewed by: Jim Ingham llvm-svn: 217460
* Fix Linux to respect ASLR settings when launching processes to debug locally ↵Todd Fiala2014-08-171-0/+1
| | | | | | | | | | and remotely. See the following links for details: http://llvm.org/bugs/show_bug.cgi?id=20658 See http://reviews.llvm.org/D4941 llvm-svn: 215822
* Implement ProcessMonitor::Kill for FreeBSDEd Maste2014-04-011-4/+2
| | | | | | | | | | | | | | | | | On FreeBSD ptrace(PT_KILL) is used to terminate the traced process (as if PT_CONTINUE had been used with SIGKILL as the signal to be delivered), and is the desired behaviour for ProcessPOSIX::DoDestroy. On Linux, after ptrace(PTRACE_KILL) the traced process still exists and can be interrogated. It is only upon resume that it exits as though it received SIGKILL. For now I'm committing only the FreeBSD change, until the Linux change (review D3159) is successfully tested. http://llvm.org/pr18894 llvm-svn: 205315
* FreeBSD hardware watchpoint implementationEd Maste2014-02-191-0/+17
| | | | | | | | | | | | | | | Implement x86_64 debug register read/write in support of hardware watchpoints. Hoist LinuxThread::TraceNotify code back into POSIXThread::TraceNotify() Patch by John Wolfe. We still need to rework this later to avoid the #ifdef FreeBSD. llvm-reviews.chandlerc.com/D2572 llvm.org/pr16706 llvm-svn: 201706
* Remove FIXME comments about tids on FreeBSD that no longer applyEd Maste2014-01-251-16/+0
| | | | | | Spotted by John Wolfe. llvm-svn: 200092
* Threaded inferior support for FreeBSDEd Maste2013-12-091-0/+8
| | | | | | | Modelled in part on GDBRemoteCommunicationClient. Review: http://llvm-reviews.chandlerc.com/D2267 llvm-svn: 196787
* PT_CONTINUE and PT_STEP are process-scope on FreeBSDEd Maste2013-11-251-6/+6
| | | | | | | | | | Although ptrace() can be passed a PID or TID for PT_CONTINUE and PT_STEP, the kernel operates on all threads in the process in both cases. (See the FOREACH_THREAD_IN_PROC in FreeBSD's sys_process.c:kern_ptrace.) Make this clear by using the PID from the ProcessMonitor instance. llvm-svn: 195656
* Add stub FreeBSD ProcessMonitor::ReadThreadPointerEd Maste2013-10-181-0/+4
| | | | llvm-svn: 192994
* Apply ProcessMonitor changes from r190820 to FreeBSDEd Maste2013-09-181-10/+9
| | | | llvm-svn: 190954
* Fixing a problem with thread creation signal order dependencyAndrew Kaylor2013-09-171-0/+4
| | | | llvm-svn: 190831
* FreeBSD: Replace GetSignalInfo with GetLwpInfoEd Maste2013-07-171-3/+3
| | | | | | | For thread support we are going to need other members of struct ptrace_lwpinfo. llvm-svn: 186505
* Stop process monitor from ProcessPOSIX::FinalizeAndrew Kaylor2013-07-101-3/+2
| | | | llvm-svn: 186039
* Reverting ProcessMonitor shared pointer changesAndrew Kaylor2013-07-091-3/+3
| | | | llvm-svn: 185981
* Use shared pointers to hold the process in ProcessMonitorAndrew Kaylor2013-07-091-3/+3
| | | | llvm-svn: 185946
* Sync parts of FreeBSD Process plugin with LinuxEd Maste2013-07-021-6/+4
| | | | | | | | | | | | * Use PseudoTerminal to fix stdio handling / passthrough to the inferior process. * Add log messages equivalent to the Linux ones. * Port changes relating to process creation / termination. This revision contains changes equivalent to (parts of) SVN revisions 109318 142384 166055 168503 169645 177116 182809. llvm-svn: 185442
* Fix FreeBSD build due to previous changes to ProcessMonitor::Detach.Matt Kopec2013-06-031-1/+1
| | | | llvm-svn: 183150
* Fixed "log enable linux registers" and added a test.Ashok Thirumurthi2013-05-091-2/+2
| | | | | | | | | | - 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
* Build fixes for FreeBSD 9.1.Ashok Thirumurthi2013-05-011-2/+18
| | | | | | | | - TODO: Support extended register sets on FreeBSD. Patch by Samuel Jacob. llvm-svn: 180879
* Rollback r177173. Some OSs may not have ptrace extensions which lldb expects ↵Matt Kopec2013-03-151-13/+3
| | | | | | when building. This needs to be accounted for. llvm-svn: 177176
* Add ptrace extensions to query a register set.Matt Kopec2013-03-151-3/+13
| | | | | | Patch by Ashok Thirumurthi. llvm-svn: 177173
* Improve/Cleanup ptrace wrapper and remove dependency on user.hMatt Kopec2013-03-061-3/+3
| | | | | | Patch by Ashok Thirumurthi. llvm-svn: 176558
* Implement -w flag to process launch (allow launching inferior process in ↵Daniel Malea2013-01-081-1/+4
| | | | | | | | 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-6/+20
| | | | | | | | - make FreeBSD ProcessMonitor API thread-ready Patch by Matt Kopec! llvm-svn: 170445
* Fix Linux bug that leaves lldb in invalid state after expression evaluation ↵Daniel Malea2012-11-231-1/+1
| | | | | | | | | | | | 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
* Fix incomplete commit of ↵Johnny Chen2012-01-051-0/+292
http://llvm.org/viewvc/llvm-project?rev=147609&view=rev: This patch combines common code from Linux and FreeBSD into 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: 147613
OpenPOWER on IntegriCloud