summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach the "extend char types" (char16_t, char32_t and wchar_t) formatters ↵Enrico Granata2015-07-171-0/+3
| | | | | | that a *single character* whose value is 0 is actually a valid thing to print out llvm-svn: 242572
* Teach the NSString data formatter to handle embedded NULs in short ASCII stringsEnrico Granata2015-07-171-1/+16
| | | | llvm-svn: 242559
* Improve the NSString data formatter so that explicitly-lengthed Unicode ↵Enrico Granata2015-07-171-4/+8
| | | | | | strings print embedded NULs correctly llvm-svn: 242555
* Teach the std::wstring data formatter how to properly display strings with ↵Enrico Granata2015-07-172-3/+41
| | | | | | embedded NUL bytes llvm-svn: 242501
* Add StringPrinter support for printing a std::string with embedded NUL bytesEnrico Granata2015-07-172-36/+56
| | | | llvm-svn: 242496
* Add a summary for vector typesEnrico Granata2015-07-072-1/+67
| | | | | | | | | | | | The summary is - quite simply - a one-line printout of the vector elements We still need synthetic children: a) as a source of the elements to print in the summary b) for graphical IDEs that display structure regardless of the summary settings rdar://5429347 llvm-svn: 241531
* When I introduced hard-coded formatters, I made them non-cacheableEnrico Granata2015-07-011-5/+9
| | | | | | | | | This is because - in theory - the formatter could match on not just the type, but also other properties of a ValueObject, so a per-type caching would not be a good thing On the other hand, that is not always true - sometimes the matching truly is per-type So, introduce a non-cacheable attribute on formatters that decides whether a formatter should or should not be cached. That way, the few formatters that don't want themselves cached can do so, but most formatters (including most hard-coded ones) can cache themselves just fine llvm-svn: 241184
* Revert r239873 - I actually want to think some more about thisEnrico Granata2015-06-171-16/+2
| | | | llvm-svn: 239874
* Fix an issue where the oneliner printing of variables would ignore custom ↵Enrico Granata2015-06-171-2/+16
| | | | | | | | | | | formatting Because vector types use their formats in special ways (i.e. children get generated based on them), this change by itself would cause a regression in printing vector types with some custom formats Work around that issue by special casing vector types out of this format-passdown mode. I believe there is a more general feature to be designed in this space, but until I see more cases of interest, I am going to leave this as a special case Fixes rdar://20810062 llvm-svn: 239873
* Fixing a potential issue where the NSIndexPath formatter could try to access ↵Enrico Granata2015-06-161-95/+124
| | | | | | | | stale data No test because I did not see this happen - it has been found by code inspection as a response to seeing crash logs about this llvm-svn: 239851
* Add a formatter for wchar_t[N] arraysEnrico Granata2015-06-151-7/+12
| | | | | | rdar://21299888 llvm-svn: 239777
* Revert "Introduce a TypeSystem interface to support adding non-clang languages."Pavel Labath2015-06-0811-25/+19
| | | | | | This seems to break expression evaluation on the linux build. llvm-svn: 239366
* Introduce a TypeSystem interface to support adding non-clang languages.Pavel Labath2015-06-0811-19/+25
| | | | | | | | | | | | | Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8712 Original Author: Ryan Brown <ribrdb@google.com> llvm-svn: 239360
* Fix a bug where trying to Dump() a ValueObject would use the ↵Enrico Granata2015-06-031-0/+22
| | | | | | | | | | static/non-synthetic version of the value even if the ValueObject one actually called Dump() on turned out to be dynamic and/or synthetic This was of course overridable by using DumpValueObjectOptions, but the default should be saner and the previous behavior made for a few fun investigations.... rdar://problem/21065149 llvm-svn: 238961
* Don't #include "lldb-python.h" from anywhere.Zachary Turner2015-05-2921-42/+0
| | | | | | | | | | | | | Since interaction with the python interpreter is moving towards being more isolated, we won't be able to include this header from normal files anymore, all includes of it should be localized to the python library which will live under source/bindings/API/Python after a future patch. None of the files that were including this header actually depended on it anyway, so it was just a dead include in every single instance. llvm-svn: 238581
* Remove unused #includes of ScriptInterpreterPython.hZachary Turner2015-05-282-2/+1
| | | | llvm-svn: 238470
* Fixed a ton of gcc compile warningsVince Harron2015-05-131-15/+15
| | | | | | | | | | Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218
* Get lldb-server building on android-9Vince Harron2015-05-121-0/+3
| | | | | | Build lldb-server with an android-9 sysroot. llvm-svn: 237078
* Fix an issue where the UTF dumper was ignoring the direction to generate ↵Enrico Granata2015-05-011-1/+1
| | | | | | uncapped dumps llvm-svn: 236362
* Implement formatter for std::vector<bool, ...> of libstdc++ in Python.Siva Chandra2015-03-171-169/+0
| | | | | | | | | | | | | | | | | | | Summary: The existing formatter in C++ has been removed as it was not being used. The associated test TestDataFormatterStdVBool.py has been enabled for both Clang and GCC on Linux. Test Plan: dotest.py -p TestDataFormatterStdVBool Reviewers: vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8390 llvm-svn: 232548
* Remove ScriptInterpreterObject.Zachary Turner2015-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This removes ScriptInterpreterObject from the codebase completely. Places that used to rely on ScriptInterpreterObject now use StructuredData::Object and its derived classes. To support this, a new type of StructuredData object is introduced, called StructuredData::Generic, which stores a void*. Internally within the python library, StructuredPythonObject subclasses this StructuredData::Generic class so that it can addref and decref the python object on construction and destruction. Additionally, all of the classes in PythonDataObjects.h such as PythonList, PythonDictionary, etc now provide a method to create an instance of the corresponding StructuredData type. For example, there is PythonDictionary::CreateStructuredDictionary. To eliminate dependencies on PythonDataObjects for external callers, all ScriptInterpreter methods now return only StructuredData classes The rest of the changes in this CL are focused on fixing up users of PythonDataObjects classes to use the new StructuredData classes. llvm-svn: 232534
* Fix a bug in the data formatters where summary strings would not look into ↵Enrico Granata2015-03-121-1/+1
| | | | | | | | the non-synthetic value for child members if the ValueObject being formatted happened to have a synthetic value rdar://15630776 llvm-svn: 232114
* Fix an issue where values would be printed in one-line mode even if you ↵Enrico Granata2015-03-121-1/+5
| | | | | | asked to see locations and/or asked for flat output mode llvm-svn: 232113
* A few improvements to our vector types formatting story:Enrico Granata2015-03-062-16/+37
| | | | | | | | | - use a hardcoded formatter to match all vector types, and make it so that their element type is taken into account when doing default formatting - special case a vector of char to display byte values instead of characters by default Fixes the test failures Ilia was seeing llvm-svn: 231504
* Windows botEnrico Granata2015-03-061-0/+1
| | | | llvm-svn: 231450
* Provide synthetic children for some vector typesEnrico Granata2015-03-062-0/+268
| | | | | | | | | | Unlike GDB, we tackle the problem of representing vector types in different styles by having a synthetic child provider that recognizes the format you're trying to apply to the variable, and coming up with the right type and number of child values to match that format This makes for a more compact representation and less visual noise Fixes rdar://5429347 llvm-svn: 231449
* Don't #include FormatManager.h from Debugger.hZachary Turner2015-03-031-0/+1
| | | | | | | | Debugger.h is a huge file that gets included everywhere, and FormatManager.h brings in a ton of unnecessary stuff and doesn't even use anything from it in the header. llvm-svn: 231161
* Remove duplicated code for synthetic array members.Bruce Mitchener2015-02-261-1/+1
| | | | | | | | | | | | | | | | | Summary: The code for GetSyntheticArrayMemberFromPointer and GetSyntheticArrayMemberFromArray was identical, so just collapse the the methods into one. Reviewers: granata.enrico, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7911 llvm-svn: 230708
* Make a more complete fix for always supplying an execution context when ↵Greg Clayton2015-02-121-1/+1
| | | | | | | | | | getting byte sizes from types. There was a test in the test suite that was triggering the backtrace logging output that requested that the client pass an execution context. Sometimes we need the process for Objective C types because our static notion of the type might not align with the reality when being run in a live runtime. Switched from an "ExecutionContext *" to an "ExecutionContextScope *" for greater ease of use. llvm-svn: 228892
* Add missing check for LLDB_DISABLE_PYTHON in FormatManagerTamas Berghammer2015-02-111-0/+2
| | | | llvm-svn: 228856
* Added CoreMedia.cpp to CMakeLists.txt for egranata.Chaoren Lin2015-02-111-0/+1
| | | | llvm-svn: 228770
* Fix a couple typos in the previous commitEnrico Granata2015-02-102-1/+2
| | | | llvm-svn: 228762
* Add an LLDB summary for CMTime. Fixes rdar://15370376Enrico Granata2015-02-102-0/+104
| | | | llvm-svn: 228759
* Get rid of Debugger::FormatPrompt() and replace it with the new FormatEntity ↵Greg Clayton2015-02-042-9/+30
| | | | | | | | | | | | | | | | | | | class. Why? Debugger::FormatPrompt() would run through the format prompt every time and parse it and emit it piece by piece. It also did formatting differently depending on which key/value pair it was parsing. The new code improves on this with the following features: 1 - Allow format strings to be parsed into a FormatEntity::Entry which can contain multiple child FormatEntity::Entry objects. This FormatEntity::Entry is a parsed version of what was previously always done in Debugger::FormatPrompt() so it is more efficient to emit formatted strings using the new parsed FormatEntity::Entry. 2 - Allows errors in format strings to be shown immediately when setting the settings (frame-format, thread-format, disassembly-format 3 - Allows auto completion by implementing a new OptionValueFormatEntity and switching frame-format, thread-format, and disassembly-format settings over to using it. 4 - The FormatEntity::Entry for each of the frame-format, thread-format, disassembly-format settings only replaces the old one if the format parses correctly 5 - Combines all consecutive string values together for efficient output. This means all "${ansi.*}" keys and all desensitized characters like "\n" "\t" "\0721" "\x23" will get combined with their previous strings 6 - ${*.script:} (like "${var.script:mymodule.my_var_function}") have all been switched over to use ${script.*:} "${script.var:mymodule.my_var_function}") to make the format easier to parse as I don't believe anyone was using these format string power user features. 7 - All key values pairs are defined in simple C arrays of entries so it is much easier to add new entries. These changes pave the way for subsequent modifications where we can modify formats to do more (like control the width of value strings can do more and add more functionality more easily like string formatting to control the width, printf formats and more). llvm-svn: 228207
* Harden against the process pointer being null - this seems like it shouldn't ↵Enrico Granata2015-01-281-0/+2
| | | | | | | | happen, except it did - by a user stopping the debugger while the variables view was refreshing Fixes rdar://19599357 llvm-svn: 227350
* Preparatory infrastructural work to support dynamically determining sizes of ↵Enrico Granata2015-01-284-4/+4
| | | | | | | | | | | | ObjC types via the runtime This is necessary because the byte size of an ObjC class type is not reliably statically knowable (e.g. because superclasses sit deep in frameworks that we have no debug info for) The lack of reliable size info is a problem when trying to freeze-dry an ObjC instance (not the pointer, the pointee) This commit lays the foundation for having language runtimes help in figuring out byte sizes, and having ClangASTType ask for runtime help No feature change as no runtime actually implements the logic, and nowhere is an ExecutionContext passed in yet llvm-svn: 227274
* Commit fix for a static analyzer issue where a string pointer could ↵Enrico Granata2015-01-171-9/+15
| | | | | | theoretically be NULL.. llvm-svn: 226366
* Change auto to size_t to fix warning.Zachary Turner2015-01-091-1/+1
| | | | | | | Patch by Dan Sinclair Differential Revision: http://reviews.llvm.org/D6899 llvm-svn: 225539
* Fix trivial signed/unsigned comparison warningsAndy Gibbs2014-12-291-2/+2
| | | | llvm-svn: 224932
* We don't really handle printing embedded NULs in strings, but if we were to, ↵Enrico Granata2014-12-181-0/+6
| | | | | | we would need to have this logic inside the StringPrinter. So, add it.. For, you know, one day in the future where we might want to handle embedded NULs in strings... llvm-svn: 224537
* Improve the performance of the libc++ std::map formatter. This is not the ↵Enrico Granata2014-12-161-87/+57
| | | | | | full solution to the slowness of this formatter, but it's a 5% improvement in our testcase performance, which I am not going to complain too hard about. llvm-svn: 224373
* Move a bunch of method implementations over to the C++ file; remove the need ↵Enrico Granata2014-12-131-0/+103
| | | | | | for a few includes. All in all, good stuff llvm-svn: 224174
* SyntheticChildrenFrontEnd::* should also be built when python is disabledKeno Fischer2014-12-131-35/+35
| | | | | | | | | | | | | | | | | Summary: This moves - SyntheticChildrenFrontEnd::CreateValueObjectFromExpression - SyntheticChildrenFrontEnd::CreateValueObjectFromAddress - SyntheticChildrenFrontEnd::CreateValueObjectFromData outside the `#ifndef LLDB_DISABLE_PYTHON` since it doesn't seem to depend on python being available and indeed breaks the build when python is disabled. Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6646 llvm-svn: 224170
* Remove the last vestige of the world before data formatters :-)Enrico Granata2014-12-102-0/+57
| | | | | | | | Function pointers had a summary generated for them bypassing formatters, directly as part of the ValueObject subsystem This patch transitions that code into a hardcoded summary llvm-svn: 223906
* This patch does a few things:Enrico Granata2014-12-0911-24/+68
| | | | | | | | | | - adds a new flag to mark ValueObjects as "synthetic children generated" - vends new Create functions as part of the SyntheticChildrenFrontEnd that set the flag automatically - moves synthetic child providers over to using these new functions No visible feature change, but preparatory work for feature change llvm-svn: 223819
* Enable Python summaries to use custom SBTypeSummaryOptions if the user is so ↵Enrico Granata2014-11-221-0/+1
| | | | | | inclined. Updates to the webdoc will follow llvm-svn: 222593
* Do some cleanup of DumpValueObjectOptions. The whole concept of raw printing ↵Enrico Granata2014-11-211-7/+7
| | | | | | was split between feature-specific flags, and an m_be_raw flag, which then drove some other changes in printing behavior. Clean that up, so that each functionality has its own flag .. oh, and make the bools all go in a bitfield since I may want to add more of those over time llvm-svn: 222548
* Add the ability for the NSString and libc++ std::string formatters to ↵Enrico Granata2014-11-182-5/+14
| | | | | | retrieve uncapped data llvm-svn: 222277
* Fix a problem where the StringPrinter could be mistaking an empty string for ↵Enrico Granata2014-11-171-1/+1
| | | | | | a read error, and reporting spurious 'unable to read data' messages. rdar://19007243 llvm-svn: 222190
* Move a bunch of summary formatters to oneliner mode. This makes more cases ↵Enrico Granata2014-11-111-25/+34
| | | | | | eligible for oneline printing, and fixes rdar://18120906 llvm-svn: 221701
OpenPOWER on IntegriCloud