| #
2a86b555 |
| 14-Jun-2016 |
Pavel Labath <[email protected]> |
Remove Platform usages from NativeProcessLinux
Summary: This removes the last usage of the Platform plugin in NPL. It was being used for determining the architecture of the debugged process. I repla
Remove Platform usages from NativeProcessLinux
Summary: This removes the last usage of the Platform plugin in NPL. It was being used for determining the architecture of the debugged process. I replace the call that went through the Platform plugin with a lower level call on the ObjectFile directly.
Reviewers: tberghammer
Subscribers: uweigand, nitesh.jain, omjavaid, lldb-commits
Differential Revision: http://reviews.llvm.org/D21324
llvm-svn: 272686
show more ...
|
|
Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
| #
57a77118 |
| 16-May-2016 |
Pavel Labath <[email protected]> |
Remove Mutex from NativeProcessLinux
NPL now assumes it is running from a single thread now, so its thread-safety is untested anyway (and if that assumption is broken, we'll have bigger problems (du
Remove Mutex from NativeProcessLinux
NPL now assumes it is running from a single thread now, so its thread-safety is untested anyway (and if that assumption is broken, we'll have bigger problems (due to ptrace restrictions) than a couple of missing mutexes).
llvm-svn: 269640
show more ...
|
| #
bb00d0b6 |
| 14-Apr-2016 |
Ulrich Weigand <[email protected]> |
Support Linux on SystemZ as platform
This patch adds support for Linux on SystemZ: - A new ArchSpec value of eCore_s390x_generic - A new directory Plugins/ABI/SysV-s390x providing an ABI implementat
Support Linux on SystemZ as platform
This patch adds support for Linux on SystemZ: - A new ArchSpec value of eCore_s390x_generic - A new directory Plugins/ABI/SysV-s390x providing an ABI implementation - Register context support - Native Linux support including watchpoint support - ELF core file support - Misc. support throughout the code base (e.g. breakpoint opcodes) - Test case updates to support the platform
This should provide complete support for debugging the SystemZ platform. Not yet supported are optional features like transaction support (zEC12) or SIMD vector support (z13).
There is no instruction emulation, since our ABI requires that all code provide correct DWARF CFI at all PC locations in .eh_frame to support unwinding (i.e. -fasynchronous-unwind-tables is on by default).
The implementation follows existing platforms in a mostly straightforward manner. A couple of things that are different:
- We do not use PTRACE_PEEKUSER / PTRACE_POKEUSER to access single registers, since some registers (access register) reside at offsets in the user area that are multiples of 4, but the PTRACE_PEEKUSER interface only allows accessing aligned 8-byte blocks in the user area. Instead, we use a s390 specific ptrace interface PTRACE_PEEKUSR_AREA / PTRACE_POKEUSR_AREA that allows accessing a whole block of the user area in one go, so in effect allowing to treat parts of the user area as register sets.
- SystemZ hardware does not provide any means to implement read watchpoints, only write watchpoints. In fact, we can only support a *single* write watchpoint (but this can span a range of arbitrary size). In LLDB this means we support only a single watchpoint. I've set all test cases that require read watchpoints (or multiple watchpoints) to expected failure on the platform. [ Note that there were two test cases that install a read/write watchpoint even though they nowhere rely on the "read" property. I've changed those to simply use plain write watchpoints. ]
Differential Revision: http://reviews.llvm.org/D18978
llvm-svn: 266308
show more ...
|
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3 |
|
| #
605b51b8 |
| 23-Feb-2016 |
Pavel Labath <[email protected]> |
Work around a stepping bug in arm64 android M
Summary: On arm64, linux<=4.4 and Android<=M there is a bug, which prevents single-stepping from working when the system comes back from suspend, becaus
Work around a stepping bug in arm64 android M
Summary: On arm64, linux<=4.4 and Android<=M there is a bug, which prevents single-stepping from working when the system comes back from suspend, because of incorrectly initialized CPUs. This did not really affect Android<M, because it did not use software suspend, but it is a problem for M, which uses suspend (doze) quite extensively. Fortunately, it seems that the first CPU is not affected by this bug, so this commit implements a workaround by forcing the inferior to execute on the first cpu whenever we are doing single stepping.
While inside, I have moved the implementations of Resume() and SingleStep() to the thread class (instead of process).
Reviewers: tberghammer, ovyalov
Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, lldb-commits
Differential Revision: http://reviews.llvm.org/D17509
llvm-svn: 261636
show more ...
|
| #
7326c01a |
| 23-Feb-2016 |
Pavel Labath <[email protected]> |
[linux] Remove all traces of signalfd(2)
Summary: Signalfd is not used in the code anymore, and given that the same functionality can be achieved with the new MainLoop class, it's unlikely we will n
[linux] Remove all traces of signalfd(2)
Summary: Signalfd is not used in the code anymore, and given that the same functionality can be achieved with the new MainLoop class, it's unlikely we will need it in the future. Remove all traces of it.
Reviewers: tberghammer, ovyalov
Subscribers: tberghammer, danalbert, srhines, lldb-commits
Differential Revision: http://reviews.llvm.org/D17510
llvm-svn: 261631
show more ...
|
| #
be379e15 |
| 16-Feb-2016 |
Tamas Berghammer <[email protected]> |
Revert "Use BKPT instead of UDF for arm/thumb breakpoints"
This reverts commit 293c18e067d663e0fe93e6f3d800c2a4bfada2b0.
The BKPT instruction generates SIGBUS instead of SIGTRAP in the Linux kernel
Revert "Use BKPT instead of UDF for arm/thumb breakpoints"
This reverts commit 293c18e067d663e0fe93e6f3d800c2a4bfada2b0.
The BKPT instruction generates SIGBUS instead of SIGTRAP in the Linux kernel on Nexus 6 - 5.1.1 (kernel version 3.10.40). Revert the CL until we can figure out how can we hanble the SIGBUS or how to get back a SIGTRAP using the BKPT instruction.
llvm-svn: 260969
show more ...
|
| #
1b6dacbb |
| 10-Feb-2016 |
Tamas Berghammer <[email protected]> |
Use BKPT instead of UDF for arm/thumb breakpoints
The UDF instruction is deprecated in armv7 and in case of thumb2 instructions set it don't work well together with the IT instruction.
Differential
Use BKPT instead of UDF for arm/thumb breakpoints
The UDF instruction is deprecated in armv7 and in case of thumb2 instructions set it don't work well together with the IT instruction.
Differential revision: http://reviews.llvm.org/D16853
llvm-svn: 260367
show more ...
|
|
Revision tags: llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1 |
|
| #
f6ef187b |
| 23-Dec-2015 |
Mohit K. Bhakkad <[email protected]> |
[LLDB] Fix Read/Write memory to be compatible with both endians
Reviewers: tberghammer. Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits. Differential Revision: http://reviews.llvm.or
[LLDB] Fix Read/Write memory to be compatible with both endians
Reviewers: tberghammer. Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits. Differential Revision: http://reviews.llvm.org/D15738
llvm-svn: 256331
show more ...
|
|
Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1 |
|
| #
1fa5c4b9 |
| 13-Oct-2015 |
Tamas Berghammer <[email protected]> |
Fix cast in arm watchpoint handling code
We had an incorrect sign extension when castion from a pointer to an lldb::addr_t what broke the watchpoint hit detection on arm.
llvm-svn: 250180
|
| #
7a9495bc |
| 01-Sep-2015 |
Pavel Labath <[email protected]> |
[NativeProcessLinux] Fix detach of multithreaded inferiors
When detaching, we need to detach from all threads of the inferior and not just the main one. Without this, a multi-threaded inferior would
[NativeProcessLinux] Fix detach of multithreaded inferiors
When detaching, we need to detach from all threads of the inferior and not just the main one. Without this, a multi-threaded inferior would usually crash once the server exits.
llvm-svn: 246549
show more ...
|
| #
86852d36 |
| 01-Sep-2015 |
Pavel Labath <[email protected]> |
[NativeProcessLinux] Fix assertion failure when killing a process
Linux sometimes sends us a PTRACE_EVENT_EXIT when an inferior process gets a SIGKILL. This can be confusing, since normally we don't
[NativeProcessLinux] Fix assertion failure when killing a process
Linux sometimes sends us a PTRACE_EVENT_EXIT when an inferior process gets a SIGKILL. This can be confusing, since normally we don't expect any events when the inferior is stopped. This commit adds code to handle this situation (resume the thread and let it exit normally) and avoid an assertion failure in ResumeThread().
llvm-svn: 246539
show more ...
|
| #
16ad0321 |
| 28-Aug-2015 |
Mohit K. Bhakkad <[email protected]> |
[LLDB][MIPS] Aligning code with rL245831
Reviewers: jaydeep Subscribers: lldb-commits. Differential Revision: http://reviews.llvm.org/D12427
llvm-svn: 246293
|
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4 |
|
| #
b9cc0c75 |
| 24-Aug-2015 |
Pavel Labath <[email protected]> |
[NativeProcessLinux] Pass around threads by reference
Summary: Most NPL private functions took (shared) pointers to threads as arguments. This meant that the callee could not be sure if the pointer
[NativeProcessLinux] Pass around threads by reference
Summary: Most NPL private functions took (shared) pointers to threads as arguments. This meant that the callee could not be sure if the pointer was valid and so most functions were peppered with null-checks. Now, I move the check closer to the source, and pass around the threads as references (which are then assumed to be valid).
Reviewers: tberghammer
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12237
llvm-svn: 245831
show more ...
|
| #
f9077782 |
| 21-Aug-2015 |
Pavel Labath <[email protected]> |
[NativeProcessLinux] Reduce the number of casts
Summary: NPL used to be peppered with casts of the NativeThreadProtocol objects into NativeThreadLinux. I move these closer to the source where we obt
[NativeProcessLinux] Reduce the number of casts
Summary: NPL used to be peppered with casts of the NativeThreadProtocol objects into NativeThreadLinux. I move these closer to the source where we obtain these objects. This way, the rest of the code can assume we are working with the correct type of objects.
Reviewers: ovyalov, tberghammer
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12187
llvm-svn: 245681
show more ...
|
|
Revision tags: llvmorg-3.7.0-rc3 |
|
| #
0e1d729b |
| 20-Aug-2015 |
Pavel Labath <[email protected]> |
[NativeProcessLinux] Fix a bug in instruction-stepping over thread creation
Summary: There was a bug in NativeProcessLinux, where doing an instruction-level single-step over the thread-creation sysc
[NativeProcessLinux] Fix a bug in instruction-stepping over thread creation
Summary: There was a bug in NativeProcessLinux, where doing an instruction-level single-step over the thread-creation syscall resulted in loss of control over the inferior. This happened because after the inferior entered the thread-creation maintenance stop, we unconditionally performed a PTRACE_CONT, even though the original intention was to do a PTRACE_SINGLESTEP. This is fixed by storing the original state of the thread before the stop (stepping or running) and then performing the appropriate action when resuming.
I also get rid of the callback in the ThreadContext structure, which stored the lambda used to resume the thread, but which was not used consistently.
A test verifying the correctness of the new behavior is included.
Reviewers: ovyalov, tberghammer
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12104
llvm-svn: 245545
show more ...
|
| #
78856474 |
| 19-Aug-2015 |
Pavel Labath <[email protected]> |
On Linux, clear the signal mask of the launched inferior
Summary: Due to fork()/execve(), the launched inferior inherits the signal mask of its parent (lldb-server). But because lldb-server modifies
On Linux, clear the signal mask of the launched inferior
Summary: Due to fork()/execve(), the launched inferior inherits the signal mask of its parent (lldb-server). But because lldb-server modifies its signal mask (It blocks SIGCHLD, for example), the inferior starts with some signals being initially blocked.
One consequence is that TestCallThatRestarts.ExprCommandThatRestartsTestCase (test/expression_command/call-restarts) fails because sigchld_handler() in lotta-signals.c is not called, due to the SIGCHLD signal being blocked.
To prevent the signal masking done by lldb-server from affecting the created inferior, the signal mask of the inferior is now cleared before the execve().
Patch by: Yacine Belkadi
Reviewers: ovyalov, labath
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12138
llvm-svn: 245436
show more ...
|
| #
dee4a867 |
| 19-Aug-2015 |
Omair Javaid <[email protected]> |
Fix lldb-server arm-linux-g++ build
llvm-svn: 245428
|
| #
d2c4c9b1 |
| 18-Aug-2015 |
Pavel Labath <[email protected]> |
[LLGS] Avoid misrepresenting log lines as inferior output
Summary: in case we are logging to stdout, any log lines from the forked child can be misconstrued to be inferior output. To avoid this, we
[LLGS] Avoid misrepresenting log lines as inferior output
Summary: in case we are logging to stdout, any log lines from the forked child can be misconstrued to be inferior output. To avoid this, we disable all logging immediately after forking.
I also fix the implementatoion of DisableAllLogChannels, which was a no-op before this commit.
Reviewers: clayborg, ovyalov
Subscribers: dean, lldb-commits
Differential Revision: http://reviews.llvm.org/D12083
llvm-svn: 245272
show more ...
|
|
Revision tags: llvmorg-3.7.0-rc2 |
|
| #
162fb8e8 |
| 23-Jul-2015 |
Pavel Labath <[email protected]> |
Speed up NativeProcessLinux::GetLoadedModuleFileSpec
Summary: GetLoadedModuleFileSpec was reading /proc/pid/maps character by character, which was very slow, since we do that for every shared librar
Speed up NativeProcessLinux::GetLoadedModuleFileSpec
Summary: GetLoadedModuleFileSpec was reading /proc/pid/maps character by character, which was very slow, since we do that for every shared library, which android tends to have a lot. Switching to ProcFileReader saves us about 0.4 seconds in attach time.
Reviewers: tberghammer
Subscribers: tberghammer, danalbert, lldb-commits
Differential Revision: http://reviews.llvm.org/D11460
llvm-svn: 243019
show more ...
|
| #
79203995 |
| 23-Jul-2015 |
Pavel Labath <[email protected]> |
[NativeProcessLinux] Fix a couple of warnings
llvm-svn: 243013
|
| #
05569f67 |
| 23-Jul-2015 |
Pavel Labath <[email protected]> |
Add jstopinfo support to llgs
Summary: This adds support for jstopinfo field of stop-reply packets. This field enables us to avoid querying full thread stop data on most stops (see r242593 for more
Add jstopinfo support to llgs
Summary: This adds support for jstopinfo field of stop-reply packets. This field enables us to avoid querying full thread stop data on most stops (see r242593 for more details).
Reviewers: ovyalov, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11415
llvm-svn: 242997
show more ...
|
| #
19cbe96a |
| 21-Jul-2015 |
Pavel Labath <[email protected]> |
[NativeProcessLinux] Integrate MainLoop
Summary: This commit integrates MainLoop into NativeProcessLinux. By registering a SIGCHLD handler with the llgs main loop, we can get rid of the special moni
[NativeProcessLinux] Integrate MainLoop
Summary: This commit integrates MainLoop into NativeProcessLinux. By registering a SIGCHLD handler with the llgs main loop, we can get rid of the special monitor thread in NPL, which saves as a lot of thread ping-pong when responding to client requests (e.g. qThreadInfo processing time has been reduced by about 40%). It also makes the code simpler, IMHO.
Reviewers: ovyalov, clayborg, tberghammer, chaoren
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11150
This is a resubmission of r242305 after it was reverted due to bad interactions with the stdio thread.
llvm-svn: 242783
show more ...
|
| #
44e82db2 |
| 20-Jul-2015 |
Pavel Labath <[email protected]> |
[NativeProcessLinux] Bugfix in the monitor thread
Make sure we dont treat EINTR as a fatal error. I was getting this when trying to profile the debugger. I'm not sure why this wasn't surfacing befor
[NativeProcessLinux] Bugfix in the monitor thread
Make sure we dont treat EINTR as a fatal error. I was getting this when trying to profile the debugger. I'm not sure why this wasn't surfacing before, it could be that the profiler is using some signals internally.
llvm-svn: 242681
show more ...
|
|
Revision tags: llvmorg-3.7.0-rc1 |
|
| #
5abe7269 |
| 16-Jul-2015 |
Pavel Labath <[email protected]> |
Revert "[NativeProcessLinux] Integrate MainLoop"
This seems to be causing major slowdows on the android buildbot. Reverting while I investigate.
llvm-svn: 242391
|
| #
827965c3 |
| 15-Jul-2015 |
Pavel Labath <[email protected]> |
[NativeProcessLinux] Integrate MainLoop
Summary: This commit integrates MainLoop into NativeProcessLinux. By registering a SIGCHLD handler with the llgs main loop, we can get rid of the special moni
[NativeProcessLinux] Integrate MainLoop
Summary: This commit integrates MainLoop into NativeProcessLinux. By registering a SIGCHLD handler with the llgs main loop, we can get rid of the special monitor thread in NPL, which saves as a lot of thread ping-pong when responding to client requests (e.g. qThreadInfo processing time has been reduced by about 40%). It also makes the code simpler, IMHO.
Reviewers: ovyalov, clayborg, tberghammer, chaoren
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11150
llvm-svn: 242305
show more ...
|