summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
Commit message (Collapse)AuthorAgeFilesLines
* Add a missing break statementPavel Labath2017-02-031-0/+1
| | | | llvm-svn: 294036
* Move classes from Core -> Utility.Zachary Turner2017-02-026-9/+9
| | | | | | | | | | | | | | | | | | | | | | | 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
* Break some dependencies in lldbUtility.Zachary Turner2017-02-011-1/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D29359 llvm-svn: 293806
* [CMake] Add accurate dependency specificationsChris Bieneman2017-01-311-0/+15
| | | | | | | | | | | | | | | | | Summary: This patch adds accurate dependency specifications to the mail LLDB libraries and tools. In all cases except lldb-server, these dependencies are added in addition to existing dependencies (making this low risk), and I performed some code cleanup along the way. For lldb-server I've cleaned up the LLVM dependencies down to just the minimum actually required. This is more than lldb-server actually directly references, and I've left a todo in the code to clean that up. Reviewers: labath, zturner Subscribers: lldb-commits, danalbert, srhines, ki.stfu, mgorny, jgosnell Differential Revision: https://reviews.llvm.org/D29333 llvm-svn: 293686
* Provide option to set pc of the file loaded in memory.Hafiz Abid Qadeer2017-01-241-3/+9
| | | | | | | | | | | | | | Summary: This commit adds an option to set PC to the entry point of the file loaded using "target module load" command. In D28804, Greg asked me to separate this part under a different option. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D28944 llvm-svn: 292989
* Provide a substitute to load command of gdb.Hafiz Abid Qadeer2017-01-191-0/+28
| | | | | | | | | | | | | | | For bare-metal targets, lldb was missing a command like 'load' in gdb which can be used to create executable image on the target. This was discussed in http://lists.llvm.org/pipermail/lldb-dev/2016-December/011752.html This commits adds an option to "target module load" command to provide that functionality. It does not set the PC to entry address which will be done separately. Reviewed in https://reviews.llvm.org/D28804 llvm-svn: 292499
* Add a more succinct logging syntaxPavel Labath2017-01-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds the LLDB_LOG macro, which enables one to write more succinct log statements. if (log) log->Printf("log something: %d", var); becomes LLDB_LOG(log, "log something: {0}, var); The macro still internally does the "if(log)" dance, so the arguments are only evaluated if logging is enabled, meaning it has the same overhead as the previous syntax. Additionally, the log statements will be automatically prefixed with the file and function generating the log (if the corresponding new argument to the "log enable" command is enabled), so one does not need to manually specify this in the log statement. It also uses the new llvm formatv syntax, which means we don't have to worry about PRIx64 macros and similar, and we can log complex object (llvm::StringRef, lldb_private::Error, ...) more easily. Differential Revision: https://reviews.llvm.org/D27459 llvm-svn: 292360
* Fix compiler warning.Zachary Turner2016-12-161-1/+0
| | | | llvm-svn: 289994
* Add methods to enable using formatv syntax in LLDB.Zachary Turner2016-12-161-3/+3
| | | | | | | | | | | | | This adds formatv-backed formatting functions in various places in LLDB such as StreamString, logging, constructing error messages, etc. A couple of callsites are changed from Printf style syntax to formatv style syntax to illustrate its usage. Additionally, a FileSpec formatter is introduced so that FileSpecs can be formatted natively. Differential Revision: https://reviews.llvm.org/D27632 llvm-svn: 289922
* Remove some more uses of Args::GetArgumentAtIndex.Zachary Turner2016-12-095-151/+137
| | | | llvm-svn: 289188
* Fix some occurrences of passing StringRef to Printf.Zachary Turner2016-12-093-15/+15
| | | | | | | Hopefully these will all disappear in the future once we move to formatv. llvm-svn: 289168
* Modernize the Args access pattern in a few more commands.Zachary Turner2016-12-093-98/+61
| | | | llvm-svn: 289164
* Convert CommandObjectFrame to entry-based Args access.Zachary Turner2016-12-081-37/+22
| | | | | | | | In the process, discovered a bug related to the use of an uninitialized-pointer, and fixed as suggested by Enrico in an lldb-dev mailing list thread. llvm-svn: 289015
* Convert CommandObjectCommands to entry-based Args access.Zachary Turner2016-12-081-168/+154
| | | | llvm-svn: 289012
* Use Timeout<> in EvaluateExpressionOptions classPavel Labath2016-12-062-3/+3
| | | | llvm-svn: 288797
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-261-1/+1
| | | | | | | | | | | | | This diff fixes typos in file headers (incorrect file names). Test plan: Under llvm/tools/lldb/source: find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done Differential revision: https://reviews.llvm.org/D27115 llvm-svn: 287966
* Remove \x13 (^S) character that was likely added by mistake.Adrian Kuegel2016-11-241-1/+1
| | | | | | | | | r287386 added a \x13 character inside a string literal. Most likely this was by mistake, so remove it. Differential Revision: https://reviews.llvm.org/D26973 llvm-svn: 287862
* Re-add "demonstrate new Args API"Zachary Turner2016-11-224-17/+11
| | | | | | This fixes the build breakage due to the use of C++14. llvm-svn: 287647
* Fix build failure on Linux and BSD by reverting r287597Omair Javaid2016-11-224-11/+17
| | | | | | Linux and BSD builds failing after this changes from rev 287597. llvm-svn: 287631
* Add the new Args / entry-access API.Zachary Turner2016-11-214-17/+11
| | | | | | | | | | | | The long-term goal here is to get rid of the functions GetArgumentAtIndex() and GetQuoteCharAtIndex(), instead replacing them with operator based access and range-based for enumeration. There are a lot of callsites, though, so the changes will be done incrementally, starting with this one. Differential Revision: https://reviews.llvm.org/D26883 llvm-svn: 287597
* Fix "thread step until" handling of multiple line inputs.Jim Ingham2016-11-181-3/+5
| | | | | | Also document that it handles same, and add some tests. llvm-svn: 287386
* Change CreateTarget and dependents to accept StringRef.Zachary Turner2016-11-182-2/+2
| | | | llvm-svn: 287376
* Resubmit "Change RegisterValue getters / setters to use StringRef."Zachary Turner2016-11-171-4/+4
| | | | | | | This resubmits r287279 with a fix for the original issue, which was a trivial typo. llvm-svn: 287282
* Revert "Change RegisterValue getters / setters to use StringRef."Zachary Turner2016-11-171-4/+4
| | | | | | | This reverts commit r287279, which breaks some register tests on Linux. llvm-svn: 287281
* Change RegisterValue getters / setters to use StringRef.Zachary Turner2016-11-171-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
* Convert Platform, Process, and Connection functions to StringRef.Zachary Turner2016-11-171-1/+1
| | | | | | All tests pass on Linux and Windows. llvm-svn: 287259
* Rewrite all Property related functions in terms of StringRef.Zachary Turner2016-11-173-6/+5
| | | | | | | | | | | | | | | This was a bit tricky, especially for things like OptionValueArray and OptionValueDictionary since they do some funky string parsing. Rather than try to re-write line-by-line I tried to make the StringRef usage idiomatic, even though it meant often re-writing from scratch large blocks of code in a different way while keeping true to the original intent. The finished code is a big improvement though, and often much shorter than the original code. All tests and unit tests pass on Windows and Linux. llvm-svn: 287242
* Convert AutoComplete related code to StringRef.Zachary Turner2016-11-171-28/+26
| | | | | | Differential Revision: https://reviews.llvm.org/D26721 llvm-svn: 287188
* Update GenerateAdditionalHelpAvenues to take StringRef.Zachary Turner2016-11-164-19/+24
| | | | llvm-svn: 287155
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-1610-37/+33
| | | | | | | | | | | | | | | This is a large API change that removes the two functions from StreamString that return a std::string& and a const std::string&, and instead provide one function which returns a StringRef. Direct access to the underlying buffer violates the concept of a "stream" which is intended to provide forward only access, and makes porting to llvm::raw_ostream more difficult in the future. Differential Revision: https://reviews.llvm.org/D26698 llvm-svn: 287152
* Remove TimeValue classPavel Labath2016-11-161-1/+19
| | | | | | | | | | | | | | | Summary: All usages have been replaced by appropriate std::chrono funcionality, and the class is now unused. The only used part of the cpp file is the DumpTimePoint function, which I have moved into the only caller (CommandObjectTarget.cpp). Reviewers: clayborg, zturner Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D26451 llvm-svn: 287096
* One more fix for Printf. Apparently I fail at incremental builds.Zachary Turner2016-11-151-2/+2
| | | | llvm-svn: 287016
* Fix some more StringRef printf warnings.Zachary Turner2016-11-152-2/+2
| | | | llvm-svn: 286915
* Fix some StringRef Printf warnings.Zachary Turner2016-11-141-1/+1
| | | | llvm-svn: 286906
* Change some more CommandObject functions to StringRef.Zachary Turner2016-11-131-12/+13
| | | | llvm-svn: 286742
* Make CommandObject help getters/setters use StringRef.Zachary Turner2016-11-123-53/+57
| | | | llvm-svn: 286731
* Make ValueObjectMemory::Create accept StringRefs.Zachary Turner2016-11-121-1/+1
| | | | llvm-svn: 286726
* Make Options::SetOptionValue take a StringRef.Zachary Turner2016-11-1222-383/+283
| | | | llvm-svn: 286723
* Prevent at compile time converting from Error::success() to Expected<T>Mehdi Amini2016-11-112-2/+2
| | | | | | | | This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562
* Make the Error class constructor protectedMehdi Amini2016-11-112-2/+2
| | | | | | | | | 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
* Remove TimeValue usage from lldb/InterpreterPavel Labath2016-11-091-0/+1
| | | | llvm-svn: 286369
* Remove TimeValue usage from Core/ModulePavel Labath2016-11-091-6/+5
| | | | | | | | | | | | | | | | Summary: The only interesting part here is that TimePoint and TimeValue have different natural string representations, which affects "target modules list" output. It is now "2016-07-09 04:02:21.000000000", whereas previously in was "Sat Jul 9 04:02:21 2016". I wanted to check if we're OK with that. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26275 llvm-svn: 286349
* "thread backtrace" should use the thread-stop-format.Jim Ingham2016-11-081-2/+2
| | | | | | <rdar://problem/28273697> llvm-svn: 286312
* Clean up the stop printing header lines.Jim Ingham2016-11-084-6/+11
| | | | | | | | | | | | | | | | I added a "thread-stop-format" to distinguish between the form that is just the thread info (since the stop printing immediately prints the frame info) and one with more frame 0 info - which is useful for "thread list" and the like. I also added a frame.no-debug boolean to the format entities so you can print frame information differently between frames with source info and those without. This closes https://reviews.llvm.org/D26383. <rdar://problem/28273697> llvm-svn: 286288
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-027-22/+21
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Fix an issue where frame variable -s <varname> would not show the scope even ↵Enrico Granata2016-10-261-35/+38
| | | | | | | | though the user asked for it Part of rdar://28434047 llvm-svn: 285226
* Fix a crash in expressions with fixits in the dummy target.Jim Ingham2016-10-171-0/+3
| | | | | | | | | In the expression command, if the target is NULL, you have to use the dummy target. <rdar://problem/28811687> llvm-svn: 284439
* Clarified the explanation of expr --top-level.Sean Callanan2016-10-111-2/+2
| | | | llvm-svn: 283904
* Convert some Args index-based iteration to range-style iteration.Zachary Turner2016-10-0510-207/+187
| | | | | | | | | | | | | | This is better for a number of reasons. Mostly style, but also: 1) Signed-unsigned comparison warnings disappear since there is no loop index. 2) Iterating with the range-for style gives you back an entry that has more than just a const char*, so it's more efficient and more useful. 3) Makes code safter since the type system enforces that it's impossible to index out of bounds. llvm-svn: 283413
* Convert some more aliasing and CI functions to StringRef.Zachary Turner2016-10-051-13/+12
| | | | llvm-svn: 283386
OpenPOWER on IntegriCloud