summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/FreeBSD
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove HostThreadLinux/Free/NetBSDPavel Labath2017-03-171-3/+35
| | | | | | | | | | | | | | | | | | | | | | Summary: These classes existed only because of the GetName() static function, which can be moved to a more natural place anyway. I move the linux version to NativeProcessLinux (and get rid of ProcFileReader), the freebsd version to ProcessFreeBSD (and fix a bug where it was using the current process ID, instead of the inferior pid), and remove the NetBSD version (which was probably incorrect anyway, as it assumes the current process instead of the inferior. I also add an llgs test to that verifies thread names are read correctly. Reviewers: zturner, krytarowski, emaste Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D30981 llvm-svn: 298058
* Resubmit FileSystem changes.Zachary Turner2017-03-081-3/+4
| | | | | | | | | | This was originall reverted due to some test failures in ModuleCache and TestCompDirSymlink. These issues have all been resolved and the code now passes all tests. Differential Revision: https://reviews.llvm.org/D30698 llvm-svn: 297300
* Revert "Use LLVM for all stat-related functionality."Pavel Labath2017-03-071-4/+3
| | | | | | | | | | | | | | | this reverts r297116 because it breaks the unittests and TestCompDirSymlink. The ModuleCache unit test is trivially fixable, but the CompDirSymlink failure is a symptom of a deeper problem: llvm's stat functionality is not a drop-in replacement for lldb's. The former is based on stat(2) (which does symlink resolution), while the latter is based on lstat(2) (which does not). This also reverts subsequent build fixes (r297128, r297120, 297117) and r297119 (Remove FileSpec dependency on FileSystem) which builds on top of this. llvm-svn: 297139
* Fix FreeBSD build.Zachary Turner2017-03-071-2/+3
| | | | llvm-svn: 297120
* Use LLVM for all stat-related functionality.Zachary Turner2017-03-071-2/+2
| | | | | | | | | | This deletes LLDB's FileType enumeration and replaces all users, and all calls to functions that check whether a file exists etc with corresponding calls to LLVM. Differential Revision: https://reviews.llvm.org/D30624 llvm-svn: 297116
* Move DataBuffer / DataExtractor and friends from Core -> Utility.Zachary Turner2017-03-045-5/+5
| | | | llvm-svn: 296943
* Merge Linux and FreeBSD arm register contextsPavel Labath2017-02-271-2/+2
| | | | | | | | | | | | | | Summary: These two register contexts were identical, so this shouldn't cause any regressions, but I'd appreciate it if you can check that this at least compiles. Reviewers: emaste, sas Subscribers: aemerson, rengolin, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D27126 llvm-svn: 296335
* Switch "posix" to the new log channel registration mechanismPavel Labath2017-02-231-1/+0
| | | | | | | | | | | | | | | | | | Summary: This also removes magic rename code, which caused the channel to be called "linux" when built on a linux machine, and "freebsd" when built on a freebsd one, which seems unnecessary - registering a new channel is sufficiently simple now that if we wish to log something extremely os-specific, we can just create a new channel. None of the current categories seem very specific to one OS or another. Reviewers: emaste, krytarowski Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30250 llvm-svn: 295954
* Finish breaking the dependency from Utility.Zachary Turner2017-02-161-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D29964 llvm-svn: 295368
* Remove the verbose category in the posix channelPavel Labath2017-02-062-17/+7
| | | | | | replace by LLDB_LOGV llvm-svn: 294223
* Switch std::call_once to llvm::call_onceKamil Rytarowski2017-02-061-2/+4
| | | | | | | | | | | | | | | | | | | | | Summary: The std::call_once implementation in libstdc++ has problems on few systems: NetBSD, OpenBSD and Linux PPC. LLVM ships with a homegrown implementation llvm::call_once to help on these platforms. This change is required in the NetBSD LLDB port. std::call_once with libstdc++ results with crashing the debugger. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg, emaste, mehdi_amini, clayborg Reviewed By: labath, clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29288 llvm-svn: 294202
* Move classes from Core -> Utility.Zachary Turner2017-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This moves the following classes from Core -> Utility. ConstString Error RegularExpression Stream StreamString The goal here is to get lldbUtility into a state where it has no dependendencies except on itself and LLVM, so it can be the starting point at which to start untangling LLDB's dependencies. These are all low level and very widely used classes, and previously lldbUtility had dependencies up to lldbCore in order to use these classes. So moving then down to lldbUtility makes sense from both the short term and long term perspective in solving this problem. Differential Revision: https://reviews.llvm.org/D29427 llvm-svn: 293941
* [CMake] [3/4] Update a batch of pluginsChris Bieneman2017-01-311-1/+13
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293700
* FreeBSD ARM support for software single stepEd Maste2017-01-243-7/+231
| | | | | | | | | | | Implementation of software single step for FreeBSD on ARM. The code is largely based on the Linux implementation of the same functionality. Patch by Dmitry Mikulin! Differential Revision: https://reviews.llvm.org/D25756 llvm-svn: 292937
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-263-6/+6
| | | | | | | | | | | | | This diff fixes typos in file headers (incorrect file names). Test plan: Under llvm/tools/lldb/source: find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done Differential revision: https://reviews.llvm.org/D27115 llvm-svn: 287966
* Merge Linux and FreeBSD arm64 register contextsPavel Labath2016-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a test-the-water change about possibilities of reducing duplication in the register context definitions. I've named the new class RegisterInfoPOSIX, as RegisterContextPOSIX was already taken :(. The two files were identical except for a fix by Tamas in D12636, which was applied to the Linux version only, which fixed a discrepancy between the definitions of fpsr and fpcr on one hand, and all other floating point register definitions on the other. Linux test suite still passes after this change. For freebsd, make the floating point register behavior consistent, but I don't know whether it will be consistently fixed, or consistently broken. By eyeballing the code, I have a feeling that a similar fix to D12636 will be required in RegisterContextPOSIXProcessMonitor_arm64::ReadRegister, but I can't be sure as I have no way to test it (the assert in that function should fire upon accessing the registers if it is wrong though). Reviewers: emaste, clayborg Subscribers: aemerson, rengolin, beanz, mgorny, modocache, dmikulin, lldb-commits Differential Revision: https://reviews.llvm.org/D25947 llvm-svn: 287916
* Revert unwanted changes in lldb when updating llvm::Error()Mehdi Amini2016-11-111-1/+1
| | | | | | | | My script updated lldb::Errors, and I failed to fix it entirely before pushing. This restore everything in lldb as it was before r286561. llvm-svn: 286565
* Make the Error class constructor protectedMehdi Amini2016-11-111-1/+1
| | | | | | | | | This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0619-4982/+4053
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-191-7/+7
| | | | llvm-svn: 270024
* remove use of Mutex in favour of std::{,recursive_}mutexSaleem Abdulrasool2016-05-184-8/+10
| | | | | | | | | | This is a pretty straightforward first pass over removing a number of uses of Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there are interfaces which take Mutex::Locker & to lock internal locks. This patch cleans up most of the easy cases. The only non-trivial change is in CommandObjectTarget.cpp where a Mutex::Locker was split into two. llvm-svn: 269877
* Generalize child process monitoring functionsPavel Labath2016-05-112-10/+8
| | | | | | | | | | | | | | | | | | | | | | Summary: This replaces the C-style "void *" baton of the child process monitoring functions with a more C++-like API taking a std::function. The motivation for this was that it was very difficult to handle the ownership of the object passed into the callback function -- each caller ended up implementing his own way of doing it, some doing it better than others. With the new API, one can just pass a smart pointer into the callback and all of the lifetime management will be handled automatically. This has enabled me to simplify the rather complicated handshake in Host::RunShellCommand. I have left handling of MonitorDebugServerProcess (my original motivation for this change) to a separate commit to reduce the scope of this change. Reviewers: clayborg, zturner, emaste, krytarowski Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20106 llvm-svn: 269205
* 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
OpenPOWER on IntegriCloud