summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
Commit message (Collapse)AuthorAgeFilesLines
...
* Add qModuleInfo request in order to get module information (uuid, triple,..) ↵Oleksiy Vyalov2015-02-254-1/+96
| | | | | | | | by module path from remote platform. http://reviews.llvm.org/D7709 llvm-svn: 230556
* Revert "Fix warnings found with clang-cl."Zachary Turner2015-02-255-5/+9
| | | | | | | SWIG doesn't like enum : unsigned. Revert this until I can fix this in a way that swig likes. llvm-svn: 230531
* Solve hang on Windows when lldb fails to launch the process.Zachary Turner2015-02-251-0/+4
| | | | | | | | | | | | | | The DebuggerThread was detecting the launch error, but it was ignored by ProcessWindows::DoLaunch, causing LLDB to wait forever in the debugger loop. This fixes the test case that explicitly attempts to launch a process from a non-existant path. Patch by Adrian McCarthy Differential Revision: http://reviews.llvm.org/D7874 llvm-svn: 230523
* Fix warnings found with clang-cl.Zachary Turner2015-02-255-9/+5
| | | | | | | | | | | Earlier this week I was able to get clang-cl on Windows to be able to self host. This opened the door to being able to get a whole new slew of warnings for the Windows build. This patch fixes all of the warnings, many of which were real bugs. llvm-svn: 230522
* Truncate target file for stdout and stderrTamas Berghammer2015-02-251-2/+2
| | | | | | | | | Add O_TRUNC when opening file for redirecting stdout and stderr of the process. It is neccessary because if the file exists then on some platform the original content is kept while it isn't overwritten by the new data causing pollution of the saved stdout and stderr. llvm-svn: 230492
* Fix logging in GDBRemoteCommunicationServerPlatform.Oleksiy Vyalov2015-02-251-3/+3
| | | | llvm-svn: 230418
* Fix qLaunchGDBServer packet parsing in GDBRemoteCommunicationServerPlatform.Oleksiy Vyalov2015-02-241-2/+2
| | | | llvm-svn: 230390
* Create ScopedTimeout class for GDBRemoteCommunicationTamas Berghammer2015-02-244-27/+48
| | | | | | | | | | This new class makes it easier to change the timeout of a GDBRemoteCommunication instance for a short time and then restore it to its original value. Differential revision: http://reviews.llvm.org/D7826 llvm-svn: 230319
* elf-core: correct "no sections" to "no segments."Ed Maste2015-02-231-1/+1
| | | | | | | The error reported here is that there are no phdr entries, so it's referring to segments, not sections. llvm-svn: 230227
* Fix the communication in qPlatform_[mkdir,chmod]Tamas Berghammer2015-02-232-19/+25
| | | | | | | | | | | | With the previous implementation the protocol used by the client and the server for the response was different and worked only by an accident. With this change the communication is fixed and the return code from mkdir and chmod correctly captured by lldb. The change also add documentation for the qPlatform__[mkdir,chmod] packages. Differential revision: http://reviews.llvm.org/D7786 llvm-svn: 230213
* Support evaluation of DWARF expressions setting CFAPavel Labath2015-02-231-1/+22
| | | | | | | | | | | | | | | | | | | | | Summary: This patch enables evaluation of DWARF expressions setting the CFA during stack unwinding. This makes TestSigtrampUnwind "almost" pass on linux. I am not enabling the test yet since the symbol name for the signal trampoline does not get resolved properly due to a different bug, but apart from that, the backtrace is sane. I am unsure how this change affects Mac. I think it makes the unwinder prefer the DWARF unwind plan instead of some custom platform-dependant plan. However, it does not affect the end result - the stack unwinding works as expected. Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7792 llvm-svn: 230211
* UnwindPlan::Row refactor -- add support for CFA set by a DWARF expressionPavel Labath2015-02-231-37/+49
| | | | | | | | | | | | | | | | | | | Summary: This change refactors UnwindPlan::Row to be able to store the fact that the CFA is value is set by evaluating a dwarf expression (DW_CFA_def_cfa_expression). This is achieved by creating a new class CFAValue and moving all CFA setting/getting code there. Note that code using the new CFAValue::isDWARFExpression is not yet present and will be added in a follow-up patch. Therefore, this patch should not change the functionality in any way. Test Plan: Ran tests on Mac and Linux. No regressions detected. Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7755 llvm-svn: 230210
* Prevent LLGS from crashing when exiting - make NativeProcessLinux to wait ↵Oleksiy Vyalov2015-02-194-13/+23
| | | | | | | | until ThreadStateCoordinator is fully stopped before entering ~NativeProcessLinux. http://reviews.llvm.org/D7692 llvm-svn: 229875
* Fix warning that not all control-paths return from function.Zachary Turner2015-02-181-1/+1
| | | | llvm-svn: 229718
* Don't use AVX/XSTATE API on Windows.Zachary Turner2015-02-182-68/+34
| | | | | | | | | | | | | CopyContext is necessary to safely get the XState, but LLDB doesn't currently use the XState. CopyContext is available as of Windows 7 SP1, so it can't be used on Vista. Furthermore, it requires the Windows 8 SDK it compile, making the baseline for compiling and running LLDB higher than necessary. Patch by: Adrian McCarthy Reviewed by: Zachary Turner Differential Revision: http://reviews.llvm.org/D7572 llvm-svn: 229710
* Merge lldb-platform and lldb-gdbserver into a single binaryTamas Berghammer2015-02-181-2/+7
| | | | | | | | | | | | | This commit merges lldb-platform and lldb-gdbserver into a single binary of the same size as each of the previous individual binaries. Execution mode is controlled by the first argument being either platform or gdbserver. Patch from: flackr <flackr@google.com> Differential revision: http://reviews.llvm.org/D7545 llvm-svn: 229683
* Remove alias template from GDBRemoteCommunicationServerCommonTamas Berghammer2015-02-181-5/+2
| | | | | | | It is required because MSVC 2013 doesn't generate correct code for template aliases. llvm-svn: 229666
* Send default register number instead of GDB register number in StopReplyPacket.Chaoren Lin2015-02-171-19/+5
| | | | | | | | | | | | | | | | Summary: Using GDB register numbers confuses ProcessGDBRemote since the rest of LLGS (qRegisterInfo, p, P) uses the default register numbers instead. Test Plan: dosep.py --options --arch x86 ... Reviewers: ovyalov, vharron, sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7635 llvm-svn: 229505
* Watchpoint debug registers should work in i386 as well.Chaoren Lin2015-02-171-12/+12
| | | | llvm-svn: 229504
* Fix small assignment mistake.Chaoren Lin2015-02-171-2/+2
| | | | llvm-svn: 229503
* Enable process launching on android from lldb-gdbserverTamas Berghammer2015-02-161-2/+1
| | | | | | | | | Currently it is uses the same code used on linux. Will be replaced with android specific code if needed. Differential Revision: http://reviews.llvm.org/D7613 llvm-svn: 229371
* Fix TestProcessIO.py when run against a remote targetVince Harron2015-02-133-34/+32
| | | | | | | | | | | | | Fixed test case to copy redirected stdout/stderr files from remote target to host llgs wasn't bothering to put the pty master file handle in the right place if stdout/stderr were redirected to a file. It is still needed for stdin. Corrected some log message text llvm-svn: 229141
* Fix four missing 'override' specifiers found with the ClangChandler Carruth2015-02-131-4/+4
| | | | | | | | '-Winconsistent-missing-override' warning. I suggest folks use this to ensure that override is consistently used to mark virtual function overrides. llvm-svn: 229084
* Search through all memory regions of the core file forJason Molenda2015-02-121-3/+7
| | | | | | | | | | | | | | both a user process dyld and for a kernel binary -- we will decide which to prefer after one or both have been located. It would be faster to stop the search thorugh the core segments one we've found a dyld/kernel binary - but that may trick us into missing the one we would prefer. <rdar://problem/19806413> llvm-svn: 228910
* Quiet CoverityJustin Hibbits2015-02-121-1/+2
| | | | | | | | | | | | | | Summary: Coverity warns that unsigned >= 0 is always true, and k_first_gpr_powerpc happens to be 0. Quiet Coverity by changing that comparison instead to a static_assert(), in case things change in the future. Reviewers: emaste Reviewed By: emaste Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7576 llvm-svn: 228908
* Fix windows build (broken by r228823)Tamas Berghammer2015-02-111-0/+3
| | | | llvm-svn: 228828
* Separate monolithic GDBRemoteCommunicationServer class into 4 partTamas Berghammer2015-02-1114-4945/+4957
| | | | | | | | | | | GDBRemoteCommunicationServer: Basic packet handling, handler registration LLDBCommonPacketHandler: Common packet handling for lldb-platform and lldb-gdbserver LLDBPlatformPacketHandler: lldb-platform specific packet handling LLGSPacketHandler: lldb-gdbserver specific packet handling Differential Revision: http://reviews.llvm.org/D7538 llvm-svn: 228823
* Fix 'process launch -i' for remote processesVince Harron2015-02-101-22/+28
| | | | | | | | | | | | | | | | | | We want to forward stdin when stdio is not disabled and when we're not redirecting stdin from a file. renamed m_stdio_disable to m_stdin_forward and inverted value because that's what we want to remember. There was previously a bug that if you redirected stdin from a file, stdout and stderr would also be redirected to /dev/null Adds support for remote target to TestProcessIO.py Fixes ProcessIOTestCase.test_stdin_redirection_with_dwarf for remote Linux targets llvm-svn: 228744
* Adding x86 to supported architectures on x86_64.Chaoren Lin2015-02-101-0/+1
| | | | llvm-svn: 228715
* Fix off-by-one IsGPR().Justin Hibbits2015-02-081-1/+1
| | | | | | | f0 was being counted as a GPR, due to the check in IsGPR(). Correct it by looking at the precise GPR range. llvm-svn: 228547
* Make lldb-platform to clear m_process_launch_info when hanlding qProcessInfo ↵Oleksiy Vyalov2015-02-061-0/+1
| | | | | | request - otherwise subsequent process launches will reuse data from previous launch. llvm-svn: 228430
* Add support for SBProcess::PutSTDIN to remote processesVince Harron2015-02-065-0/+84
| | | | | | | | | | | | | | Processes running on a remote target can already send $O messages to send stdout but there is no way to send stdin to a remote inferior. This allows processes using the API to pump stdin into a remote inferior process. It fixes a hang in TestProcessIO.py when running against a remote target. llvm-svn: 228419
* Fix TestProcesslaunch regression caused by D7372Pavel Labath2015-02-065-13/+22
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix build of lldb-gdbserver and lldb-platform for android (arm32, x86)Tamas Berghammer2015-02-062-33/+29
| | | | | | | | | | * Fix cmake script for android x86 * Reorder includes to avoid collision between system macros and local variables in clang framework Differential Revision: http://reviews.llvm.org/D7435 llvm-svn: 228388
* Fix TestThreadSpecificBreakpoint with LLGSTamas Berghammer2015-02-061-135/+134
| | | | | | | | | | | * Set the state of the process into running/stepping on continue/step operations * Add mutex to use transactions in Thread State Coordinator ** It is required because the events from two Signal Handler or form a Signal handler and a Resume request shouldn't overlap * Send Stop Replay Packet only when the state of the process changed Differential Revision: http://reviews.llvm.org/D7374 llvm-svn: 228387
* Fix warning about the use of mktemp and make platform agnostic by adding and ↵Oleksiy Vyalov2015-02-051-25/+11
| | | | | | | | using PipeBase::CreateWithUniqueName - on behalf of flackr. http://reviews.llvm.org/D7348 llvm-svn: 228307
* Avoid leakage of file descriptors in LLDB (apply r228130 to FreeBSD)Ed Maste2015-02-051-1/+9
| | | | llvm-svn: 228305
* Implement initial Altivec supportJustin Hibbits2015-02-0512-14/+315
| | | | | | | | | | | | | | | | | Summary: This adds the register plumbing, as well as register reading in FreeBSD core dumps. Further work on the POSIX/FreeBSD ProcessMonitor is required in order to support ptrace access to these registers. Reviewers: tfiala, emaste Reviewed By: emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D7039 llvm-svn: 228278
* Add PowerPC FPR access to the process monitorJustin Hibbits2015-02-052-21/+23
| | | | | | | | | | | | | | Summary: This adds reading and writing to the POSIX PowerPC ProcessMonitor. Reviewers: emaste Reviewed By: emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D7040 llvm-svn: 228277
* Extend SBPlatform with capability to launch/terminate a process remotely. ↵Oleksiy Vyalov2015-02-043-31/+42
| | | | | | | | Integrate this change into test framework in order to spawn processes on a remote target. http://reviews.llvm.org/D7263 llvm-svn: 228230
* Avoid leakage of file descriptors in LLDB and LLGSPavel Labath2015-02-042-2/+18
| | | | | | | | | | | | | | | Summary: Both LLDB and LLGS are leaking file descriptors into the debugged process. This plugs the leak by closing the unneeded descriptors. In one case I use O_CLOEXEC, which I hope is supported on relevant platforms. I also added a regression test and plugged a fd leak in dosep.py. Reviewers: vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7372 llvm-svn: 228130
* Test commit.Chaoren Lin2015-02-041-1/+1
| | | | | | | Removed trailing whitespace. From: Vince Harron <vharron@google.com> llvm-svn: 228115
* Fix TestThreadStepOut on Linux with LLGSChaoren Lin2015-02-032-5/+8
| | | | | | | | Remove implicit stop action on $vCont package for threads where no explicit action or default action specified based on the specification (they have to stay in there original state). llvm-svn: 227933
* Add missing switch cases to silence warnings.Chaoren Lin2015-02-033-9/+13
| | | | llvm-svn: 227931
* Implement setting and clearing watchpoints.Chaoren Lin2015-02-0310-83/+447
| | | | llvm-svn: 227930
* Moving header files from source/Host/common to proper location.Chaoren Lin2015-02-037-11/+11
| | | | llvm-svn: 227929
* Make ThreadStateCoordinator to handle properly failed stop/resume operations.Chaoren Lin2015-02-033-36/+63
| | | | llvm-svn: 227928
* Share crash information between LLGS and local POSIX debugging withChaoren Lin2015-02-0316-676/+494
| | | | | | | CrashReason class. Deliver crash information from LLGS to lldb via description field of thread stop packet. llvm-svn: 227926
* Modify ThreadStateCoodrinator in order to resume threads if stop wasn't ↵Chaoren Lin2015-02-034-138/+180
| | | | | | requested. llvm-svn: 227924
* Refactor ptrace commands in NativeProcessLinux to use Error as result return ↵Chaoren Lin2015-02-033-295/+203
| | | | | | type. llvm-svn: 227923
OpenPOWER on IntegriCloud