summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove LIBLLDB_LOG_VERBOSE categoryPavel Labath2017-02-052-24/+7
| | | | | | | | | | | | | | | | | | | | | Summary: Per discussion in D28616, having two ways two request logging (log enable lldb XXX verbose && log enable -v lldb XXX) is confusing. This removes the first option and standardizes all code to use the second one. I've added a LLDB_LOGV macro as a shorthand for if(log && log->GetVerbose()) and switched most of the affected log statements to use that (I've only left a couple of cases that were doing complex computations in an if(log) block). Reviewers: jingham, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29510 llvm-svn: 294113
* Move classes from Core -> Utility.Zachary Turner2017-02-0242-1615/+53
| | | | | | | | | | | | | | | | | | | | | | | 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/+94
| | | | | | Differential Revision: https://reviews.llvm.org/D29359 llvm-svn: 293806
* [CMake] Add accurate dependency specificationsChris Bieneman2017-01-311-0/+19
| | | | | | | | | | | | | | | | | 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
* One of the changes Jim made in r286288 (cleaning up the stop printJason Molenda2017-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | header line, backtrace output) was to remove the current pc value from frames where we have source level information. We've been discussing this for the past week and based on input from a group of low level users, I believe this is the wrong default behavior for the command line lldb tool. lldb's backtrace will include the pc value for all stack frames regardless of whether they have source level debug information or not. A related part of r286288 removes the byte offset printing for functions with source level information (e.g. "main + 22 sourcefile.c:10" is printed as "main sourcefile.c:10"). I don't see a compelling case for changing this part of 286288 so I'm leaving that as-is (in addition to the rest of 286288 which is clearly better than the previous output style). <rdar://problem/30083904> llvm-svn: 293366
* Provide option to set pc of the file loaded in memory.Hafiz Abid Qadeer2017-01-241-2/+2
| | | | | | | | | | | | | | 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
* Add format_provider for lldb::StateTypePavel Labath2017-01-241-4/+1
| | | | | | | | | | Reviewers: clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D29036 llvm-svn: 292920
* Provide a substitute to load command of gdb.Hafiz Abid Qadeer2017-01-191-0/+4
| | | | | | | | | | | | | | | 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-49/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove a couple of Stream flagsPavel Labath2017-01-133-92/+29
| | | | | | | | | | | | | | | | | | | | | | | | Summary: I came across this while trying to understand what Log::Debug does. It turns out it does not do anything, as there is no instance of someone setting a debug flag on a stream. The same is true for the Verbose and AddPrefix flags. Removing these will enable some cleanups in the Logging class, and it brings us closer towards the long term goal of standardizing on llvm stream classes. I have removed these flags and all code the code which tested for their presence -- there wasn't much of it, mostly in SymbolFileDWARF, which is probably going away at some point anyway. The eBinary flag still has some users, so I am letting it life for the time being. Reviewers: clayborg, zturner Subscribers: aprantl, beanz, lldb-commits Differential Revision: https://reviews.llvm.org/D28616 llvm-svn: 291895
* Improve Type::GetTypeScopeAndBasenameHelper and add unit testsTamas Berghammer2017-01-101-8/+4
| | | | | | | | | | Previously it failed to handle nested types inside templated classes making it impossible to look up these types using the fully qualified name. Differential revision: https://reviews.llvm.org/D28466 llvm-svn: 291559
* Make lldb -Werror clean for -Wstring-conversionDavid Blaikie2017-01-062-4/+2
| | | | | | | | | 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 the variable view in the "gui" curses mode so that variables whose ↵Greg Clayton2016-12-282-22/+137
| | | | | | children change will update correctly. Previously the variable view would update the children once and not change. If you were stepping through code where the dynamic type of a variable would change the value and its children, or a synthetic type (like say for a std::vector<int>), the variable view wouldn't update. Now it caches the children and uses the process stop ID to tell when the children need to be updated. llvm-svn: 290688
* Expression evaluation for overloaded C functions (redux)Luke Drummond2016-12-191-4/+34
| | | | | | | | | | | | | | | | | | | This is a redux of [Ewan's patch](https://reviews.llvm.org/D17957) , refactored to properly substitute primitive types using a hook in the itanium demangler, and updated after the previous patch went stale The new `SubsPrimitiveParmItanium` function takes a symbol name and replacement primitive type parameter as before but parses it using the FastDemangler, which has been modified to be able to notify clients of parse events (primitive types at this point). Additionally, we now use a `set` of `ConstStrings` instead of a `vector` so that we don't try and resolve the same invalid candidate multiple times. Differential Revision: https://reviews.llvm.org/D27223 Subscribers: lldb-commits llvm-svn: 290117
* Add methods to enable using formatv syntax in LLDB.Zachary Turner2016-12-161-53/+0
| | | | | | | | | | | | | 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
* Fix build for mingw.Hafiz Abid Qadeer2016-12-151-2/+2
| | | | | | | | | | | | Summary: I was building lldb using cross mingw-w64 toolchain on Linux and observed some issues. This is first patch in the series to fix that build. It mostly corrects the case of include files and adjusts some #ifdefs from _MSC_VER to _WIN32 and vice versa. I built lldb on windows with VS after applying this patch to make sure it does not break the build there. Reviewers: zturner, labath, abidh Subscribers: ki.stfu, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27759 llvm-svn: 289821
* Replace APFloatBase static fltSemantics data members with getter functionsStephan Bergmann2016-12-141-33/+33
| | | | | | | | | | | | | At least the plugin used by the LibreOffice build (<https://wiki.documentfoundation.org/Development/Clang_plugins>) indirectly uses those members (through inline functions in LLVM/Clang include files in turn using them), but they are not exported by utils/extract_symbols.py on Windows, and accessing data across DLL/EXE boundaries on Windows is generally problematic. Differential Revision: https://reviews.llvm.org/D26671 llvm-svn: 289647
* Use Timeout<> in the Listener classPavel Labath2016-11-304-59/+26
| | | | | | | | | | | | | | | | | | | | Summary: Communication classes use the Timeout<> class to specify the timeout. Listener class was converted to chrono some time ago, but it used a different meaning for a timeout of zero (Listener: infinite wait, Communication: no wait). Instead, Listener provided separate functions which performed a non-blocking event read. This converts the Listener class to the new Timeout class, to improve consistency. It also allows us to get merge the different GetNextEvent*** and WaitForEvent*** functions into one. No functional change intended. Reviewers: jingham, clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D27136 llvm-svn: 288238
* Remove ConnectionSharedMemoryPavel Labath2016-11-292-147/+0
| | | | | | This class is unused. llvm-svn: 288122
* Remove ConnectionMachPortPavel Labath2016-11-292-260/+0
| | | | | | | | | | | | | | Summary: This class is unused, and since the StringRef refactor, it does not even implement the Connection interface. Reviewers: clayborg, jingham Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27134 llvm-svn: 288117
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-264-5/+4
| | | | | | | | | | | | | 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
* Introduce Chrono to the Connection class. NFCI.Pavel Labath2016-11-252-6/+3
| | | | llvm-svn: 287922
* Fix FreeBSD build error in r287920Pavel Labath2016-11-251-2/+4
| | | | | | | The conditional expression is ambiguous there, so help it by explicitly casting. This will go away once we use chrono all the way down. llvm-svn: 287921
* Introduce chrono to the Communication classPavel Labath2016-11-251-23/+21
| | | | | | | | This replaces the raw integer timeout parameters in the class with their chrono-based equivalents. To achieve this, I have moved the Timeout class to a more generic place and added a quick unit test for it. llvm-svn: 287920
* Re-add the StringRef interface changes for Variable.Zachary Turner2016-11-181-13/+13
| | | | | | | | This concludes the changes I originally tried to make and then had to back out. This way if anything is still broken, it should be easier to bisect it back to a more specific changeset. llvm-svn: 287367
* Resubmit "Remove an output-parameter from Variable function".Zachary Turner2016-11-182-130/+92
| | | | | | | | | | | The scanning algorithm had a few little subtleties that I overlooked, but this patch should fix everything. I still haven't changed the function to take a StringRef since that has some trickle down effect and is mostly mechanical, I just wanted to get the tricky part as isolated as possible. llvm-svn: 287354
* Revert "Remove an out param from ValueObject::GetValueForExpressionPath."Zachary Turner2016-11-182-22/+74
| | | | | | | This reverts commit r287315, as it introduces a bug that breaks many things. llvm-svn: 287320
* Remove an out param from ValueObject::GetValueForExpressionPath.Zachary Turner2016-11-182-74/+22
| | | | | | | | | | This argument was only used in one place in the codebase, and it was in a non-critical log statement and can be easily substituted for an equally meaningful field instead. The payoff of computing this value is not worth the added complexity. llvm-svn: 287315
* 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
OpenPOWER on IntegriCloud