aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectRegister.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-01-14[lldb][NFC] Make the target's SectionLoadList private. (#113278)Greg Clayton1-2/+2
Lots of code around LLDB was directly accessing the target's section load list. This NFC patch makes the section load list private so the Target class can access it, but everyone else now uses accessor functions. This allows us to control the resolving of addresses and will allow for functionality in LLDB which can lazily resolve addresses in JIT plug-ins with a future patch.
2024-02-27Start to clean up the process of defining command arguments. (#83097)jimingham1-20/+2
Partly, there's just a lot of unnecessary boiler plate. It's also possible to define combinations of arguments that make no sense (e.g. eArgRepeatPlus followed by eArgRepeatPlain...) but these are never checked since we just push_back directly into the argument definitions. This commit is step 1 of this cleanup - do the obvious stuff. In it, all the simple homogenous argument lists and the breakpoint/watchpoint ID/Range types, are set with common functions. This is an NFC change, it just centralizes boiler plate. There's no checking yet because you can't get a single argument wrong. The end goal is that all argument definition goes through functions and m_arguments is hidden so that you can't define inconsistent argument sets.
2024-02-20Add the RegisterCompleter to eArgTypeRegisterName in g_argument_table (#82428)jimingham1-5/+2
This is a follow-on to: https://github.com/llvm/llvm-project/pull/82085 The completer for register names was missing from the argument table. I somehow missed that the only register completer test was x86_64, so that test broke. I added the completer in to the right slot in the argument table, and added a small completions test that just uses the alias register names. If we end up having a platform that doesn't define register names, we'll have to skip this test there, but it should add a sniff test for register completion that will run most everywhere.
2024-02-19Revert "Centralize the handling of completion for simple argument lists. ↵Shubham Sandeep Rastogi1-2/+5
(#82085)" This reverts commit 21631494b068d9364b8dc8f18e59adee9131a0a5. Reverted because of greendragon failure: ******************** TEST 'lldb-api :: functionalities/completion/TestCompletion.py' FAILED ******************** Script:
2024-02-19Centralize the handling of completion for simple argument lists. (#82085)jimingham1-5/+2
Most commands were adding argument completion handling by themselves, resulting in a lot of unnecessary boilerplate. In many cases, this could be done generically given the argument definition and the entries in the g_argument_table. I'm going to address this in a couple passes. In this first pass, I added handling of commands that have only one argument list, with one argument type, either single or repeated, and changed all the commands that are of this sort (and don't have other bits of business in their completers.) I also added some missing connections between arg types and completions to the table, and added a RemoteFilename and RemotePath to use in places where we were using the Remote completers. Those arguments used to say they were "files" but they were in fact remote files. I also added a module arg type to use where we were using the module completer. In that case, we should call the argument module.
2023-10-30[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` return `void` ↵Pete Lawrence1-9/+5
(not `bool`) (#69991) [lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` to return `void` instead of ~~`bool`~~ Justifications: - The code doesn't ultimately apply the `true`/`false` return values. - The methods already pass around a `CommandReturnObject`, typically with a `result` parameter. - Each command return object already contains: - A more precise status - The error code(s) that apply to that status Part 1 refactors the `CommandObject::Execute(...)` method. - See [https://github.com/llvm/llvm-project/pull/69989](https://github.com/llvm/llvm-project/pull/69989) rdar://117378957
2023-09-22[lldb] Require paused process and frame for "register info" command (#67124)David Spickett1-2/+3
Prior to this the command would simply crash when run on a running process. Of the three register commands, "info" was the only one missing these requirements. On some level it makes sense because you're not going to read a value or modify anything, but practically I think lldb assumes any time you're going to access register related stuff, the process should be paused. I noticed this debugging with a remote gdb stub, so I've recreated that scenario using attach in a new test case.
2023-06-21[lldb] Add register field tables to the "register info" commandDavid Spickett1-1/+6
This teaches DumpRegisterInfo to generate a table from the register flags type. It just calls a method on RegisterFlags. As such, the extra tests are minimal and only show that the intergration works. Exhaustive formatting tests are done with RegisterFlags itself. Example: ``` (lldb) register info cpsr Name: cpsr Size: 4 bytes (32 bits) In sets: general (index 0) | 31 | 30 | 29 | 28 | 27-26 | 25 | 24 | 23 | 22 | 21 | 20 | 19-13 | 12 | 11-10 | 9 | 8 | 7 | 6 | 5 | 4 | 3-2 | 1 | 0 | |----|----|----|----|-------|-----|-----|-----|-----|----|----|-------|------|-------|---|---|---|---|---|-----|-----|---|----| | N | Z | C | V | | TCO | DIT | UAO | PAN | SS | IL | | SSBS | | D | A | I | F | | nRW | EL | | SP | ``` LLDB limits the max terminal width to 80 chars by default. So to get that full width output you will need to change the "term-width" setting to something higher. Reviewed By: jasonmolenda Differential Revision: https://reviews.llvm.org/D152918
2023-06-21[lldb] Add "register info" commandDavid Spickett1-1/+68
This adds a new command that will show all the information lldb knows about a register. ``` (lldb) register info s0 Name: s0 Size: 4 bytes (32 bits) Invalidates: v0, d0 Read from: v0 In sets: Floating Point Registers (index 1) ``` Currently it only allows a single register, and we get the information from the RegisterInfo structure. For those of us who know the architecture well, this information is all pretty obvious. For those who don't, it's nice to have it at a glance without leaving the debugger. I hope to have more in depth information to show here in the future, which will be of wider use. Reviewed By: jasonmolenda Differential Revision: https://reviews.llvm.org/D152916
2023-06-06[lldb/Commands] Add support to auto-completion for user commandsMed Ismail Bennani1-6/+4
This patch should allow the user to set specific auto-completion type for their custom commands. To do so, we had to hoist the `CompletionType` enum so the user can access it and add a new completion type flag to the CommandScriptAdd Command Object. So now, the user can specify which completion type will be used with their custom command, when they register it. This also makes the `crashlog` custom commands use disk-file completion type, to browse through the user file system and load the report. Differential Revision: https://reviews.llvm.org/D152011 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-05-14[lldb] Complete OptionValue cleanup (NFC)Jonas Devlieghere1-2/+3
Make the `Get.*Value` and `Set.*Value` function private and migrate the last remaining call sites to the new overloaded/templated functions.
2023-05-01[lldb] Refactor OptionValue to return a std::optional (NFC)Jonas Devlieghere1-2/+2
Refactor OptionValue to return a std::optional instead of taking a fail value. This allows the caller to handle situations where there's no value, instead of being unable to distinguish between the absence of a value and the value happening the match the fail value. When a fail value is required, std::optional::value_or() provides the same functionality.
2023-04-21[LLDB] Don't print register fields when asked for a specific formatDavid Spickett1-2/+9
Previously if a register had fields we would always print them after the value if the register was asked for by name. ``` (lldb) register read MDCR_EL3 MDCR_EL3 = 0x00000000 = { ETBAD = 0 <...> RLTE = 0 } ``` This can be quite annoying if there are a whole lot of fields but you want to see the register in a specific format. ``` (lldb) register read MDCR_EL3 -f i MDCR_EL3 = 0x00000000 unknown udf #0x0 = { ETBAD = 0 <...lots of fields...> ``` Since it pushes the interesting bit far up the terminal. To solve this, don't print fields if the user passes --format. If they're doing that then I think it's reasonable to assume they know what they want and only want to see that output. This also gives users a way to silence fields, but not change the format. By doing `register read foo -f x`. In case they are not useful or perhaps they are trying to work around a crash. I have customised the help text for --format for register read to explain this: ``` -f <format> ( --format <format> ) Specify a format to be used for display. If this is set, register fields will not be dispayed. ``` Reviewed By: jasonmolenda Differential Revision: https://reviews.llvm.org/D148790
2023-04-17[lldb] Change some pointers to refs in register printing codeDavid Spickett1-38/+32
No one was passing nullptr for these. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D148228
2023-04-13[lldb] Show register fields using bitfield struct typesDavid Spickett1-4/+8
This change uses the information from target.xml sent by the GDB stub to produce C types that we can use to print register fields. lldb-server *does not* produce this information yet. This will only work with GDB stubs that do. gdbserver or qemu are 2 I know of. Testing is added that uses a mocked lldb-server. ``` (lldb) register read cpsr x0 fpcr fpsr x1 cpsr = 0x60001000 = (N = 0, Z = 1, C = 1, V = 0, TCO = 0, DIT = 0, UAO = 0, PAN = 0, SS = 0, IL = 0, SSBS = 1, BTYPE = 0, D = 0, A = 0, I = 0, F = 0, nRW = 0, EL = 0, SP = 0) ``` Only "register read" will display fields, and only when we are not printing a register block. For example, cpsr is a 32 bit register. Using the target's scratch type system we construct a type: ``` struct __attribute__((__packed__)) cpsr { uint32_t N : 1; uint32_t Z : 1; ... uint32_t EL : 2; uint32_t SP : 1; }; ``` If this register had unallocated bits in it, those would have been filled in by RegisterFlags as anonymous fields. A new option "SetChildPrintingDecider" is added so we can disable printing those. Important things about this type: * It is packed so that sizeof(struct cpsr) == sizeof(the real register). (this will hold for all flags types we create) * Each field has the same storage type, which is the same as the type of the raw register value. This prevents fields being spilt over into more storage units, as is allowed by most ABIs. * Each bitfield size matches that of its register field. * The most significant field is first. The last point is required because the most significant bit (MSB) being on the left/top of a print out matches what you'd expect to see in an architecture manual. In addition, having lldb print a different field order on big/little endian hosts is not acceptable. As a consequence, if the target is little endian we have to reverse the order of the fields in the value. The value of each field remains the same. For example 0b01 doesn't become 0b10, it just shifts up or down. This is needed because clang's type system assumes that for a struct like the one above, the least significant bit (LSB) will be first for a little endian target. We need the MSB to be first. Finally, if lldb's host is a different endian to the target we have to byte swap the host endian value to match the endian of the target's typesystem. | Host Endian | Target Endian | Field Order Swap | Byte Order Swap | |-------------|---------------|------------------|-----------------| | Little | Little | Yes | No | | Big | Little | Yes | Yes | | Little | Big | No | Yes | | Big | Big | No | No | Testing was done as follows: * Little -> Little * LE AArch64 native debug. * Big -> Little * s390x lldb running under QEMU, connected to LE AArch64 target. * Little -> Big * LE AArch64 lldb connected to QEMU's GDB stub, which is running an s390x program. * Big -> Big * s390x lldb running under QEMU, connected to another QEMU's GDB stub, which is running an s390x program. As we are not allowed to link core code to plugins directly, I have added a new plugin RegisterTypeBuilder. There is one implementation of this, RegisterTypeBuilderClang, which uses TypeSystemClang to build the CompilerType from the register fields. Reviewed By: jasonmolenda Differential Revision: https://reviews.llvm.org/D145580
2023-01-10Move from llvm::makeArrayRef to ArrayRef deduction guides - last partserge-sans-paille1-1/+1
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files. Differential Revision: https://reviews.llvm.org/D141298
2022-07-27[lldb] Always use APFloat for FP dumpingPavel Labath1-1/+2
The DumpDataExtractor function had two branches for printing floating point values. One branch (APFloat) was used if we had a Target object around and could query it for the appropriate semantics. If we didn't have a Target, we used host operations to read and format the value. This patch changes second path to use APFloat as well. To make it work, I pick reasonable defaults for different byte size. Notably, I did not include x87 long double in that list (as it is ambibuous and architecture-specific). This exposed a bug where we were printing register values using the target-less branch, even though the registers definitely belong to a target, and we had it available. Fixing this prompted the update of several tests for register values due to slightly different floating point outputs. The most dubious aspect of this patch is the change in TypeSystemClang::GetFloatTypeSemantics to recognize `10` as a valid size for x87 long double. This was necessary because because sizeof(long double) on x86_64 is 16 even though it only holds 10 bytes of useful data. This generalizes the hackaround present in the target-free branch of the dumping function. Differential Revision: https://reviews.llvm.org/D129750
2022-07-14[lldb] Refactor command option enum values (NFC)Jonas Devlieghere1-0/+1
Refactor the command option enum values and the command argument table to connect the two. This has two benefits: - We guarantee that two options that use the same argument type have the same accepted values. - We can print the enum values and their description in the help output. (D129707) Differential revision: https://reviews.llvm.org/D129703
2022-01-23[Commands] Remove redundant member initialization (NFC)Kazu Hirata1-4/+2
Identified with readability-redundant-member-init.
2021-06-17[lldb] Remove redundant calls to set eReturnStatusFailedDavid Spickett1-7/+0
This is part 2, covering the commands source. Some uses remain where it's tricky to see what the logic is or they are not used with AppendError. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D104448
2020-05-07tab completion for register read/writeGongyu Deng1-0/+22
Summary: 1. Created a new common completion for the registers of the current context; 2. Apply this new common completion to the commands register read/write; 3. Unit test. Reviewers: teemperor, JDevlieghere Reviewed By: teemperor Tags: #lldb Differential Revision: https://reviews.llvm.org/D79490
2020-01-24[lldb][NFC] Fix all formatting errors in .cpp file headersRaphael Isemann1-1/+1
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp -------------------------------------------------===// ``` However in LLDB most of our source files have arbitrary changes to this format and these changes are spreading through LLDB as folks usually just use the existing source files as templates for their new files (most notably the unnecessary editor language indicator `-*- C++ -*-` is spreading and in every review someone is pointing out that this is wrong, resulting in people pointing out that this is done in the same way in other files). This patch removes most of these inconsistencies including the editor language indicators, all the different missing/additional '-' characters, files that center the file name, missing trailing `===//` (mostly caused by clang-format breaking the line). Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere Reviewed By: JDevlieghere Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73258
2019-12-16[lldb][NFC] Remove unnecessary includes in source/CommandsRaphael Isemann1-2/+0
Summary: This removes most of unnecessary includes in the `source/Commands` directory. This was generated by IWYU and a script that fixed all the bogus reports from IWYU. Patch is tested on Linux and macOS. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71489
2019-09-13[lldb][NFC] Remove ArgEntry::ref memberRaphael Isemann1-3/+3
The StringRef should always be identical to the C string, so we might as well just create the StringRef from the C-string. This might be slightly slower until we implement the storage of ArgEntry with a string instead of a std::unique_ptr<char[]>. Until then we have to do the additional strlen on the C string to construct the StringRef. llvm-svn: 371842
2019-08-22[lldb][NFC] Remove dead code that is supposed to handle invalid command optionsRaphael Isemann1-3/+1
Summary: We currently have a bunch of code that is supposed to handle invalid command options, but all this code is unreachable because invalid options are already handled in `Options::Parse`. The only way we can reach this code is when we declare but then not implement an option (which will be made impossible with D65386, which is also when we can completely remove the `default` cases). This patch replaces all this code with `llvm_unreachable` to make clear this is dead code that can't be reached. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66522 llvm-svn: 369625
2019-07-28[lldb] Also include the array definition in CommandOptions.incRaphael Isemann1-3/+0
Summary: Right now our CommandOptions.inc only generates the initializer for the options list but not the array declaration boilerplate around it. As the array definition is identical for all arrays, we might as well also let the CommandOptions.inc generate it alongside the initializers. This patch will also allow us to generate additional declarations related to that option list in the future (e.g. a enum class representing the specific options which would make our handling code less prone). This patch also fixes a few option tables that didn't follow our naming style. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65331 llvm-svn: 367186
2019-07-25[lldb] Tablegenify expr/frame/log/register/memoryRaphael Isemann1-5/+2
llvm-svn: 367009
2019-04-10[NFC] Remove ASCII lines from commentsJonas Devlieghere1-6/+0
A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-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
2018-09-26Replace "nullptr-terminated" C-arrays of OptionValueEnumeration with safer ↵Tatyana Krasnukha1-4/+4
llvm::ArrayRef Differential Revision: https://reviews.llvm.org/D49017 llvm-svn: 343130
2018-08-07Move RegisterValue,Scalar,State from Core to UtilityPavel Labath1-2/+2
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
2018-07-24Move dumping code out of RegisterValue classPavel Labath1-2/+3
Summary: The dump function was the only part of this class which depended on high-level functionality. This was due to the DumpDataExtractor function, which uses info from a running target to control dump format (although, RegisterValue doesn't really use the high-level part of DumpDataExtractor). This patch follows the same approach done for the DataExtractor class, and extracts the dumping code into a separate function/file. This file can stay in the higher level code, while the RegisterValue class and anything that does not depend in dumping can stay go to lower layers. The XCode project will need to be updated after this patch. Reviewers: zturner, jingham, clayborg Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D48351 llvm-svn: 337832
2018-04-30Reflow paragraphs in comments.Adrian Prantl1-11/+11
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
2018-04-17Move Args.cpp from Interpreter to UtilityPavel Labath1-1/+1
Summary: The Args class is used in plenty of places besides the command interpreter (e.g., anything requiring an argc+argv combo, such as when launching a process), so it needs to be in a lower layer. Now that the class has no external dependencies, it can be moved down to the Utility module. This removes the last (direct) dependency from the Host module to Interpreter, so I remove the Interpreter module from Host's dependency list. Reviewers: zturner, jingham, davide Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D45480 llvm-svn: 330200
2017-06-06replace uses of strerror with llvm::sys::StrErrorPavel Labath1-8/+3
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
2017-05-12Rename Error -> Status.Zachary Turner1-4/+4
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
2017-03-22Delete some more dead includes.Zachary Turner1-0/+1
This breaks the cycle between Target and PluginLanguageC++, reducing the overall cycle count from 43 to 42. llvm-svn: 298561
2017-03-04Move DataBuffer / DataExtractor and friends from Core -> Utility.Zachary Turner1-1/+1
llvm-svn: 296943
2016-12-09Remove some more uses of Args::GetArgumentAtIndex.Zachary Turner1-28/+22
llvm-svn: 289188
2016-11-17Resubmit "Change RegisterValue getters / setters to use StringRef."Zachary Turner1-4/+4
This resubmits r287279 with a fix for the original issue, which was a trivial typo. llvm-svn: 287282
2016-11-17Revert "Change RegisterValue getters / setters to use StringRef."Zachary Turner1-4/+4
This reverts commit r287279, which breaks some register tests on Linux. llvm-svn: 287281
2016-11-17Change RegisterValue getters / setters to use StringRef.Zachary Turner1-4/+4
In the process, found some functions that were duplicates of existing StringRef member functions. So deleted those functions and used the StringRef functions instead. llvm-svn: 287279
2016-11-12Make Options::SetOptionValue take a StringRef.Zachary Turner1-1/+0
llvm-svn: 286723
2016-09-23Update OptionGroup::SetValue to take StringRef.Zachary Turner1-1/+2
Then deal with all the fallout. Differential Revision: https://reviews.llvm.org/D24847 llvm-svn: 282265
2016-09-22Try to fix build errors on Android.Zachary Turner1-1/+1
It doesn't like the implicit conversion from T[] to ArrayRef<T> so I'm using `llvm::makeArrayRef()`. Hopefully I got everything. llvm-svn: 282195
2016-09-22Convert option tables to ArrayRefs.Zachary Turner1-21/+13
This change is very mechanical. All it does is change the signature of `Options::GetDefinitions()` and `OptionGroup:: GetDefinitions()` to return an `ArrayRef<OptionDefinition>` instead of a `const OptionDefinition *`. In the case of the former, it deletes the sentinel entry from every table, and in the case of the latter, it removes the `GetNumDefinitions()` method from the interface. These are no longer necessary as `ArrayRef` carries its own length. In the former case, iteration was done by using a sentinel entry, so there was no knowledge of length. Because of this the individual option tables were allowed to be defined below the corresponding class (after all, only a pointer was needed). Now, however, the length must be known at compile time to construct the `ArrayRef`, and as a result it is necessary to move every option table before its corresponding class. This results in this CL looking very big, but in terms of substance there is not much here. Differential revision: https://reviews.llvm.org/D24834 llvm-svn: 282188
2016-09-06*** This commit represents a complete reformatting of the LLDB source codeKate Stone1-398/+345
*** 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
2016-08-26Tables of command options in LLDB benefit from hand-formatting to make itKate Stone1-3/+5
easier to scan a set of options with a relatively large number of positional arguments. This commit standardizes their formatting throughout LLDB and applies surrounding directives to exempt them from being formatted by clang-format. These kinds of exemptions should be rare cases that benefit significantly from alternative formatting. They also imply a long-term obligation to maintain their format since the automated tools will not do so. llvm-svn: 279882
2016-08-11Decoupled Options from CommandInterpreter.Todd Fiala1-5/+5
Options used to store a reference to the CommandInterpreter instance in the base Options class. This made it impossible to parse options independent of a CommandInterpreter. This change removes the reference from the base class. Instead, it modifies the options-parsing-related methods to take an ExecutionContext pointer, which the options may inspect if they need to do so. Closes https://reviews.llvm.org/D23416 Reviewers: clayborg, jingham llvm-svn: 278440
2016-07-14LLDB help content has accumulated over time without a recent attempt toKate Stone1-5/+4
review it for consistency, accuracy, and clarity. These changes attempt to address all of the above while keeping the text relatively terse. <rdar://problem/24868841> llvm-svn: 275485