summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
* Delete more dead code in ValueObject.Zachary Turner2016-11-181-394/+0
| | | | | | | | Apparently these two enormous functions were dead. Which is good, since one was largely a copy of another function with only a few minor tweaks. llvm-svn: 287308
* Remove some dead code in ValueObject.Zachary Turner2016-11-181-44/+21
| | | | | | | | | Originally I converted this entire function and all dependents to use StringRef, but there were some test failures that were tricky to track down, as this is a complicated function. So I'm starting over, this time in smaller increments. llvm-svn: 287307
* Resubmit "Change RegisterValue getters / setters to use StringRef."Zachary Turner2016-11-173-91/+93
| | | | | | | 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-173-93/+91
| | | | | | | This reverts commit r287279, which breaks some register tests on Linux. llvm-svn: 287281
* Change RegisterValue getters / setters to use StringRef.Zachary Turner2016-11-173-91/+93
| | | | | | | | 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-25/+16
| | | | | | | | | | | | | | | 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 UriParser to use StringRef.Zachary Turner2016-11-171-2/+4
| | | | llvm-svn: 287190
* Convert AutoComplete related code to StringRef.Zachary Turner2016-11-175-107/+117
| | | | | | Differential Revision: https://reviews.llvm.org/D26721 llvm-svn: 287188
* Make Apropos functions accept StringRefs.Zachary Turner2016-11-161-1/+1
| | | | llvm-svn: 287157
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-1616-86/+78
| | | | | | | | | | | | | | | 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 ValueObject creation functions to take StringRefs.Zachary Turner2016-11-131-13/+14
| | | | llvm-svn: 286744
* Change IOHandlerConfirm to use StringRefs.Zachary Turner2016-11-131-1/+1
| | | | llvm-svn: 286743
* Make ValueObjectMemory::Create accept StringRefs.Zachary Turner2016-11-121-4/+6
| | | | llvm-svn: 286726
* Prevent at compile time converting from Error::success() to Expected<T>Mehdi Amini2016-11-111-1/+1
| | | | | | | | 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-111-1/+1
| | | | | | | | | 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/Core. NFC.Pavel Labath2016-11-092-18/+10
| | | | llvm-svn: 286366
* Remove TimeValue usage from Core/ModulePavel Labath2016-11-091-5/+3
| | | | | | | | | | | | | | | | 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
* Clean up the stop printing header lines.Jim Ingham2016-11-082-3/+36
| | | | | | | | | | | | | | | | 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
* Convert some Expression parser functions to StringRef.Zachary Turner2016-11-081-8/+7
| | | | llvm-svn: 286208
* Rewrite OutputFormattedHelpText in terms of StringRef.Zachary Turner2016-11-081-0/+5
| | | | | | | | | | 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
* Simplify the PrintableRepresentationSpecialCases code; we never used the ↵Enrico Granata2016-11-072-7/+5
| | | | | | ePrintableRepresentationSpecialCasesOnly value and with enum classes the names doesn't need to be that long llvm-svn: 286176
* Refactor Timer classPavel Labath2016-11-031-106/+41
| | | | | | | | | | | | | | | | | | | | | | Summary: While removing TimeValue from this class I noticed a lot of room for small simplifications here. Main are: - instead of complicated start-stop dances to compute own time, each Timer just starts the timer once, and keeps track of the durations of child timers. Then the own time can be computed at the end by subtracting the two values. - remove double accounting in TimerStack - the stack object already knows the number of timers. The interface does not lend itself well to unit testing, but I have added a couple of tests which can (and did) catch any obvious errors. Reviewers: tberghammer, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D26243 llvm-svn: 285890
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-0210-20/+20
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Remove TimeValue usage from two filesPavel Labath2016-11-022-18/+20
| | | | llvm-svn: 285801
* Remove TimeValue usage from FileSpec.hPavel Labath2016-11-013-33/+21
| | | | | | | | | | | | | | | | | | | | | 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
* [LLDB][MIPS] Fix qProcessInfo to return correct pointer size based on ELF ABINitesh Jain2016-10-121-1/+38
| | | | | | | | | | Reviewers: clayborg, labath Subscribers: jaydeep, bhushan, slthakur, lldb-commits Differential Revision: https://reviews.llvm.org/D25021 llvm-svn: 284001
* [LLDB][MIPS] Fix register read/write for 32 bit big endian systemNitesh Jain2016-10-101-0/+3
| | | | | | | | | | Reviewers: clayborg, labath Subscribers: jaydeep, bhushan, mohit.bhakkad, slthakur, llvm-commits Differential Revision: https://reviews.llvm.org/D24124 llvm-svn: 283728
* Convert UniqueCStringMap to use StringRef.Zachary Turner2016-10-061-4/+6
| | | | llvm-svn: 283494
* Convert some Args index-based iteration to range-style iteration.Zachary Turner2016-10-051-0/+10
| | | | | | | | | | | | | | 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 CommandObject constructors to StringRef.Zachary Turner2016-10-051-0/+4
| | | | llvm-svn: 283384
* Make lldb -Werror clean on Windows.Zachary Turner2016-10-052-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D25247 llvm-svn: 283344
* Refactor the Args class.Zachary Turner2016-10-032-25/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a number of issues with the Args class preventing efficient use of strings and incoporating LLVM's StringRef class. The two biggest were: 1. Backing memory stored in a std::string, so we would frequently have to use const_cast to get a mutable buffer for passing to various low level APIs. 2. backing std::strings stored in a std::list, which doesn't provide random access. I wanted to solve these two issues so that we could provide StringRef access to the underlying arguments, and also a way to provide range-based access to the underlying argument array while still providing convenient c-style access via an argv style const char**. The solution here is to store arguments in a single "entry" class which contains the backing memory, a StringRef with precomputed length, and the quote char. The backing memory is a manually allocated const char* so that it is not invalidated when the container is resized, and there is a separate argv array provided for c-style access. Differential revision: https://reviews.llvm.org/D25099 llvm-svn: 283157
* [lldb-mi] Fix prompt which can get inserted in the middle of program output ↵Dawn Perchik2016-10-011-1/+3
| | | | | | | | | | | | | | in lldb-mi Summary: The code added in svn r264332 causes "(lldb) " to be printed in the middle of program console output. This fix restores the behavior for non-Windows platforms to before the patch. Reviewers: ted, zturner, clayborg Subscribers: amccarth, lldb-commits Differential Revision: http://reviews.llvm.org/D25137 llvm-svn: 283031
* Change Module::RemapPath to use StringRef.Zachary Turner2016-09-231-1/+2
| | | | llvm-svn: 282277
* Update the prompt related functions to use StringRefs.Zachary Turner2016-09-233-24/+25
| | | | llvm-svn: 282269
* Fix TestBreakpointSerialization on windowsPavel Labath2016-09-221-1/+1
| | | | | | | | | The test exposed a bug in the StructuredData Serialization code, which did not escape the backslash properly. This manifested itself as windows breakpoint serialization roundtrip test not succeeding (as windows paths included backslashes). llvm-svn: 282167
* Fix for loop sign fix in r282112 for column = 0Ed Maste2016-09-211-1/+1
| | | | llvm-svn: 282119
* Fix integer sign warning from r282105Ed Maste2016-09-211-1/+1
| | | | llvm-svn: 282112
* add stop column highlighting supportTodd Fiala2016-09-213-13/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces optional marking of the column within a source line where a thread is stopped. This marking will show up when the source code for a thread stop is displayed, when the debug info knows the column information, and if the optional column marking is enabled. There are two separate methods for handling the marking of the stop column: * via ANSI terminal codes, which are added inline to the source line display. The default ANSI mark-up is to underline the column. * via a pure text-based caret that is added in the appropriate column in a newly-inserted blank line underneath the source line in question. There are some new options that control how this all works. * settings set stop-show-column This takes one of 4 values: * ansi-or-caret: use the ANSI terminal code mechanism if LLDB is running with color enabled; if not, use the caret-based, pure text method (see the "caret" mode below). * ansi: only use the ANSI terminal code mechanism to highlight the stop line. If LLDB is running with color disabled, no stop column marking will occur. * caret: only use the pure text caret method, which introduces a newly-inserted line underneath the current line, where the only character in the new line is a caret that highlights the stop column in question. * none: no stop column marking will be attempted. * settings set stop-show-column-ansi-prefix This is a text format that indicates the ANSI formatting code to insert into the stream immediately preceding the column where the stop column character will be marked up. It defaults to ${ansi.underline}; however, it can contain any valid LLDB format codes, e.g. ${ansi.fg.red}${ansi.bold}${ansi.underline} * settings set stop-show-column-ansi-suffix This is the text format that specifies the ANSI terminal codes to end the markup that was started with the prefix described above. It defaults to: ${ansi.normal}. This should be sufficient for the common cases. Significant leg-work was done by Adrian Prantl. (Thanks, Adrian!) differential review: https://reviews.llvm.org/D20835 reviewers: clayborg, jingham llvm-svn: 282105
* Fix failing regex tests.Zachary Turner2016-09-211-1/+1
| | | | | | | | | | | r282079 converted the regular expression interface to accept and return StringRefs instead of char pointers. In one case a null pointer check was converted to an empty string check, but this was an incorrect conversion because an empty string is a valid regular expression. Removing this check should fix the test failures. llvm-svn: 282090
* Make lldb::Regex use StringRef.Zachary Turner2016-09-215-22/+24
| | | | | | | | | | This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
* Set the correct triple when creating an ArchSpec for Windows.Zachary Turner2016-09-161-0/+3
| | | | | | | Patch by Walter Erquinigo Differential Revision: https://reviews.llvm.org/D24283 llvm-svn: 281765
* First tests for serializing breakpoints.Jim Ingham2016-09-161-33/+32
| | | | | | Plus a few bug fixes I found along the way. llvm-svn: 281690
* Allow ArchSpec to take a StringRef.Zachary Turner2016-09-151-103/+102
| | | | llvm-svn: 281662
* Convert ArchSpec::ParseMachOCPUDashSubtypeTriple to use StringRef.Zachary Turner2016-09-151-37/+34
| | | | | | | | | | | | | This makes the code easier to grok, and since this is a very low level function it also is very helpful to have this take a StringRef since it means anyone higher up the chain who has a StringRef would have to first convert it to a null-terminated string. This way it can work equally well with StringRefs or const char*'s, which will enable the conversion of higher up functions to StringRef. Tested on Windows, Linux, and OSX and saw no regressions. llvm-svn: 281642
* More cleanup in `frame diagnose,` eliminating a bunch of messy cases.Sean Callanan2016-09-141-0/+11
| | | | llvm-svn: 281545
* Add SB API's for writing breakpoints to & creating the from a file.Jim Ingham2016-09-141-2/+2
| | | | | | | | | | | Moved the guts of the code from CommandObjectBreakpoint to Target (should have done it that way in the first place.) Added an SBBreakpointList class so there's a way to specify which breakpoints to serialize and to report the deserialized breakpoints. <rdar://problem/12611863> llvm-svn: 281520
* Cleaned up some of the "frame diagnose" code to use Operands as currency.Sean Callanan2016-09-131-0/+113
| | | | | | | Also added some utility functions around Operands to make code easier and more compact to write. llvm-svn: 281398
* Add some unit tests for ArchSpec.Zachary Turner2016-09-131-2/+2
| | | | | | | | | | | | I'm was trying to do some cleanup and code modernization and in doing so I needed to change ParseMachCPUDashSubtypeTriple to take a StringRef. To ensure I don't break anything, I'm adding some unit tests for this function. As a side benefit, this also expands test coverage of this function to all platforms, since in general this code would rarely be exercised on non Mac platforms, and never in the test suite. llvm-svn: 281387
OpenPOWER on IntegriCloud