Summary:
There were a number of issues about the way I have designed this test originally:
- it relied on single-stepping through large parts of code, which was slow and unreliable
- the threading libraries interfered with the exact thing we wanted to test
For this reason, I have rewritted the test using low-level linux api, which allows the test to be
much more focused. The functionality for other platforms will need to be tested separately.
Reviewers: tberghammer
Subscribers: tberghammer, danalbert, srhines, lldb-commits
Differential Revision: http://reviews.llvm.org/D12280
llvm-svn: 245838
The POSIX linker generally reports the load bias for the loaded
libraries but in some case it is useful to handle a library based on
absolute load address. Example usecases:
* Windows linker uses absolute addresses
* Library list came from different source (e.g. /proc/<pid>/maps)
Differential revision: http://reviews.llvm.org/D12233
llvm-svn: 245834
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
Summary: We get an assertion otherwise because the None Interpreter cannot be found
Reviewers: zturner
Subscribers: zturner, lldb-commits
Differential Revision: http://reviews.llvm.org/D11898
llvm-svn: 245808
This reverts commit 7749a10ddbe22767d0e055753c674fcde7f28d39.
This commit introduces about 15-20 new test failures with windows local
targets.
llvm-svn: 245765
clang-cl does not yet support C++ exceptions, so these tests will
not even compile.
Re-enabling these tests is tracked by llvm.org/pr24538
llvm-svn: 245747
Summary:
This commit implements basic DidAttach and DidLaunch for the windows
DynamicLoader plugin which allow us to load shared libraries from the
inferior.
At the moment, I'm unsure how we're going to gather the load address of
the main module over gdb protocol so I always use an offset of 0, which
works well for processes we create ourselves (no randomization). I will
address this point later on.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12245
llvm-svn: 245725
Summary:
When a windows remote stops because of a DLL load/unload, the debug server
sends a stop reply packet that contains a `library` key with any value (usually
just `library:1`). This indicates to the debugger that a library has been
loaded or unloaded and that the list of libraries should be refreshed (usually
with `qXfer:libraries:read`).
This change just triggers a call to `LoadModules()` which in turns will send a
remote library read command when a stop reply that requests it is received.
Reviewers: clayborg, zturner, tberghammer
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12218
llvm-svn: 245708
Change the way EmulateInstruction::eContextPopRegisterOffStack handled
in UnwindAssemblyInstEmulation::WriteRegister to accomodate for
additional cases when eContextPopRegisterOffStack (pop PC/FLAGS).
llvm-svn: 245690
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
This was breaking disassembly for arm machines that we force to be
thumb mode all the time because we were only checking for llvm::Triple::arm.
i.e.
armv6m (ARM Cortex-M0)
armv7m (ARM Cortex-M3)
armv7em (ARM Cortex-M4)
<rdar://problem/22334522>
llvm-svn: 245645
Summary:
This uses the .clang-format at the root of the LLDB repo and is just a
mechanical change that precedes more work in this file.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12217
llvm-svn: 245634
There might be an underlying race condition here that should be
figured out, but this at least prevents the crash for the time
being and doesn't appear to have any adverse effects.
llvm-svn: 245626
Summary:
This is useful when dealing with Windows remote that use only the
qXfer:libraries command which returns absolute base addresses, as
opposed to qXfer:libraries-svr4 which returns relative offsets for
module bases.
Reviewers: clayborg, zturner, ADodds
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12204
llvm-svn: 245625
Summary:
dllexport doesn't work if linking against a static library with its own
copy of snprintf.
Reviewers: zturner
Subscribers: zturner, lldb-commits
Differential Revision: http://reviews.llvm.org/D12206
llvm-svn: 245610
Summary: Size specifier should come after `%` not before.
Reviewers: clayborg, ADodds
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12203
llvm-svn: 245608
The test was flaky on the android buildbot, because the 10ms test completed before we got a
chance to interrupt it. I increase the duration to 50ms to hopefully get more consistent results.
llvm-svn: 245555
Eliminated ENABLE_128_BIT_SUPPORT and union ValueData from Scalar.cpp and use llvm::APInt and llvm::APFloat for all integer and floating point types. Also used Scalar in RegisterValue.cpp
Reviewers: tberghammer, ovyalov, clayborg, labath
Subscribers: lldb-commits, nitesh.jain, jaydeep
Differential: http://reviews.llvm.org/D12100
llvm-svn: 245547
On ARM there is no difference petween a pop and a load instruction so
a register can be loaded multiple times during the function. Add check
to threat the load as a restore only if it do the restore from the
same location where the register was saved.
Differential revision: http://reviews.llvm.org/D11947
llvm-svn: 245546
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
to the user. e.g. specified via the
plugin.process.gdb-remote.target-definition-file
setting. Currently we silently ignore the target definition if
there is a parse error.
llvm-svn: 245536