summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
Commit message (Collapse)AuthorAgeFilesLines
* NativeProcessLinux: Remove some register context boilerplatePavel Labath2019-09-021-23/+25
| | | | | | | | | | | | | | | | | | | | | 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
* [LLDB] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-1/+1
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368933
* [Logging] Replace Log::Printf with LLDB_LOG macro (NFC)Jonas Devlieghere2019-07-241-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces explicit calls to log::Printf with the new LLDB_LOGF macro. The macro is similar to LLDB_LOG but supports printf-style format strings, instead of formatv-style format strings. So instead of writing: if (log) log->Printf("%s\n", str); You'd write: LLDB_LOG(log, "%s\n", str); This change was done mechanically with the command below. I replaced the spurious if-checks with vim, since I know how to do multi-line replacements with it. find . -type f -name '*.cpp' -exec \ sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" + Differential revision: https://reviews.llvm.org/D65128 llvm-svn: 366936
* Don't check the validity of newly contructed data buffersPavel Labath2019-07-011-7/+0
| | | | | | | | | | A bunch of places were checking that DataBufferHeap::GetBytes returns a non-null pointer right after constructing it. The only time when GetBytes returns a null pointer is if it is empty (and I'm not sure that even this is a good idea), but that is clearly not the case here, as the buffer was constructed with a non-zero size just a couple of lines back. llvm-svn: 364754
* Remove null checks of results of new expressionsPavel Labath2019-07-011-4/+0
| | | | | | | | operator new doesn't return a null pointer, even if one turns off exceptions (it calls std::terminate instead). Therefore, all of this is dead code. llvm-svn: 364744
* 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
* Move RegisterValue,Scalar,State from Core to UtilityPavel Labath2018-08-071-1/+1
| | | | | | | | | | | | | These three classes have no external dependencies, but they are used from various low-level APIs. Moving them down to Utility improves overall code layering (although it still does not break any particular dependency completely). The XCode project will need to be updated after this change. Differential Revision: https://reviews.llvm.org/D49740 llvm-svn: 339127
* Reflow paragraphs in comments.Adrian Prantl2018-04-301-25/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is intended as a clean up after the big clang-format commit (r280751), which unfortunately resulted in many of the comment paragraphs in LLDB being very hard to read. FYI, the script I used was: import textwrap import commands import os import sys import re tmp = "%s.tmp"%sys.argv[1] out = open(tmp, "w+") with open(sys.argv[1], "r") as f: header = "" text = "" comment = re.compile(r'^( *//) ([^ ].*)$') special = re.compile(r'^((([A-Z]+[: ])|([0-9]+ )).*)|(.*;)$') for line in f: match = comment.match(line) if match and not special.match(match.group(2)): # skip intentionally short comments. if not text and len(match.group(2)) < 40: out.write(line) continue if text: text += " " + match.group(2) else: header = match.group(1) text = match.group(2) continue if text: filled = textwrap.wrap(text, width=(78-len(header)), break_long_words=False) for l in filled: out.write(header+" "+l+'\n') text = "" out.write(line) os.rename(tmp, sys.argv[1]) Differential Revision: https://reviews.llvm.org/D46144 llvm-svn: 331197
* Clean up NativeRegisterContextPavel Labath2017-11-101-12/+10
| | | | | | | | | | | | | | | | | | | | | 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-58/+61
| | | | | | | | | | | | | | | 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
* Move DataBuffer / DataExtractor and friends from Core -> Utility.Zachary Turner2017-03-041-1/+1
| | | | llvm-svn: 296943
* Move Log from Core -> Utility.Zachary Turner2017-03-031-1/+1
| | | | | | | | | All references to Host and Core have been removed, so this class can now safely be lowered into Utility. Differential Revision: https://reviews.llvm.org/D30559 llvm-svn: 296909
* Merge Linux and FreeBSD arm register contextsPavel Labath2017-02-271-2/+2
| | | | | | | | | | | | | | Summary: These two register contexts were identical, so this shouldn't cause any regressions, but I'd appreciate it if you can check that this at least compiles. Reviewers: emaste, sas Subscribers: aemerson, rengolin, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D27126 llvm-svn: 296335
* Hardware breakpoints for Linux on Arm/AArch64 targetsOmair Javaid2017-02-241-66/+125
| | | | | | | | Please look at below differential link for upstream discussion. Differential revision: https://reviews.llvm.org/D29669 llvm-svn: 296119
* Use LLDB_LOG in NativeRegisterContextLinux*** filesPavel Labath2017-02-031-60/+27
| | | | llvm-svn: 294023
* Move classes from Core -> Utility.Zachary Turner2017-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This moves the following classes from Core -> Utility. ConstString Error RegularExpression Stream StreamString The goal here is to get lldbUtility into a state where it has no dependendencies except on itself and LLVM, so it can be the starting point at which to start untangling LLDB's dependencies. These are all low level and very widely used classes, and previously lldbUtility had dependencies up to lldbCore in order to use these classes. So moving then down to lldbUtility makes sense from both the short term and long term perspective in solving this problem. Differential Revision: https://reviews.llvm.org/D29427 llvm-svn: 293941
* Revert unwanted changes in lldb when updating llvm::Error()Mehdi Amini2016-11-111-6/+6
| | | | | | | | My script updated lldb::Errors, and I failed to fix it entirely before pushing. This restore everything in lldb as it was before r286561. llvm-svn: 286565
* Make the Error class constructor protectedMehdi Amini2016-11-111-6/+6
| | | | | | | | | This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
* Fix ARM/AArch64 Step-Over watchpoint issue remove provision for duplicate ↵Omair Javaid2016-10-201-53/+30
| | | | | | | | | | | watchpoints This patch fixes ARM/AArch64 watchpoint bug which was taking inferior out of control while stepping over watchpoints. Also adds a test case that tests above problem. Differential revision: https://reviews.llvm.org/D25057 llvm-svn: 284706
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-898/+747
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Improve watchpoint error reporting specially for arm/aarch64 targetsOmair Javaid2016-06-271-1/+1
| | | | | | Differential revision: http://reviews.llvm.org/D21164 llvm-svn: 273869
* Allow unaligned byte/word selection watchpoints for arm- linux/android targets.Omair Javaid2016-06-271-2/+39
| | | | | | Differential revision: http://reviews.llvm.org/D21516 llvm-svn: 273863
* Make the aarch64 lldb-server capable of debugging arm32 applicationsTamas Berghammer2016-01-111-7/+81
| | | | | | Differential revision: http://reviews.llvm.org/D15533 llvm-svn: 257322
* Fix for undefined behavior while updating PC value on arm-linuxOmair Javaid2016-01-051-1/+18
| | | | | | Differential revision: http://reviews.llvm.org/D15877 llvm-svn: 256847
* Add 64/128 bit arm neon register definitions on linuxTamas Berghammer2015-11-261-0/+51
| | | | | | Differential revision: http://reviews.llvm.org/D14985 llvm-svn: 254152
* Fix for Arm watchpoint cache corruption in case of ptrace failureOmair Javaid2015-10-271-0/+48
| | | | | | Differential revision: http://reviews.llvm.org/D14051 llvm-svn: 251386
* Corrects return values and typos in Arm watchpoint codeOmair Javaid2015-10-251-4/+4
| | | | | | | This is just a trivial patch that corrects a couple of return value account to function's return type. Also corrects typo in hardware breakpoint handler. llvm-svn: 251269
* Fix arm lldb-server on aarch64 deviceTamas Berghammer2015-10-231-0/+45
| | | | | | | | | | * Use PTRACE_GETVFPREGS/PTRACE_SETVFPREGS to access the floating point registers instead of the old PTRACE_GETFPREGS/PTRACE_SETFPREGS. The new call is available since armv5. * Work around a kernel issue in PTRACE_POKEUSER with reading out the full register set, modifying the neccessary value and then writing it back. llvm-svn: 251111
* Fix the handling of FPR offsets in Linux arm/aarch64 register contextsTamas Berghammer2015-09-071-4/+13
| | | | | | Differential revision: http://reviews.llvm.org/D12636 llvm-svn: 246959
* Adds support for hardware watchpoints on Arm targets.Omair Javaid2015-08-251-0/+484
| | | | | | | | | | | | | | http://reviews.llvm.org/D9703 This updated patches correct problems in arm hardware watchpoint support patch posted earlier. This patch has been tested on samsung chromebook (ARM - Linux) and PandaBoard using basic watchpoint test application. Also it was tested on Nexus 7 Android device. On chromebook linux we are able to set and clear all types of watchpoints but on android we end up getting a watchpoint packet error because we are not able to call hardware watchpoint ptrace functions successfully. llvm-svn: 245961
* Move register reading form NativeProcessLinux to NativeRegisterContextLinux*Tamas Berghammer2015-05-261-197/+31
| | | | | | | | | | | | | | | | | 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
* Return the correct user register count for arm from NativeRegisterContextTamas Berghammer2015-05-121-0/+9
| | | | | | | | The defult implementation falls back to GetRegisterCount what includes the debug registers also what shouldn't be displayed to the user. llvm-svn: 237111
* Fix printf warnings about a size mismatch on MacOSX.Greg Clayton2015-04-141-3/+3
| | | | llvm-svn: 234941
* Adds Register Context Linux/POSIX for ARM Architecture Omair Javaid2015-04-141-0/+520
This patch is major step towards supporting lldb on ARM. This adds all the required bits to support register manipulation on Linux Arm. Also adds utility enumerations, definitions and register context classes for arm. llvm-svn: 234870
OpenPOWER on IntegriCloud