|
Revision tags: llvmorg-6.0.0-rc1 |
|
| #
d8b3c1a1 |
| 18-Dec-2017 |
Pavel Labath <[email protected]> |
NPL: Clean up handling of inferior exit
Summary: lldb-server was sending the "exit" packet (W??) twice. This happened because it was handling both the pre-exit (PTRACE_EVENT_EXIT) and post-exit (WIF
NPL: Clean up handling of inferior exit
Summary: lldb-server was sending the "exit" packet (W??) twice. This happened because it was handling both the pre-exit (PTRACE_EVENT_EXIT) and post-exit (WIFEXITED) as exit events. We had some code which was trying to detect when we've already sent the exit packet, but this stopped working quite a while ago.
This never really caused any problems in practice because the client automatically closes the connection after receiving the first packet, so the only effect of this was some warning messages about extra packets from the lldb-server test suite, which were ignored because they didn't fail the test.
The new test suite will be stricter about this, so I fix this issue ignoring the first event. I think this is the correct behavior, as the inferior is not really dead at that point, so it's premature to send the exit packet.
There isn't an actual test yet which would verify the exit behavior, but in my next patch I will add a test which will also test this functionality.
Reviewers: eugene
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D41069
llvm-svn: 320961
show more ...
|
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3 |
|
| #
11edb4ee |
| 01-Dec-2017 |
Pavel Labath <[email protected]> |
Kill struct IOVEC
struct iovec is used as an interface to system (posix) api's. As such, we shouldn't be using it in os-independent code, and we shouldn't be defining our own iovec replacements.
Fo
Kill struct IOVEC
struct iovec is used as an interface to system (posix) api's. As such, we shouldn't be using it in os-independent code, and we shouldn't be defining our own iovec replacements.
Fortunately, its usage was not very widespread, so the removal was very easy -- I simply moved a couple declarations into os-specific code.
llvm-svn: 319536
show more ...
|
|
Revision tags: llvmorg-5.0.1-rc2 |
|
| #
d37349f3 |
| 10-Nov-2017 |
Pavel Labath <[email protected]> |
Clean up NativeRegisterContext
Summary: This commit removes the concrete_frame_idx member from NativeRegisterContext and related functions, which was always set to zero and never used.
I also chang
Clean up NativeRegisterContext
Summary: This commit removes the concrete_frame_idx member from NativeRegisterContext and related functions, which was always set to zero and never used.
I also change the native thread class to store a NativeRegisterContext as a unique_ptr (documenting the ownership) and make sure it is always initialized (most of the code was already blindly dereferencing the register context pointer, assuming it would always be present -- this makes its treatment consistent).
Reviewers: eugene, clayborg, krytarowski
Subscribers: aemerson, sdardis, nemanjai, javed.absar, arichardson, kristof.beyls, kbarton, uweigand, alexandreyy, lldb-commits
Differential Revision: https://reviews.llvm.org/D39837
llvm-svn: 317881
show more ...
|
| #
578a4258 |
| 09-Nov-2017 |
Pavel Labath <[email protected]> |
Simplify NativeProcessProtocol::GetArchitecture/GetByteOrder
Summary: These functions used to return bool to signify whether they were able to retrieve the data. This is redundant because the ArchSp
Simplify NativeProcessProtocol::GetArchitecture/GetByteOrder
Summary: These functions used to return bool to signify whether they were able to retrieve the data. This is redundant because the ArchSpec and ByteOrder already have their own "invalid" states, *and* because both of the current implementations (linux, netbsd) can always provide a valid result.
This allows us to simplify bits of the code handling these values.
Reviewers: eugene, krytarowski
Subscribers: javed.absar, lldb-commits
Differential Revision: https://reviews.llvm.org/D39733
llvm-svn: 317779
show more ...
|
|
Revision tags: llvmorg-5.0.1-rc1 |
|
| #
a5be48b3 |
| 17-Oct-2017 |
Pavel Labath <[email protected]> |
Remove shared_pointer from NativeThreadProtocol
Summary: The NativeThread class is useless without the containing process (and in some places it is already assuming the process is always around). Th
Remove shared_pointer from NativeThreadProtocol
Summary: The NativeThread class is useless without the containing process (and in some places it is already assuming the process is always around). This makes it clear that the NativeProcessProtocol is the object owning the threads, and makes the destruction order deterministic (first threads, then process). The NativeProcess is the only thing holding a thread unique_ptr, and methods that used to hand out thread shared pointers now return raw pointers or references.
Reviewers: krytarowski, eugene
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D35618
llvm-svn: 316007
show more ...
|
| #
aae0a752 |
| 05-Oct-2017 |
Eugene Zemtsov <[email protected]> |
Enable breakpoints and read/write GPRs for ppc64le
Add support for ppc64le to create breakpoints and read/write general purpose registers. Other features for ppc64le and functions to read/write othe
Enable breakpoints and read/write GPRs for ppc64le
Add support for ppc64le to create breakpoints and read/write general purpose registers. Other features for ppc64le and functions to read/write other registers are being implemented.
Patch by Alexandre Yukio Yamashita (alexandreyy) Differential Revision: https://reviews.llvm.org/D38323
llvm-svn: 315008
show more ...
|
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
| #
82abefa4 |
| 18-Jul-2017 |
Pavel Labath <[email protected]> |
Remove shared pointer from NativeProcessProtocol
Summary: The usage of shared_from_this forces us to separate construction and initialization phases, because shared_from_this() is not available in t
Remove shared pointer from NativeProcessProtocol
Summary: The usage of shared_from_this forces us to separate construction and initialization phases, because shared_from_this() is not available in the constructor (or destructor). The shared semantics are not necessary, as we always have a clear owner of the native process class (GDBRemoteCommunicationServerLLDB object). Even if we need shared semantics in the future (which I think we should strongly avoid), reverting this will not be necessary -- the owners can still easily store the native process object in a shared pointer if they really want to -- this just prevents the knowledge of that from leaking into the class implementation.
After this a NativeThread object will hold a reference to the parent process (instead of a weak_ptr) -- having a process instance always available allows us to simplify some logic in this class (some of it was already simplified because we were asserting that the process is available, but this makes it obvious).
Reviewers: krytarowski, eugene, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D35123
llvm-svn: 308282
show more ...
|
| #
21a365ba |
| 11-Jul-2017 |
Pavel Labath <[email protected]> |
NativeProcessLinux: Fix handling of raise(SIGTRAP)
In NativeProcessLinux::MonitorSIGTRAP we were asserting that the si_code value is one of the codes we know about. However, that list was very incom
NativeProcessLinux: Fix handling of raise(SIGTRAP)
In NativeProcessLinux::MonitorSIGTRAP we were asserting that the si_code value is one of the codes we know about. However, that list was very incomplete -- for example, we were not handling SI_TKILL/SI_USER, generated by raise(SIGTRAP). A cursory examination show there are at least a dozen codes like these that an app can generate, and more can be added at any point.
So, instead of trying to play catchup, I change the default behavior to treat an unknown si_code like an ordinary signal. The only reason we needed to inspect si_code in the first place is because watchpoint/breakpoints are notified as SIGTRAP, but we already know about those, and us starting to use a new debug event is far less likely than somebody introducing a new non-debug event.
I add a test case to TestRaise to verify we are handling raise(SIGTRAP) in an application properly.
llvm-svn: 307644
show more ...
|
| #
96e600fc |
| 07-Jul-2017 |
Pavel Labath <[email protected]> |
Add a NativeProcessProtocol Factory class
Summary: This replaces the static functions used for creating NativeProcessProtocol instances with a factory pattern, and modernizes the interface of the ne
Add a NativeProcessProtocol Factory class
Summary: This replaces the static functions used for creating NativeProcessProtocol instances with a factory pattern, and modernizes the interface of the new class in the process -- I use llvm::Expected instead of the Status+value combo. I also move some of the common code (like the Delegate registration into the base class). The new arrangement has multiple benefits: - it removes the NativeProcess*** dependency from Process/gdb-remote (which for example means that liblldb no longer pulls in this code). - it enables unit testing of the GDBRemoteCommunicationServerLLGS class (by providing a mock Native Process). - serves as another example on how to use the llvm::Expected class (I couldn't get rid of the Initialize-type functions completely here because of the use of shared_from_this, but that's the next thing on my list here)
Tests still pass on Linux and I've made sure NetBSD compiles after this.
Reviewers: zturner, eugene, krytarowski
Subscribers: srhines, lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33778
llvm-svn: 307390
show more ...
|
| #
c1a6b128 |
| 03-Jul-2017 |
Pavel Labath <[email protected]> |
Use llvm::sys::RetryAfterSignal instead of a manual while errno!=EINTR loop
Reviewers: zturner, eugene, krytarowski
Subscribers: emaste, mgorny, lldb-commits
Differential Revision: https://reviews
Use llvm::sys::RetryAfterSignal instead of a manual while errno!=EINTR loop
Reviewers: zturner, eugene, krytarowski
Subscribers: emaste, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D33831
llvm-svn: 307009
show more ...
|
| #
99e37695 |
| 28-Jun-2017 |
Ravitheja Addepally <[email protected]> |
Implementation of Intel(R) Processor Trace support for Linux
Summary: This patch implements support for Intel(R) Processor Trace in lldb server. The changes have support for starting/stopping and re
Implementation of Intel(R) Processor Trace support for Linux
Summary: This patch implements support for Intel(R) Processor Trace in lldb server. The changes have support for starting/stopping and reading the trace data. The code is only available on Linux versions where the perf attributes for aux buffers are available.
The patch also consists of Unit tests for testing the core buffer reading function.
Reviewers: lldb-commits, labath, clayborg, zturner, tberghammer
Reviewed By: labath, clayborg
Subscribers: mgorny
Differential Revision: https://reviews.llvm.org/D33674
llvm-svn: 306516
show more ...
|
| #
3508fc8c |
| 19-Jun-2017 |
Pavel Labath <[email protected]> |
Add pretty-printer for wait(2) statuses and modernize the code handling them
Summary: A number of places were trying to decode the result of wait(). Add a simple utility function that does that and
Add pretty-printer for wait(2) statuses and modernize the code handling them
Summary: A number of places were trying to decode the result of wait(). Add a simple utility function that does that and a struct that encapsulates the decoded result. Then also provide a pretty-printer for that class.
Reviewers: zturner, krytarowski, eugene
Subscribers: lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33998
llvm-svn: 305689
show more ...
|
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
| #
10c41f37 |
| 06-Jun-2017 |
Pavel Labath <[email protected]> |
replace uses of strerror with llvm::sys::StrError
strerror is not thread-safe. llvm's StrError tries hard to retrieve the string in a thread-safe way and falls back to strerror only if it does not h
replace uses of strerror with llvm::sys::StrError
strerror is not thread-safe. llvm's StrError tries hard to retrieve the string in a thread-safe way and falls back to strerror only if it does not have another way.
llvm-svn: 304795
show more ...
|
|
Revision tags: llvmorg-4.0.1-rc2 |
|
| #
97206d57 |
| 12-May-2017 |
Zachary Turner <[email protected]> |
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without find and replace, but that h
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious.
llvm-svn: 302872
show more ...
|
|
Revision tags: llvmorg-4.0.1-rc1 |
|
| #
15930862 |
| 21-Mar-2017 |
Pavel Labath <[email protected]> |
Remove ProcFileReader
This removes the last usage of ProcFileReader from NativeProcessLinux and then deletes the class itself.
llvm-svn: 298374
|
| #
7d86ee5a |
| 08-Mar-2017 |
Zachary Turner <[email protected]> |
Resubmit FileSystem changes.
This was originall reverted due to some test failures in ModuleCache and TestCompDirSymlink. These issues have all been resolved and the code now passes all tests.
Dif
Resubmit FileSystem changes.
This was originall reverted due to some test failures in ModuleCache and TestCompDirSymlink. These issues have all been resolved and the code now passes all tests.
Differential Revision: https://reviews.llvm.org/D30698
llvm-svn: 297300
show more ...
|
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4 |
|
| #
30e6cbfc |
| 07-Mar-2017 |
Pavel Labath <[email protected]> |
Revert "Use LLVM for all stat-related functionality."
this reverts r297116 because it breaks the unittests and TestCompDirSymlink. The ModuleCache unit test is trivially fixable, but the CompDirSyml
Revert "Use LLVM for all stat-related functionality."
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
show more ...
|
| #
990e3cd8 |
| 07-Mar-2017 |
Zachary Turner <[email protected]> |
Use LLVM for all stat-related functionality.
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
Use LLVM for all stat-related functionality.
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
show more ...
|
|
Revision tags: llvmorg-4.0.0-rc3 |
|
| #
d5ffbad2 |
| 24-Feb-2017 |
Omair Javaid <[email protected]> |
Hardware breakpoints for Linux on Arm/AArch64 targets
Please look at below differential link for upstream discussion.
Differential revision: https://reviews.llvm.org/D29669
llvm-svn: 296119
|
| #
4a705e7e |
| 24-Feb-2017 |
Pavel Labath <[email protected]> |
Implement QPassSignals GDB package in lldb-server
Summary: QPassSignals package allows lldb client to tell lldb-server to ignore certain types of signals and re-inject them back to inferior without
Implement QPassSignals GDB package in lldb-server
Summary: QPassSignals package allows lldb client to tell lldb-server to ignore certain types of signals and re-inject them back to inferior without stopping execution.
Reviewers: jmajors, labath
Subscribers: danalbert, srhines, emaste, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D30286 Author: Eugene Zemtsov <[email protected]>
llvm-svn: 296101
show more ...
|
| #
28096200 |
| 17-Feb-2017 |
Pavel Labath <[email protected]> |
NPL: Fix an incorrect logging formatv call
llvm-svn: 295457
|
| #
24ae6294 |
| 16-Feb-2017 |
Zachary Turner <[email protected]> |
Finish breaking the dependency from Utility.
Differential Revision: https://reviews.llvm.org/D29964
llvm-svn: 295368
|
|
Revision tags: llvmorg-4.0.0-rc2 |
|
| #
aafe053c |
| 06-Feb-2017 |
Pavel Labath <[email protected]> |
Remove the verbose category in the posix channel
replace by LLDB_LOGV
llvm-svn: 294223
|
| #
4ee1c952 |
| 06-Feb-2017 |
Pavel Labath <[email protected]> |
Fix missing include in NativeProcessLinux
llvm-svn: 294211
|
| #
c5f28e2a |
| 06-Feb-2017 |
Kamil Rytarowski <[email protected]> |
Switch std::call_once to llvm::call_once
Summary: The std::call_once implementation in libstdc++ has problems on few systems: NetBSD, OpenBSD and Linux PPC. LLVM ships with a homegrown implementatio
Switch std::call_once to llvm::call_once
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
show more ...
|