summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
Commit message (Collapse)AuthorAgeFilesLines
* Move classes from Core -> Utility.Zachary Turner2017-02-0221-24/+24
| | | | | | | | | | | | | | | | | | | | | | | 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-018-8/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D29359 llvm-svn: 293806
* [CMake] Add accurate dependency specificationsChris Bieneman2017-01-311-0/+11
| | | | | | | | | | | | | | | | | 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
* Jim unintentionally had the gdb-format specifiers falling throughJason Molenda2017-01-251-17/+21
| | | | | | | | | after r276132 so that 'x/4b' would print out a series of 4 8-byte quantities. Fix that, add a test case. <rdar://problem/29930833> llvm-svn: 293002
* Make lldb -Werror clean for -Wstring-conversionDavid Blaikie2017-01-061-2/+1
| | | | | | | | | Also found/fixed one bug identified by this warning in RenderScriptx86ABIFixups.cpp where a string literal was being used in an effort to provide a name for an instruction/register, but was instead being passed as the bool 'isVolatile' parameter. llvm-svn: 291198
* Fix a couple of incorrect format string warningsLuke Drummond2016-12-221-3/+2
| | | | | | | | | | | This patch fixes use of incorrect `%zi` to format a plain `int`, and using `%llu` to format a `uint64_t`. The fix is to use the new typesafe `llvm::Formatv` based API. Differential Revision: https://reviews.llvm.org/D28028 Subscribers: lldb-commits llvm-svn: 290359
* Fix incorrectly named variables.Jim Ingham2016-12-151-1/+1
| | | | llvm-svn: 289746
* Adopt PrettyStackTrace in LLDBSean Callanan2016-12-141-7/+3
| | | | | | | | | | LLDB needs some minor changes to adopt PrettyStackTrace after https://reviews.llvm.org/D27683. We remove our own SetCrashDescription() function and use LLVM-provided RAII objects instead. We also make sure LLDB doesn't define __crashtracer_info__ which would collide with LLVM's definition. Differential Revision: https://reviews.llvm.org/D27735 llvm-svn: 289711
* Remove some more uses of Args::GetArgumentAtIndex.Zachary Turner2016-12-091-6/+5
| | | | llvm-svn: 289188
* Calling SBDebugger::CeeateTarget being called on multiple threads was ↵Greg Clayton2016-12-091-9/+8
| | | | | | | | | | | | | | | | crashing LLDB. I found the race condition in: ScriptInterpreter *CommandInterpreter::GetScriptInterpreter(bool can_create); More than one "ScriptInterpreter *" was being returned due to the race which caused any clients with the first one to now be pointing to freed memory and we would quickly crash. Added a test to catch this so we don't regress. <rdar://problem/28356584> llvm-svn: 289169
* Modernize the Args access pattern in a few more commands.Zachary Turner2016-12-091-6/+4
| | | | llvm-svn: 289164
* Use Timeout<> in EvaluateExpressionOptions classPavel Labath2016-12-061-1/+1
| | | | llvm-svn: 288797
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-262-2/+2
| | | | | | | | | | | | | 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
* Re-add "demonstrate new Args API"Zachary Turner2016-11-222-64/+64
| | | | | | 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-222-64/+64
| | | | | | Linux and BSD builds failing after this changes from rev 287597. llvm-svn: 287631
* Add the new Args / entry-access API.Zachary Turner2016-11-212-64/+64
| | | | | | | | | | | | 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 some build errors.Zachary Turner2016-11-181-7/+4
| | | | llvm-svn: 287409
* Convert CommandHistory functions to StringRef.Zachary Turner2016-11-182-40/+45
| | | | llvm-svn: 287401
* Rewrite all Property related functions in terms of StringRef.Zachary Turner2016-11-175-262/+209
| | | | | | | | | | | | | | | 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
* Fix warnings and errors introduced with UUID changes.Zachary Turner2016-11-171-3/+2
| | | | llvm-svn: 287208
* Convert UriParser to use StringRef.Zachary Turner2016-11-171-2/+3
| | | | llvm-svn: 287190
* Convert AutoComplete related code to StringRef.Zachary Turner2016-11-178-42/+29
| | | | | | Differential Revision: https://reviews.llvm.org/D26721 llvm-svn: 287188
* Make Apropos functions accept StringRefs.Zachary Turner2016-11-162-7/+6
| | | | llvm-svn: 287157
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-169-65/+73
| | | | | | | | | | | | | | | 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
* Change Property::GetName() and GetDescription() to return StringRef.Zachary Turner2016-11-152-52/+31
| | | | llvm-svn: 287055
* Fix some more Printf warnings.Zachary Turner2016-11-151-2/+3
| | | | llvm-svn: 286916
* Fix some more StringRef printf warnings.Zachary Turner2016-11-151-1/+1
| | | | llvm-svn: 286915
* Fix some StringRef Printf warnings.Zachary Turner2016-11-142-2/+2
| | | | llvm-svn: 286906
* Make OptionParser::Parse() take StringRef.Zachary Turner2016-11-131-6/+6
| | | | llvm-svn: 286747
* Change IOHandlerConfirm to use StringRefs.Zachary Turner2016-11-131-1/+1
| | | | llvm-svn: 286743
* Change some more CommandObject functions to StringRef.Zachary Turner2016-11-131-4/+4
| | | | llvm-svn: 286742
* Change ArgumentHelpCallbackFunction to return a StringRef.Zachary Turner2016-11-131-31/+22
| | | | llvm-svn: 286740
* Make CommandObject help getters/setters use StringRef.Zachary Turner2016-11-123-51/+45
| | | | llvm-svn: 286731
* Make CommandReturnObject methods accept StringRefs.Zachary Turner2016-11-121-20/+23
| | | | llvm-svn: 286728
* Make Options::SetOptionValue take a StringRef.Zachary Turner2016-11-121-3/+3
| | | | llvm-svn: 286723
* Prevent at compile time converting from Error::success() to Expected<T>Mehdi Amini2016-11-112-4/+4
| | | | | | | | 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-4/+4
| | | | | | | | | 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-3/+2
| | | | llvm-svn: 286369
* Fix some cases where we were printf'ing StringRefs.Zachary Turner2016-11-081-3/+3
| | | | llvm-svn: 286303
* Convert some Expression parser functions to StringRef.Zachary Turner2016-11-081-86/+94
| | | | llvm-svn: 286208
* Rewrite OutputFormattedHelpText in terms of StringRef.Zachary Turner2016-11-081-60/+49
| | | | | | | | | | This makes the logic easier to follow and also propagates StringRef up to the API boundary, which is necessary for making higher up StringRef API changes. Differential Revision: https://reviews.llvm.org/D26325 llvm-svn: 286204
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-026-10/+10
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Remove TimeValue usage from FileSpec.hPavel Labath2016-11-011-5/+3
| | | | | | | | | | | | | | | | | | | | | Summary: The only usage there was in GetModificationTime(). I also took the opportunity to move this function from FileSpec to the FileSystem class - since we are using FileSpecs to also represent remote files for which we cannot (easily) retrieve modification time, it makes sense to make the decision to get the modification time more explicit. The new function returns a llvm::sys::TimePoint<>. To aid the transition from TimeValue, I have added a constructor to it which enables implicit conversion from a time_point. Reviewers: zturner, clayborg Subscribers: mehdi_amini, tberghammer, danalbert, beanz, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25392 llvm-svn: 285702
* Interpreter: Don't return StringRef from functions whose return value is ↵Justin Bogner2016-10-171-14/+10
| | | | | | | | | | never used StringRef is passed through all of these APIs but never actually used. Just remove it from the API for now and if people want to use it they can add it back. llvm-svn: 284362
* Remove unused variable.Zachary Turner2016-10-071-1/+0
| | | | llvm-svn: 283603
* Convert UniqueCStringMap to use StringRef.Zachary Turner2016-10-062-12/+14
| | | | llvm-svn: 283494
* StringRef::front asserts on empty strings, causing "break modify -c ''" to ↵Jim Ingham2016-10-061-1/+1
| | | | | | | | | | assert. Added a check for empty at the point where we were going to crash. <rdar://problem/28654032> llvm-svn: 283479
* Match printf field width arg and typeEd Maste2016-10-061-1/+1
| | | | | | | A '*' as a field width or precision specifies that the field width or precision is supplied by an int argument. llvm-svn: 283472
* Convert some Args index-based iteration to range-style iteration.Zachary Turner2016-10-053-13/+12
| | | | | | | | | | | | | | 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/+6
| | | | llvm-svn: 283386
OpenPOWER on IntegriCloud