summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters
Commit message (Collapse)AuthorAgeFilesLines
...
* Move Log from Core -> Utility.Zachary Turner2017-03-032-2/+2
| | | | | | | | | All references to Host and Core have been removed, so this class can now safely be lowered into Utility. Differential Revision: https://reviews.llvm.org/D30559 llvm-svn: 296909
* Clean up debug loggingPavel Labath2017-02-131-36/+20
| | | | | | | | | | | | | | | | | | | | | Summary: We've had two ways to print a "debug" log message. - Log::GetDebug() was testing a Stream flag which was never set. - Log::Debug() was checking for the presence of "log enable --debug" flag. Given that these two were used very rarely and we already have a different way to specify "I want a more verbose log", I propose to remove these two functions and migrate the callers to LLDB_LOGV. This commit does that. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29823 llvm-svn: 294939
* Move classes from Core -> Utility.Zachary Turner2017-02-028-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
* [CMake] Add accurate dependency specificationsChris Bieneman2017-01-311-0/+10
| | | | | | | | | | | | | | | | | 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
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-261-2/+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
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-166-23/+17
| | | | | | | | | | | | | | | 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-3/+4
| | | | llvm-svn: 286744
* Simplify the PrintableRepresentationSpecialCases code; we never used the ↵Enrico Granata2016-11-071-1/+1
| | | | | | ePrintableRepresentationSpecialCasesOnly value and with enum classes the names doesn't need to be that long llvm-svn: 286176
* Preliminary plumbing work to make 'parray' able to take offset and stride ↵Enrico Granata2016-11-042-12/+27
| | | | | | options llvm-svn: 286003
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-021-2/+2
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Make lldb -Werror clean on Windows.Zachary Turner2016-10-051-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D25247 llvm-svn: 283344
* Move UTF functions into namespace llvm.Justin Lebar2016-09-301-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This lets people link against LLVM and their own version of the UTF library. I determined this only affects llvm, clang, lld, and lldb by running $ git grep -wl 'UTF[0-9]\+\|\bConvertUTF\bisLegalUTF\|getNumBytesFor' | cut -f 1 -d '/' | sort | uniq clang lld lldb llvm Tested with ninja lldb ninja check-clang check-llvm check-lld (ninja check-lldb doesn't complete for me with or without this patch.) Reviewers: rnk Subscribers: klimek, beanz, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D24996 llvm-svn: 282822
* Make lldb::Regex use StringRef.Zachary Turner2016-09-212-9/+9
| | | | | | | | | | 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
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0617-5356/+4552
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Fix an issue where a synthetic child provider could only provide a value of ↵Enrico Granata2016-08-311-8/+9
| | | | | | the same size as the containing type llvm-svn: 280294
* Remove unused variables.Zachary Turner2016-08-311-1/+0
| | | | | | Patch by Taras Tsugrii llvm-svn: 280283
* remove use of Mutex in favour of std::{,recursive_}mutexSaleem Abdulrasool2016-05-184-77/+75
| | | | | | | | | | This is a pretty straightforward first pass over removing a number of uses of Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there are interfaces which take Mutex::Locker & to lock internal locks. This patch cleans up most of the easy cases. The only non-trivial change is in CommandObjectTarget.cpp where a Mutex::Locker was split into two. llvm-svn: 269877
* Add support for synthetic child providers to optionally return a customized ↵Enrico Granata2016-05-021-0/+9
| | | | | | typename for display llvm-svn: 268208
* Add a --element-count option to the expression commandEnrico Granata2016-04-252-12/+46
| | | | | | | | | | | | | This option evaluates an expression and, if the result is of pointer type, treats it as if it was an array of that many elements and displays such elements This has a couple subtle points but is mostly as straightforward as it sounds Add a parray N <expr> alias for this new mode Also, extend the --object-description mode to do the moral equivalent of the above but display each element in --object-description mode Add a poarray N <expr> alias for this llvm-svn: 267372
* Remove even more of the data formatters that silently run codeEnrico Granata2016-04-081-177/+0
| | | | | | Fixes <rdar://problem/25629755> llvm-svn: 265849
* This change introduces a "ExpressionExecutionThread" to the ThreadList. Jim Ingham2016-03-121-3/+8
| | | | | | | | | | | | | | | | | | | Turns out that most of the code that runs expressions (e.g. the ObjC runtime grubber) on behalf of the expression parser was using the currently selected thread. But sometimes, e.g. when we are evaluating breakpoint conditions/commands, we don't select the thread we're running on, we instead set the context for the interpreter, and explicitly pass that to other callers. That wasn't getting communicated to these utility expressions, so they would run on some other thread instead, and that could cause a variety of subtle and hard to reproduce problems. I also went through the commands and cleaned up the use of GetSelectedThread. All those uses should have been trying the thread in the m_exe_ctx belonging to the command object first. It would actually have been pretty hard to get misbehavior in these cases, but for correctness sake it is good to make this usage consistent. <rdar://problem/24978569> llvm-svn: 263326
* Fix a typo in FormatCache.cpp such that the cache would potentially return ↵Enrico Granata2016-02-181-1/+1
| | | | | | an invalid format in some cases llvm-svn: 261246
* Data formatter support for libc++ std::atomic<T>Enrico Granata2016-02-121-2/+2
| | | | | | | | | | On libc++ std::atomic is a fairly simple data type (layout wise, at least), wrapping actual contents in a member variable named "__a_" All the formatters are doing is "peel away" this intermediate layer and exposing user data as direct children or values of the std::atomic root variable Fixes rdar://24329405 llvm-svn: 260752
* Now that SymbolFileDWARF supports having types in completely separate .pcm ↵Greg Clayton2016-02-101-1/+3
| | | | | | | | | | | | | | file with "-fmodules -gmodules", each SymbolFileDWARF can reference module DWARF info by looking in other DWARF files. Then if you have 1000 .o files that each reference one or more .pcm files in their debug info, a simple Module::FindTypes(...) call can end up searching the same .pcm file over and over and over. Now all internal FindTypes methods in classes (ModuleList, Module, SymbolFile) now take an extra argument: llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files Each time a SymbolFile::FindTypes() is called, it needs to check the searched_symbol_files list to make sure it hasn't already been asked to find the type and return immediately if it has been checked. This will stop circular dependencies from also crashing LLDB during type queries. This has proven to be an issue when debugging large applications on MacOSX that use DWARF in .o files. <rdar://problem/24581488> llvm-svn: 260434
* Fix TestDataFormatterScript for Linux.Chaoren Lin2016-01-291-5/+4
| | | | | | | | | | | | | | Summary: m_function_name will contain a dummy name for the auto-generated function from the python script on Linux. Check for script name first. Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16703 llvm-svn: 259153
* Fix a bug where LLDB would not print the name of the function that a ↵Enrico Granata2016-01-291-3/+17
| | | | | | | | scripted summary is bound to rdar://24380076 llvm-svn: 259131
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-14/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* Fix some compiler warnings with MSVC 2015.Zachary Turner2016-01-131-1/+1
| | | | llvm-svn: 257671
* Fix a bug where language categories would hold on to their caches even after ↵Enrico Granata2015-12-152-4/+22
| | | | | | changes llvm-svn: 255603
* Fix a bug where one-lining display of child values would ignore the user's ↵Enrico Granata2015-12-011-1/+1
| | | | | | choice of format llvm-svn: 254349
* Reapply r253423 and r253424 (which cleanup the data formatters iteration ↵Enrico Granata2015-11-183-56/+2
| | | | | | model, as well as the type X list commands), along with a change by Zachary Turner to bypass a MSVC bug with SFINAE llvm-svn: 253493
* Revert 2 commits breaking the MSVC buildTamas Berghammer2015-11-183-2/+56
| | | | | | | | | | Revert "Remove a few vestigial typedefs from the old world" This reverts commit 05872cda2a00fbd988c4fc761b1f87fe9edce224. Revert "Cleanup the type X list commands to use the new ForEach goodness" This reverts commit 85b1d83819a22cdc9ef12f58fd4fa92b473a4f81. llvm-svn: 253455
* Cleanup the type X list commands to use the new ForEach goodnessEnrico Granata2015-11-183-56/+2
| | | | llvm-svn: 253423
* The existing logic to loop over formatters is very pre-C++11, using void* ↵Enrico Granata2015-11-143-0/+54
| | | | | | | | | batons, and function pointers, and raw memory allocations instead of safer more modern constructs This is a first pass at a cleanup of that code, modernizing the "type X clear" commands, and providing the basic infrastructure I plan to use all over More cleanup will come over the next few days llvm-svn: 253125
* Upstream some data formatter related cleanupsEnrico Granata2015-11-131-7/+18
| | | | llvm-svn: 253093
* Fix indentationEnrico Granata2015-11-131-21/+21
| | | | llvm-svn: 253089
* Introduce a way for Languages to specify whether values of "reference types" ↵Enrico Granata2015-11-101-7/+22
| | | | | | | | | | are "nil" (not pointing to anything) or uninitialized (never made to point at anything) This latter determination may or may not be possible on a per-language basis; and neither is mandatory to implement for any language Use this knowledge in the ValueObjectPrinter to generalize the notion of IsObjCNil() and the respective printout llvm-svn: 252663
* Upstream changes to the ValueObjectPrinter; nfcEnrico Granata2015-11-102-43/+147
| | | | llvm-svn: 252638
* Extend the TypeSystem's ShouldPrintAsOneLiner implementation so that the ↵Enrico Granata2015-11-091-1/+18
| | | | | | ValueObject itself also gets a say in the process; NFC llvm-svn: 252516
* Fix an issue where LLDB would truncate summaries for string types without ↵Enrico Granata2015-11-041-4/+28
| | | | | | producing any evidence thereof llvm-svn: 252018
* All instance variables start with "m_". Fix "options" to be "m_options".Greg Clayton2015-11-031-56/+56
| | | | llvm-svn: 252013
* Add a --language (-l) option to the formatter delete commands in order to ↵Enrico Granata2015-10-291-0/+8
| | | | | | | | | allow removing formatters from language categories This is slightly harder to test because formatters cannot be added to language categories, so deletions are irreversible (in a debugger run) I plan to add a test case soon, but I need to think about the right approach to obtain one llvm-svn: 251660
* Remove an unused local variableEnrico Granata2015-10-281-1/+0
| | | | llvm-svn: 251581
* Fix Clang-tidy modernize-use-override warnings in some files in source; ↵Eugene Zelenko2015-10-261-23/+27
| | | | | | other minor fixes. llvm-svn: 251309
* [SBValue] Add a method GetNumChildren(uint32_t max)Siva Chandra2015-10-211-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Along with this, support for an optional argument to the "num_children" method of a Python synthetic child provider has also been added. These have been added with the following use case in mind: Synthetic child providers currently have a method "has_children" and "num_children". While the former is good enough to know if there are children, it does not give any insight into how many children there are. Though the latter serves this purpose, calculating the number for children of a data structure could be an O(N) operation if the data structure has N children. The new method added in this change provide a middle ground. One can call GetNumChildren(K) to know if a child exists at an index K which can be as large as the callers tolerance can be. If the caller wants to know about children beyond K, it can make an other call with 2K. If the synthetic child provider maintains state about it counting till K previosly, then the next call is only an O(K) operation. Infact, all calls made progressively with steps of K will be O(K) operations. Reviewers: vharron, clayborg, granata.enrico Subscribers: labath, lldb-commits Differential Revision: http://reviews.llvm.org/D13778 llvm-svn: 250930
* Rationalization of includes in the data formatters codeEnrico Granata2015-10-2010-24/+14
| | | | llvm-svn: 250798
* Introduce the concept of a type that is meaningless without dynamic ↵Enrico Granata2015-10-201-18/+12
| | | | | | | | resolution, which are essentially placeholder types meant to appease a language's type system but do not offer any actual information to the debugger, unless further resolved This is currently meant for data formatters to know to ignore such types in caching and lookup llvm-svn: 250767
* Let Language plugins vend a default DeclPrintingHelper in case a custom one ↵Enrico Granata2015-10-193-11/+253
| | | | | | is not specified for the specific invocation llvm-svn: 250744
* Silence -Wreturn-type with gcc 5.2Saleem Abdulrasool2015-10-181-0/+1
| | | | | | The switch is fully covered, mark "default" as unreachable. NFC. llvm-svn: 250667
* Silence -Wqual-cast warnings from GCC 5.2Saleem Abdulrasool2015-10-181-2/+2
| | | | | | | | There were a number of const qualifiers being cast away which caused warnings. This cluttered the output hiding real errors. Silence them by explicit casting. NFC. llvm-svn: 250662
OpenPOWER on IntegriCloud