summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/FreeBSD
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor many file functions to use FileSpec over strings.Ed Maste2015-06-012-45/+47
| | | | | | This is the FreeBSD change for r238604. llvm-svn: 238752
* Sprinkle some #include <mutex> in files that use std::call_once.Benjamin Kramer2015-04-031-0/+2
| | | | llvm-svn: 234005
* [Plugin/Process] Use std::call_once() to initialize.Davide Italiano2015-04-031-5/+3
| | | | | | | | This replaces the home-grown initialization mechanism used before. Differential Revision: http://reviews.llvm.org/D8760 llvm-svn: 233999
* Move debug register output into __amd64__ (FreeBSD)Ed Maste2015-03-271-2/+0
| | | | | | | This debug register diagnostic is really only applicable to amd64 at present. llvm-svn: 233403
* Use POSIX pid_t and not lldb::pid_t.Davide Italiano2015-03-221-1/+1
| | | | | | | | | | The latter is uint64_t beacuse lldb supports arbitrary pid/platforms but in this case we're using it as return value for fork() which might return -1 to the parent in case the syscall fails. Differential Revision: http://reviews.llvm.org/D8491 llvm-svn: 232926
* Initialize ProcessGDBRemoteLog for LLGS to fix remote platform loggingRobert Flack2015-03-111-8/+1
| | | | | | | | This was previously initialized by ProcessGDBRemote::Initialize but lldb-server does not contain ProcessGDBRemote anymore so this needs to be initialized directly. Differential Revision: http://reviews.llvm.org/D8186 llvm-svn: 231966
* Fix FreeBSD build after r231145Ed Maste2015-03-032-0/+2
| | | | llvm-svn: 231157
* Fix TestProcesslaunch regression caused by D7372Pavel Labath2015-02-062-6/+6
| | | | | | | | | | | | | | | | | | | | | | | 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
* Avoid leakage of file descriptors in LLDB (apply r228130 to FreeBSD)Ed Maste2015-02-051-1/+9
| | | | llvm-svn: 228305
* Share crash information between LLGS and local POSIX debugging withChaoren Lin2015-02-032-168/+8
| | | | | | | 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-192-10/+6
| | | | | | | | | | Process/ProcessPOSIX.cpp and FreeBSD/ProcessMonitor. http://reviews.llvm.org/D6240 llvm-svn: 222372
* Improve PowerPC unwind supportJustin Hibbits2014-11-121-3/+8
| | | | | | | | | | | | | | | | | Summary: Taking advantage of the new 'CFAIsRegisterDereferenced' CFA register type, add full stack unwind support to the PowerPC/PowerPC64 ABI. Also, add a new register set for powerpc32-on-64, so the register sizes are correct. This also requires modifying the ProcessMonitor to add support for non-uintptr_t-sized register values. Reviewers: jasonmolenda, emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D6183 llvm-svn: 221789
* First cut of PowerPC(64) support in LLDB.Justin Hibbits2014-10-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: This adds preliminary support for PowerPC/PowerPC64, for FreeBSD. There are some issues still: * Breakpoints don't work well on powerpc64. * Shared libraries don't yet get loaded for a 32-bit process on powerpc64 host. * Backtraces don't work. This is due to PowerPC ABI using a backchain pointer in memory, instead of a dedicated frame pointer register for the backchain. * Breakpoints on functions without debug info may not work correctly for 32-bit powerpc. Reviewers: emaste, tfiala, jingham, clayborg Reviewed By: clayborg Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D5988 llvm-svn: 220944
* Fix FreeBSD build.Zachary Turner2014-09-301-6/+6
| | | | llvm-svn: 218685
* use std::atomic<> to protect variables being accessed by multiple threadsTodd Fiala2014-09-151-2/+1
| | | | | | | | | | There are several places where multiple threads are accessing the same variables simultaneously without any kind of protection. I propose using std::atomic<> to make it safer. I did a special build of lldb, using the google tool 'thread sanitizer' which identified many cases of multiple threads accessing the same memory. std::atomic is low overhead and does not use any locks for simple types such as int/bool. See http://reviews.llvm.org/D5302 for more details. Change by Shawn Best. llvm-svn: 217818
* 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-092-26/+18
| | | | | | | | | | | | | 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 configure & make build with python disabledKeno Fischer2014-09-091-1/+1
| | | | | | | | | | | | | This makes sure that nothing that requires Python is being built when the LLDB_DISABLE_PYTHON flag is being passed in. It also changes a use of CPPFLAGS to CPP.Flags since the former is overridden when external flags are passed in while the later is not. I'm not sure exactly why LLDB_DISABLE_PYTHON is in CXXFLAGS rather than CPPFLAGS, but cleaning that up is for another commit. Differential Revision: http://reviews.llvm.org/D4918 llvm-svn: 217414
* Consolidate UnixSignals setting/getting in Process.Todd Fiala2014-08-292-15/+12
| | | | | | | | | | | | | | | | See http://reviews.llvm.org/D5108 for details. This change does the following: * eliminates the Process::GetUnixSignals() virtual method and replaces with a fixed getter. * replaces the Process UnixSignals storage with a shared pointer. * adds a Process constructor variant that can be passed the UnixSignalsSP. When the constructor without the UnixSignalsSP is specified, the Host's default UnixSignals is used. * adds a host-specific version of GetUnixSignals() that is used when we need the host's appropriate UnixSignals variant. * replaces GetUnixSignals() overrides in PlatformElfCore, ProcessGDBRemote, ProcessFreeBSD and ProcessLinux with code that appropriately sets the Process::UnixSignals for the process. This change also enables some future patches that will enable llgs to be used for local Linux debugging. llvm-svn: 216748
* Fix Linux to respect ASLR settings when launching processes to debug locally ↵Todd Fiala2014-08-172-0/+2
| | | | | | | | | | 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
* Avoid passing null signal name for Log %s argumentEd Maste2014-05-281-3/+7
| | | | llvm-svn: 209739
* Fix format string for 32bit systems.Joerg Sonnenberger2014-05-021-1/+1
| | | | llvm-svn: 207862
* Move FreeBSDSignals to UtilityEd Maste2014-04-174-61/+1
| | | | | | It will shortly be need by FreeBSD elf core support on all hosts. llvm-svn: 206466
* Add FreeBSD-specific SIGTHR and SIGLIBRT signalsEd Maste2014-04-154-0/+73
| | | | llvm-svn: 206319
* Implement ProcessMonitor::Kill for FreeBSDEd Maste2014-04-012-6/+4
| | | | | | | | | | | | | | | | | 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
* Move calls to DisableAllBreakpointSites() and ↵Andrew MacPherson2014-03-251-2/+0
| | | | | | m_thread_list.DiscardThreadPlans() into base Process::Destroy() instead of in subclass DoDestroy() methods. llvm-svn: 204752
* Correct copy-and-pasted comments for DetachOperationEd Maste2014-03-171-1/+1
| | | | llvm-svn: 204064
* Add Process/Utility include directory on FreeBSDEd Maste2014-03-121-0/+1
| | | | | | Needed after r203667 llvm-svn: 203672
* Restore signal delivery to the inferior on FreeBSDEd Maste2014-02-281-6/+5
| | | | | | | This was broken in the threaded inferior implementation for FreeBSD (r196787) and caused FreeBSD to resume always with no signal. llvm-svn: 202513
* Disable breakpoint sites upon detach on FreeBSDEd Maste2014-02-191-0/+2
| | | | | | llvm.org/pr18894 llvm-svn: 201724
* FreeBSD hardware watchpoint implementationEd Maste2014-02-192-3/+125
| | | | | | | | | | | | | | | 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
* If setgid fails for any reason, exit lldb.Ed Maste2014-02-041-2/+7
| | | | | | | This is SVN r191618 by Sylvestre Ledru applied to the FreeBSD ProcessMonitor. llvm-svn: 200791
* 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-097-37/+337
| | | | | | | Modelled in part on GDBRemoteCommunicationClient. Review: http://llvm-reviews.chandlerc.com/D2267 llvm-svn: 196787
* Correct header guard #endif commentsEd Maste2013-12-041-1/+1
| | | | llvm-svn: 196381
* Fix compile warningsEd Maste2013-11-251-2/+2
| | | | llvm-svn: 195685
* Remove unused variableEd Maste2013-11-251-2/+0
| | | | llvm-svn: 195683
* PT_CONTINUE and PT_STEP are process-scope on FreeBSDEd Maste2013-11-252-20/+20
| | | | | | | | | | 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
* Fix the format warnings.Sylvestre Ledru2013-10-311-2/+2
| | | | | | | | | | In almost all cases, the misuse is about "%lu" being used instead of the correct "%zu" (even though these are compatible on 64-bit platforms in practice). There are even a couple of cases where "%ld" (ie., signed int) is used instead of "%zu", and one where "%lu" is used instead of "%" PRIu64. Fixes bug #17551. Patch by "/dev/humancontroller" llvm-svn: 193832
* Add stub FreeBSD ProcessMonitor::ReadThreadPointerEd Maste2013-10-182-0/+10
| | | | llvm-svn: 192994
* Removed unnecessary call to OpenFirstAvailableMaster.Richard Mitton2013-10-171-8/+0
| | | | | | | | ::Fork already does this internally, so this was simply leaking file handles. This fixes the problem where the test suite would occasionally run out of file handles. llvm-svn: 192929
* Apply ProcessMonitor changes from r190820 to FreeBSDEd Maste2013-09-182-111/+33
| | | | llvm-svn: 190954
* Fixing a problem with thread creation signal order dependencyAndrew Kaylor2013-09-172-0/+27
| | | | llvm-svn: 190831
* Stop closing terminal fd from ProcessMonitor. It is owned by ↵Andrew Kaylor2013-09-141-1/+4
| | | | | | ConnectionFileDescriptor. llvm-svn: 190733
* Clean up handling of FreeBSD thread list on Launch / AttachEd Maste2013-09-031-22/+3
| | | | | | | | Instead of directly manipulating the thread list in Launch and Attach, just rely on RefreshStateAfterStop to populate the initial list. Review: http://llvm-reviews.chandlerc.com/D1565 llvm-svn: 189889
* Clean up warnings in ProcessFreeBSD::UpdateThreadListEd Maste2013-08-301-3/+2
| | | | llvm-svn: 189695
* Move detach to FreeBSD- and Linux-specific classes.Ed Maste2013-08-302-0/+21
| | | | | | | | | On Linux there is no separate notion of a process (vs. a thread) for ptrace(); each thread needs to be individually detached. On FreeBSD we have a separate process context, and we detach just it. Review: http://llvm-reviews.chandlerc.com/D1418 llvm-svn: 189666
* Fix FreeBSD build after r189295Ed Maste2013-08-291-1/+1
| | | | llvm-svn: 189608
* fix FreeBSD build errorDaniel Malea2013-08-291-1/+1
| | | | | | - s/LogSP/Log */ in ProcessMonitorFreeBSD.cpp llvm-svn: 189589
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-261-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, query OS/kernel information, push and pull files, run shell commands, etc... and implementation for the new communication packets that back that interface, at least on Darwin based operating systems via the POSIXPlatform class. Linux support is coming soon. Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS X Mountain Lion. Additional improvements (not in the source SVN branch 'lldb-platform-work'): - cmake build scripts for lldb-platform - cleanup test suite - documentation stub for qPlatform_RunCommand - use log class instead of printf() directly - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely. - add new logging category 'platform' Reviewers: Matt Kopec, Greg Clayton Review: http://llvm-reviews.chandlerc.com/D1493 llvm-svn: 189295
OpenPOWER on IntegriCloud