summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/POSIX
Commit message (Collapse)AuthorAgeFilesLines
* Remove unreachable code when thread exits on Linux.Matt Kopec2013-08-081-6/+0
| | | | llvm-svn: 187995
* Fix thread name updating in Linux. "thread list" should report correct names ↵Michael Sartain2013-07-314-24/+24
| | | | | | | | | | | always now. Created new LinuxThread class inherited from POSIXThread and removed linux / freebsd ifdefs Removed several un-needed set thread name calls CR (and multiple suggestions): mkopec llvm-svn: 187545
* Run-time reg context selection for POSIX targetsEd Maste2013-07-301-8/+12
| | | | | | | | | | | | Instantiate RegisterContext... based on getOS() instead of with compile-time #ifdef-ery. The assert() here is unfortunate, but better than crashing with no explanation. This change is equivalent to r186865 for elf-core. llvm-svn: 187422
* Modify ProcessPOSIX to use the thread list mutex as neededDaniel Malea2013-07-241-0/+17
| | | | | | - should resolve (at least some) of the spurious crashes we are seeing in multithreaded tests on Linux (and likely FreeBSD) llvm-svn: 187081
* Factor out common string match code for POSIX log enable/disableEd Maste2013-07-221-32/+32
| | | | llvm-svn: 186822
* Re-introduces ELF core file support for Linux x86-64Ashok Thirumurthi2013-07-171-36/+90
| | | | | | | | | | Usage: 'lldb a.out -c core'. TODO: FreeBSD support. TODO: Support for AVX registers. TODO: Refactor so that RegisterContextCore* don't inherit from classes that use ProcessMonitor to fix the build on OS/X. llvm-svn: 186516
* Revert the ELF core file support until a few things can be worked out:Greg Clayton2013-07-121-6/+0
| | | | | | | | | | | | | | | | | | | | | | | RegisterContextCoreLinux_x86_64 inherits from RegisterContextLinux_x86_64 which inherits from RegisterContext_x86_64 which uses has: ProcessMonitor &GetMonitor(); This register context used by the core file can't use this since the process plug-in will be ProcessElfCore and the implementation of GetMonitor() does: ProcessMonitor & RegisterContext_x86_64::GetMonitor() { ProcessSP base = CalculateProcess(); ProcessPOSIX *process = static_cast<ProcessPOSIX*>(base.get()); return process->GetMonitor(); } ProcessELFCore doesn't, nor should it inherit from ProcessPOSIX and any call to GetMonitor() will fail for ELF core files. Suggested cleanups: - Make a register context class that is a base class that doesn't have any reading smarts, then make one that uses ProcessPOSIX and the has the GetMonitor() call, and one that gets its data straight from the core file. llvm-svn: 186223
* Introduces core file support for Linux x86-64 using 'lldb a.out -c core'.Ashok Thirumurthi2013-07-121-0/+6
| | | | | | | | TODO: Support for RegisterContext_x86_64::ReadFPR. Patch by Samuel Jacob! llvm-svn: 186207
* Handle BreakNotify for threads whose tid doesn't match the ThreadSpec of the ↵Ashok Thirumurthi2013-07-121-7/+27
| | | | | | | | | BreakpointSite to avoid asserts when stepping in a multi-threaded application. Note: Test to follow shortly. llvm-svn: 186190
* Stop process monitor from ProcessPOSIX::FinalizeAndrew Kaylor2013-07-102-0/+11
| | | | llvm-svn: 186039
* Add support for listing inferior thread names on Linux.Matt Kopec2013-07-103-2/+35
| | | | llvm-svn: 186033
* Reverting ProcessMonitor shared pointer changesAndrew Kaylor2013-07-092-6/+2
| | | | llvm-svn: 185981
* Use shared pointers to hold the process in ProcessMonitorAndrew Kaylor2013-07-092-2/+6
| | | | llvm-svn: 185946
* Fix signal handling for POSIX (only tested on Linux) processes in ↵Matt Kopec2013-07-092-19/+64
| | | | | | | | multi-threaded programs. Also fix a related issue where if a thread exits after a thread continue, lldb would hang. llvm-svn: 185944
* Avoid crash if we fail to resolve process in attachEd Maste2013-07-041-3/+2
| | | | llvm-svn: 185661
* Update error message; detach-keeps-stopped is also not on FreeBSDEd Maste2013-07-031-2/+2
| | | | llvm-svn: 185549
* Split symbol support for ELF and Linux.Michael Sartain2013-07-011-1/+1
| | | | llvm-svn: 185366
* Following the modification introduced in llvm by commit 185311Sylvestre Ledru2013-07-011-1/+1
| | | | | | | | | | | | | | | | | | The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD. This kind of simplification is sometimes useful, but in general it's not correct. As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the build definitions used for FreeBSD, whereas for userland-related issues we want to match the definitions used for other systems with Glibc. The current modification adjusts the build system so that they can be distinguished, and explicitly adds GNU/kFreeBSD to the build checks in which it belongs. Fixes bug #16446. Patch by Robert Millan in the context of Debian. llvm-svn: 185313
* Remove unneeded limbo state flag.Matt Kopec2013-06-262-20/+2
| | | | llvm-svn: 185010
* Update comment after Linux->POSIX renameEd Maste2013-06-251-2/+2
| | | | llvm-svn: 184850
* Update for Linux->POSIX renameEd Maste2013-06-241-8/+8
| | | | | | | Revision r147613 (2341d35) renamed this file with s/Linux/POSIX/, but header guards and comments were not updated to match. llvm-svn: 184741
* Using offsetof to an item within an array is an extension so mark it as such ↵Andy Gibbs2013-06-243-11/+14
| | | | | | to avoid compiler warnings. llvm-svn: 184738
* Use LLDB_INVALID_REGNUM at Mike Sartain's suggestionAndy Gibbs2013-06-191-1/+1
| | | | llvm-svn: 184342
* Fix two 'variable is used uninitialised' warnings. Change assert to ↵Andy Gibbs2013-06-191-2/+2
| | | | | | llvm_unreachable. llvm-svn: 184334
* Add assertion for when no watchpoint found in POSIX watchnotify handler.Matt Kopec2013-06-182-12/+21
| | | | | | Also, ensure x86_64 watchpoint registers are initialized before they are accessed on the POSIX side. llvm-svn: 184246
* Temporarily disable checking of watchpoint hit on FreeBSD on trace message.Matt Kopec2013-06-181-0/+2
| | | | | | Patch from Ed Maste. llvm-svn: 184241
* Add output of fault address on an address related crash (ie. segfault).Matt Kopec2013-06-105-14/+33
| | | | llvm-svn: 183701
* Use std::vector for the array of RegisterInfo structs that describe the ↵Ashok Thirumurthi2013-06-054-45/+32
| | | | | | | | | | | | register context. - Ensures that this container is populated once for the lifetime of lldb --- In particular, static methods can query this data even after the first RegisterContext has been destroyed. - Uses a singleton function to avoid global constructors. Thanks to Greg Clayton for the suggestion! llvm-svn: 183313
* Fix setting of watchpoints on inferior thread creation for Linux.Matt Kopec2013-06-036-51/+134
| | | | llvm-svn: 183139
* Matched a vector new with vector delete.Ashok Thirumurthi2013-06-031-1/+1
| | | | | | Thanks to Daniel and valgrind. llvm-svn: 183110
* Add ability to attach/detach to multi-threaded inferiors on Linux.Matt Kopec2013-05-311-2/+9
| | | | | | All running threads will be detected and stopped on attach and all threads get resumed on detach. llvm-svn: 183049
* Adding support for stopping all threads of multithreaded inferiors on Linux. ↵Andrew Kaylor2013-05-285-49/+137
| | | | | | Also adding multithreaded test cases. llvm-svn: 182809
* Prevent convenience registers from being included in "read register" as they ↵Ashok Thirumurthi2013-05-131-1/+4
| | | | | | | | | are derived registers. - Also refactors TestRegisters.py because test_convenience_registers_with_process_attach now fails with an assert. TODO: Cross-reference the skipOnLinux decorator with a bugzilla report after root-causing this issue. llvm-svn: 181737
* Fixed expression evaluation with convenience registers.Ashok Thirumurthi2013-05-132-5/+18
| | | | | | | - Also improved test coverage for passing tests to include expr/x and a sanity check for $eax as the lower half of $rax. llvm-svn: 181727
* Add a new constructor with ConstString (and not only const char *). ↵Sylvestre Ledru2013-05-131-0/+5
| | | | | | Hopefully fixes the build of lldb llvm-svn: 181694
* Fixed "log enable linux registers" and added a test.Ashok Thirumurthi2013-05-0911-53/+69
| | | | | | | | | | - 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
* Fixed a build failure introduced by r181501.Ashok Thirumurthi2013-05-091-1/+1
| | | | | | Patch by Yao Qi. llvm-svn: 181511
* Changed the formerly pure virtual function:Greg Clayton2013-05-092-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | namespace lldb_private { class Thread { virtual lldb::StopInfoSP GetPrivateStopReason() = 0; }; } To not be virtual. The lldb_private::Thread now handles the correct caching and will call a new pure virtual function: namespace lldb_private { class Thread { virtual bool CalculateStopInfo() = 0; } } This function must be overridden by thead lldb_private::Thread subclass and the only thing it needs to do is to set the Thread::StopInfo() with the current stop reason and return true, or return false if there is no stop reason. The lldb_private::Thread class will take care of calling this function only when it is required. This allows lldb_private::Thread subclasses to be a bit simpler and not all need to duplicate the cache and invalidation settings. Also renamed: lldb::StopInfoSP lldb_private::Thread::GetPrivateStopReason(); To: lldb::StopInfoSP lldb_private::Thread::GetPrivateStopInfo(); Also cleaned up a case where the ThreadPlanStepOverBreakpoint might not re-set its breakpoint if the thread disappears (which was happening due to a bug when using the OperatingSystem plug-ins with memory threads and real threads). llvm-svn: 181501
* Fix assertion from previous fix for debian os watchpoints.Matt Kopec2013-05-081-1/+1
| | | | | | Also mark one of the tests as expected fail on Linux due to the debian fix. llvm-svn: 181448
* Attempt to fix failing watchpoints for debian os buildbot.Matt Kopec2013-05-081-0/+14
| | | | llvm-svn: 181447
* Adding support for process attach by pid on Linux.Andrew Kaylor2013-05-071-1/+34
| | | | llvm-svn: 181374
* Add watchpoint support for Linux on 64-bit host.Matt Kopec2013-05-0710-2/+542
| | | | llvm-svn: 181341
* Reinstating r181091 and r181106 with fix for Linux regressions.Andrew Kaylor2013-05-072-10/+8
| | | | llvm-svn: 181340
* Refactoring for struct UserArea:Ashok Thirumurthi2013-05-035-115/+117
| | | | | | | | | | | | | - Decouples RegisterContext_x86_64 from UserArea. - Restores the original definition of UserArea so that it can be used to generate offsets for use with ptrace. - Moves UserArea to the 64-bit Linux specialization. - Also fixes an off-by-one error for the size of m_gpr. - Also adds a TODO comment noting the need for a mechanism to identify the correct plugin based on the target OS (and architecture). Reviewed by: Matt Kopec and Samuel Jacob llvm-svn: 181055
* Update CMakeLists with RegisterContext* files addedDaniel Malea2013-05-021-0/+2
| | | | llvm-svn: 180920
* Recommitting r180831 with trivial fix - remember to return errors if you ↵Jim Ingham2013-05-022-2/+9
| | | | | | compute. llvm-svn: 180898
* <rdar://problem/13700260>Greg Clayton2013-05-012-11/+4
| | | | | | | | | | | | | | <rdar://problem/13723772> Modified the lldb_private::Thread to work much better with the OperatingSystem plug-ins. Operating system plug-ins can now return have a "core" key/value pair in each thread dictionary for the OperatingSystemPython plug-ins which allows the core threads to be contained with memory threads. It also allows these memory threads to be stepped, resumed, and controlled just as if they were the actual backing threads themselves. A few things are introduced: - lldb_private::Thread now has a GetProtocolID() method which returns the thread protocol ID for a given thread. The protocol ID (Thread::GetProtocolID()) is usually the same as the thread id (Thread::GetID()), but it can differ when a memory thread has its own id, but is backed by an actual API thread. - Cleaned up the Thread::WillResume() code to do the mandatory parts in Thread::ShouldResume(), and let the thread subclasses override the Thread::WillResume() which is now just a notification. - Cleaned up ClearStackFrames() implementations so that fewer thread subclasses needed to override them - Changed the POSIXThread class a bit since it overrode Thread::WillResume(). It is doing the wrong thing by calling "Thread::SetResumeState()" on its own, this shouldn't be done by thread subclasses, but the current code might rely on it so I left it in with a TODO comment with an explanation. llvm-svn: 180886
* Platform-specific specialization for the GPR register file.Ashok Thirumurthi2013-05-017-151/+507
| | | | | | | | - Required for platform-independant handling of general purpose registers (i.e. for core dumps). Thanks to Samuel Jacob for this patch. llvm-svn: 180878
* Reverting 180831 as it crashes TestDefaultConstructorForAPIObjects.pyDaniel Malea2013-05-012-9/+2
| | | | llvm-svn: 180868
* Added an option to "process detach" to keep the process stopped, if the ↵Jim Ingham2013-04-302-2/+9
| | | | | | | | | | process plugin (or in the case of ProcessGDBRemote the stub we are talking to) know how to do that. rdar://problem/13680832 llvm-svn: 180831
OpenPOWER on IntegriCloud