summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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
* Remove the verbose category in the posix channelPavel Labath2017-02-061-13/+5
| | | | | | 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
* FreeBSD ARM support for software single stepEd Maste2017-01-241-1/+199
| | | | | | | | | | | 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
* 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-061-803/+673
| | | | | | | | | | | | | | | | | | | | | | | *** 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-181-3/+3
| | | | | | | | | | 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
* Change over the broadcaster/listener process to hold shared or weak pointersJim Ingham2016-03-071-4/+4
| | | | | | | | | | | | | | 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
* 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
* Remove long-forgotten plugin virtuals.Bruce Mitchener2015-10-091-17/+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
* Try to fix FreeBSD build.Zachary Turner2015-09-021-12/+12
| | | | 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
* Remove eNewThreadMessage from FreeBSD process monitorEd Maste2015-07-281-14/+1
| | | | | | | FreeBSD thread information is updated after stop - we do not use a message for thread creation. llvm-svn: 243448
* Remove POSIX thread/process abstractionEd Maste2015-07-281-11/+796
| | | | | | | | | 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
* 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
* 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
* 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
* Consolidate UnixSignals setting/getting in Process.Todd Fiala2014-08-291-2/+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 format string for 32bit systems.Joerg Sonnenberger2014-05-021-1/+1
| | | | llvm-svn: 207862
* 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
* 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
* Threaded inferior support for FreeBSDEd Maste2013-12-091-19/+126
| | | | | | | Modelled in part on GDBRemoteCommunicationClient. Review: http://llvm-reviews.chandlerc.com/D2267 llvm-svn: 196787
* 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-301-0/+18
| | | | | | | | | 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
* <rdar://problem/13854277>Greg Clayton2013-05-101-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <rdar://problem/13594769> Main changes in this patch include: - cleanup plug-in interface and use ConstStrings for plug-in names - Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp - Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging The plug-in interface changes: Modified the lldb_private::PluginInterface class that all plug-ins inherit from: Changed: virtual const char * GetPluginName() = 0; To: virtual ConstString GetPluginName() = 0; Removed: virtual const char * GetShortPluginName() = 0; - Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names. - Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc. llvm-svn: 181631
* Patch from Viktor Kutuzov <vkutuzov@accesssoftek.com>:Johnny Chen2012-04-141-4/+0
| | | | | | | | | | | Hello everyone, please find the attached patch for TOT and lldb-platform-work branch, which provides the following changes: - fixed a crash in the ProcessPOSIX constructor when an executable module object is not yet created. - added support for the multi instanciated FreeBSD platform objects (the local host and remote as example). - enabled the remote gdb plugin on FreeBSD. llvm-svn: 154724
* Remove the GetSequenceMutex timeout that isn't being used in the GDB remote ↵Greg Clayton2012-04-121-2/+2
| | | | | | | | plug-in. Also fixed the ProcessLinux, ProcessPOSIX and ProcessFreeBSD to have the correct UpdateThreadList() prototype. llvm-svn: 154603
* Patch from Pawel Worach to make FreeBSD work again after ModuleSpec changes.Greg Clayton2012-02-271-3/+8
| | | | llvm-svn: 151532
* Fix incomplete commit of ↵Johnny Chen2012-01-051-0/+136
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