summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/FreeBSD
Commit message (Collapse)AuthorAgeFilesLines
* Change over the broadcaster/listener process to hold shared or weak pointersJim Ingham2016-03-072-6/+6
| | | | | | | | | | | | | | to each other. This should remove some infrequent teardown crashes when the listener is not the debugger's listener. Processes now need to take a ListenerSP, not a Listener&. This required changing over the Process plugin class constructors to take a ListenerSP, instead of a Listener&. Other than that there should be no functional change. <rdar://problem/24580184> CrashTracer: [USER] Xcode at …ework: lldb_private::Listener::BroadcasterWillDestruct + 39 llvm-svn: 262863
* Fix single-stepping onto a breakpointPavel Labath2016-02-021-14/+5
| | | | | | | | | | | | | | | Summary: r259344 introduced a bug, where we fail to perform a single step, when the instruction we are stepping onto contains a breakpoint which is not valid for this thread. This fixes the problem and add a test case. Reviewers: tberghammer, emaste Subscribers: abhishek.aggarwal, lldb-commits, emaste Differential Revision: http://reviews.llvm.org/D16767 llvm-svn: 259488
* Set correct ThreadStopInfo in case of trace eventAbhishek Aggarwal2016-02-011-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - The patch solves Bug 23478 and Bug 19311. Resolving Bug 23478 also resolves Bug 23039. Correct ThreadStopInfo is set for Linux and FreeBSD platforms. - Summary: When a trace event is reported, we need to check whether the trace event lands at a breakpoint site. If it lands at a breakpoint site then set the thread's StopInfo with the reason 'breakpoint'. Else, set the reason to be 'Trace'. Change-Id: I0af9765e782fd74bc0cead41548486009f8abb87 Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: jingham, emaste, lldb-commits, clayborg, ovyalov Subscribers: emaste Differential Revision: http://reviews.llvm.org/D16720 llvm-svn: 259344
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-17/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* [FreeBSD] Use a cast sledgehammer to placate newer versions of clang.Davide Italiano2016-01-041-2/+2
| | | | | | Now lldb can build on FreeBSD with -Werror again. llvm-svn: 256771
* Remove unused variableEd Maste2016-01-041-3/+1
| | | | | | Obtained from FreeBSD r292611 llvm-svn: 256724
* Strip trailing whitespaceEd Maste2016-01-041-2/+2
| | | | | | | | (There are changes in the copies of these four files in the FreeBSD base system, and I've changed these ones to reduce gratuitous diffs in future imports.) llvm-svn: 256723
* Remove PC -1 offset from FreeBSD arm64 UpdateAfterBreakpointEd Maste2015-12-221-2/+0
| | | | | | It was a copy-and-paste leftover. llvm-svn: 256248
* Make lldb::endian::InlHostByteOrder() private.Bruce Mitchener2015-11-071-1/+1
| | | | | | | | | | | | | | | | | | Summary: Since this is within the lldb namespace, the compiler tries to export a symbol for it. Unfortunately, since it is inlined, the symbol is hidden and this results in a mess of warnings when building on OS X with cmake. Moving it to the lldb_private namespace eliminates that problem. Reviewers: clayborg Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D14417 llvm-svn: 252396
* [FreeBSD] Add missing overrides.Davide Italiano2015-11-042-4/+4
| | | | llvm-svn: 252094
* Add arm64 FreeBSD ProcessMonitor register contextEd Maste2015-10-231-0/+4
| | | | llvm-svn: 251088
* X86: Change FTAG register size in FXSAVE structureAbhishek Aggarwal2015-10-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Changed from 16 bits to 8 bits for Intel Architecture -- FXSAVE structure now conforms with the layout of FXSAVE area specified by IA Architecture Software Developer Manual - Modified Linux and FreeBSD specific files to support this change -- MacOSX already uses 8 bits for ftag register - Modified TestRegisters.py and a.cpp: -- Change allows 8 bit comparison of ftag values -- Change resolves Bug 24733: Removed XFAIL for Clang as the test works and passes for Clang compiler as well -- Change provides a Generic/Better way of testing Bug 24457 and Bug 25050 by using 'int3' inline assembly in inferior Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: ovyalov, jingham, clayborg Subscribers: tfiala, emaste Differential Revision: http://reviews.llvm.org/D13587 llvm-svn: 250022
* Remove long-forgotten plugin virtuals.Bruce Mitchener2015-10-092-28/+0
| | | | | | | | | | | | | | | Summary: EnablePluginLogging, GetPluginCommandHelp and ExecutePluginCommand aren't implemented or used anywhere, so remove them from the Hexagon and POSIX Dynamic Loaders as well as the FreeBSD process. Reviewers: clayborg, labath, emaste Subscribers: lldb-commits, emaste Differential Revision: http://reviews.llvm.org/D13581 llvm-svn: 249840
* Bug 25050: X87 FPU Special Purpose RegistersAbhishek Aggarwal2015-10-062-4/+22
| | | | | | | | | | | | | | | | | Summary: - For x86_64-FreeBSD Platform: -- LLDB now provides correct values of X87 FPU Special Purpose Registers like fstat, ftag, fctrl etc.. Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: emaste, mikesart, clayborg Subscribers: emaste Differential Revision: http://reviews.llvm.org/D13434 llvm-svn: 249379
* Move RegisterContextPOSIX.h to FreeBSD subdirEd Maste2015-09-142-1/+80
| | | | | | It is now used only by the FreeBSD in-process ptrace implementation. llvm-svn: 247561
* Limit scope of RegisterContextPOSIX.h headerEd Maste2015-09-145-0/+5
| | | | | | | | | | | | | | | RegisterContextPOSIX.h is poorly named and contains only the declaration of POSIXBreakpointProtocol, which is used for in-process live kernel debugging. It is now relevant only to FreeBSD. In source/Plugins/Process/Utility/RegisterContext*.h (after assorted rework and refactoring) it only served the purpose of #including other necessary headers as a side-effect. Remove it from them and just include the required headers directly. Differential Revision: http://reviews.llvm.org/D12830 llvm-svn: 247558
* [cmake] Remove LLVM_NO_RTTI.Bruce Mitchener2015-09-031-2/+0
| | | | | | | | | | | | | | Summary: This doesn't exist in other LLVM projects any longer and doesn't do anything. Reviewers: chaoren, labath Subscribers: emaste, tberghammer, lldb-commits, danalbert Differential Revision: http://reviews.llvm.org/D12586 llvm-svn: 246749
* Try to fix FreeBSD build.Zachary Turner2015-09-022-15/+15
| | | | llvm-svn: 246672
* Avoid usage of F_DUPFD_CLOEXEC where not available (e.g. kfreebsd*)Sylvestre Ledru2015-08-281-0/+14
| | | | | | | | | | | | | | | | | Summary: kfreebsd doesn't have F_DUPFD_CLOEXEC, so use it conditionally. Author: Emilio Pozuelo Monfort <pochu@debian.org> Author: Petr Salinger <Petr.Salinger@seznam.cz> Author: Gianfranco Costamagna Reviewers: emaste Subscribers: emaste Differential Revision: http://reviews.llvm.org/D12429 llvm-svn: 246294
* FreeBSDThread::GetRegisterContext is only for FreeBSD targetsEd Maste2015-07-281-29/+20
| | | | | | | | The removal of in-process Linux debug support left a switch statement with llvm::Triple::FreeBSD as the only case. Simplify by replacing it with a now-equivalent assertion. llvm-svn: 243468
* Remove eNewThreadMessage from FreeBSD process monitorEd Maste2015-07-283-25/+1
| | | | | | | FreeBSD thread information is updated after stop - we do not use a message for thread creation. llvm-svn: 243448
* Remove two additional files missed in r243427Ed Maste2015-07-282-0/+0
| | | | llvm-svn: 243428
* Remove POSIX thread/process abstractionEd Maste2015-07-2818-1992/+1724
| | | | | | | | | 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
* Fix FreeBSD build.Chaoren Lin2015-07-143-5/+5
| | | | llvm-svn: 242113
* Reduce FreeBSD log spamEd Maste2015-06-241-4/+2
| | | | | | | | The values of four important registers are included in logs for ptrace PT_GETREGS. Put all four on the same line for a more compact log. Also use the proper 64-bit register names. llvm-svn: 240581
* Remove SetResumeState from POSIXThread::RefreshStateAfterStopEd Maste2015-06-241-6/+0
| | | | | | | | | | | With the removal of ProcessLinux in r240543 this code is used only on FreeBSD. FreeBSD isn't affected by whichever issue originally prompted the addition of SetResumeState, so just remove it. As discussed on the mailing list (and mentioned in a FIXME comment) it shouldn't be called there. llvm-svn: 240550
* Remove empty ProcessPOSIX::StopAllThreadsEd Maste2015-06-242-16/+0
| | | | | | | The removal of ProcessLinux in r240543 left only an empty StopAllThreads (it's not needed on FreeBSD), so just remove it too. llvm-svn: 240549
* Remove old local-only linux debugging codePavel Labath2015-06-2417-0/+4603
| | | | | | | | | | | | | | | | | | | | Summary: Currently, the local-only path fails about 50% of the tests, which means that: a) nobody is using it; and b) the remote debugging path is much more stable. This commit removes the local-only linux debugging code (ProcessLinux) and makes remote-loopback the only way to debug local applications (the same architecture as OSX). The ProcessPOSIX code is moved to the FreeBSD directory, which is now the only user of this class. Hopefully, FreeBSD will soon move to the new architecture as well and then this code can be removed completely. Test Plan: Test suite passes via remote stub. Reviewers: emaste, vharron, ovyalov, clayborg Subscribers: tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10661 llvm-svn: 240543
* 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
OpenPOWER on IntegriCloud