summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup and speedup NativeRegisterContextLinux_arm64Muhammad Omair Javaid2019-12-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch simplifies register accesses in NativeRegisterContextLinux_arm64 and also adds some bare minimum caching to avoid multiple calls to ptrace during a stop. Linux ptrace returns data in the form of structures containing GPR/FPR data. This means that one single call is enough to read all GPRs or FPRs. We do that once per stop and keep reading from or writing to the buffer that we have in NativeRegisterContextLinux_arm64 class. Before a resume or detach we write all buffers back. This is tested on aarch64 thunder x1 with Ubuntu 18.04. Also tested regressions on x86_64. Reviewers: labath, clayborg Reviewed By: labath Subscribers: kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D69371
* [lldb] Fix offset intersection bug between MPX and AVX registersGuilherme Andrade2019-10-311-0/+4
| | | | | | | | | | | | | | | | | Summary: This change increases the offset of MPX registers (by 128) so they do not overlap with the offset associated with AVX registers. That was causing MPX data in GDBRemoteRegisterContext::m_reg_data to get overwritten. Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68874
* NativeProcessLinux: Remove some register context boilerplatePavel Labath2019-09-021-11/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This patch follows the spirit of D63594, and removes some null checks for things which should be operating invariants. Specifically {Read,Write}[GF]PR now no longer check whether the supplied buffers are null, because they never are. After this, the Do*** versions of these function no longer serve any purpose and are inlined into their callers. Other cleanups are possible here too, but I am taking this one step at a time because this involves a lot of architecture-specific code, which I don't have the hardware to test on (I did do a build-test though). Reviewers: mgorny, jankratochvil, omjavaid, alexandreyy, uweigand Subscribers: nemanjai, javed.absar, kbarton, lldb-commits Differential Revision: https://reviews.llvm.org/D66744 llvm-svn: 370653
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Clean up NativeRegisterContextPavel Labath2017-11-101-13/+6
| | | | | | | | | | | | | | | | | | | | | 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
* Rename Error -> Status.Zachary Turner2017-05-121-19/+19
| | | | | | | | | | | | | | | 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
* Break the cycle between Host and PluginProcessUtility.Zachary Turner2017-03-221-1/+1
| | | | | | | | | | | There are only two users of NativeRegisterContextRegisterInfo, and both are in process plugins. Moving this code from Host to Plugins/Process/Utility thus makes sense, and as it is the only dependency from Host -> PluginProcessUtility, it also breaks this cycle, reducing LLDB's overall cycle count from 45 to 44. llvm-svn: 298466
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-60/+45
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Fix warnings found by -Wextra-semiPavel Labath2015-07-221-2/+1
| | | | | | patch by Eugene Zelenko. llvm-svn: 242875
* [NativeProcessLinux] Use lambdas in DoOperation callsPavel Labath2015-06-261-17/+20
| | | | | | | | | | | | | | | | | | | Summary: This removes a lot of boilerplate, which was needed to execute monitor operations. Previously one needed do declare a separate class for each operation which would manually capture all needed arguments, which was very verbose. In addition to less code, I believe this also makes the code more readable, since now the implementation of the operation can be physically closer to the code that invokes it. Test Plan: Code compiles on x86, arm and mips, tests pass on x86 linux. Reviewers: tberghammer, chaoren Subscribers: aemerson, lldb-commits Differential Revision: http://reviews.llvm.org/D10694 llvm-svn: 240772
* Move register reading form NativeProcessLinux to NativeRegisterContextLinux*Tamas Berghammer2015-05-261-0/+105
This change reorganize the register read/write code inside lldb-server on Linux with moving the architecture independent code into a new class called NativeRegisterContextLinux and all of the architecture dependent code into the appropriate NativeRegisterContextLinux_* class. As part of it the compilation of the architecture specific register contexts are only compiled on the specific architecture because they can't be used in other cases. The purpose of this change is to remove a lot of duplicated code from the different register contexts and to remove the architecture dependent codes from the global NativeProcessLinux class. Differential revision: http://reviews.llvm.org/D9935 llvm-svn: 238196
OpenPOWER on IntegriCloud