History log of /external/lldb/source/Commands/CommandObjectType.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7529c9b0dd31769049ae85258ce26056a9662c54 26-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/14243761>

The argument to -w (--category) in type * list is a regular expression
This caused unhappiness with the gnu-libstdc++ category because of the double ++

Now we check for exact textual match as-well-as regexp matching



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
d65317e8c1adbf5ff092e35bc685ff078c44312d 05-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12582328>

If you want to define a formatter for "array of Foo of any size", ordinarily you would say

-x "Foo \[[0-9]+\]"

this checkin allows you to instead say "Foo[]" (or "Foo []") and LLDB will automatically create the regular expression and add the -x flag on your behalf



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
7de74f933e207fcb5d7fba72f7f1e4c99f97b0a9 16-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/11158023>

Make type summary add and breakpoint command add show an helpful prototype + argument reference when manually typing Python code for these elements

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
102b2c2681c9a830afe25bfea35557421905e42c 19-Apr-2013 Greg Clayton <gclayton@apple.com> After discussing with Chris Lattner, we require C++11, so lets get rid of the macros and just use C++11.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
f509c5ec066599a3399fced39ea36996184939e8 29-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12978143>

Data formatters now cache themselves.
This commit provides a new formatter cache mechanism. Upon resolving a formatter (summary or synthetic), LLDB remembers the resolution for later faster retrieval.
Also moved the data formatters subsystem from the core to its own group and folder for easier management, and done some code reorganization.
The ObjC runtime v1 now returns a class name if asked for the dynamic type of an object. This is required for formatters caching to work with the v1 runtime.
Lastly, this commit disposes of the old hack where ValueObjects had to remember whether they were queried for formatters with their static or dynamic type.
Now the ValueObjectDynamicValue class works well enough that we can use its dynamic value setting for the same purpose.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
c8dc8c4659eb6c15ccdfd08c79cebbd984607342 20-Dec-2012 Jim Ingham <jingham@apple.com> If we can't find the python function for a given summary, print the name of the function in the warning message.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
5fd1177d4809753ba3ab05c7346a709e5ae4a9a9 14-Dec-2012 Filipe Cabecinhas <me@filcab.net> Fixed a typo.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
1998778efd3b40145a70bd2a9e44da8c06b8dcd5 12-Dec-2012 Enrico Granata <egranata@apple.com> <rdar://problem/10898363>

Emitting a warning when defining a summary or a synthetic provider and the function/class name provided does not correspond to a valid scripting object

Also using this chance to edit a few error messages from weird "internal error" markers to actual user-legible data!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
d891f9b872103235cfd2ed452c6f14a4394d9b3a 05-Dec-2012 Daniel Malea <daniel.malea@intel.com> Fix Linux build warnings due to redefinition of macros:
- add new header lldb-python.h to be included before other system headers
- short term fix (eventually python dependencies must be cleaned up)

Patch by Matt Kopec!




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
6475c42148a8ea1ca86e5db465db7eca742d897d 04-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12798131>

Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.

This fix does the following:
- make sure all short options are treated as "int"
- make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired
- fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates
- fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
9fcf9e1d4f869e553c268c522123a53d4fcb67bb 09-Nov-2012 Jason Molenda <jmolenda@apple.com> Fix typeo in example help text for type filter add.
<rdar://problem/12090979>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
ad01496520e60a659347cf74616c3f7ea59bac6b 15-Aug-2012 Sean Callanan <scallanan@apple.com> Fixed a typo.

<rdar://problem/12090979>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
2f7fd49190646e3e9bf603a142f64573b8666e0c 14-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11589605> Making a
'type category enable *' command
to match 'type category disable *'

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
c1ca9dcd0e8a1c7c5a882281afdd2a5145026fd0 08-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11975483> Removing user-visible references to 'dict' as a parameter name for Python summary-generating functions since it is a Python keyword.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
da26bd203cbb104291b39891febf7481794f205f 08-Jun-2012 Jim Ingham <jingham@apple.com> Make raw & parsed commands subclasses of CommandObject rather than having the raw version implement an
Execute which was never going to get run and another ExecuteRawCommandString. Took the knowledge of how
to prepare raw & parsed commands out of CommandInterpreter and put it in CommandObject where it belongs.

Also took all the cases where there were the subcommands of Multiword commands declared in the .h file for
the overall command and moved them into the .cpp file.

Made the CommandObject flags work for raw as well as parsed commands.

Made "expr" use the flags so that it requires you to be paused to run "expr".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
6a043531452d1611abbabc8de8c130ad2eadba8a 03-May-2012 Enrico Granata <egranata@apple.com> Adding a new 'type category disable *' feature that disables all categories - This is intended as a quick kill switch for data formatters for cases where the user wants as little extra processing as possible to be done on their target, or to override major data formatters bug, should they occur

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
f2cb7f275a8669eaef30a53c282db6ce9c03b332 22-Mar-2012 Enrico Granata <egranata@apple.com> Removing cascading through inheritance chains for data formatters
This is the feature that allowed the user to have things like:

class Base { ... };
class Derived : public Base { ... };

and have formatters defined for Base work automatically for Derived.

This feature turned out to be too expensive since it requires completing types.

This patch takes care of removing cascading (other than typedefs chain cascading), updating the test suite accordingly, and adding required Cocoa class names to keep the AppKit formatters working


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
598df88bd6fc33c6fb330bc859bdc277795501f3 14-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10434005>

Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind
macros that allows us to easily compile for either C++.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
400105dd92731a0c8968d6296b0b7279b483ebf0 07-Mar-2012 Enrico Granata <egranata@apple.com> Using the new ScriptInterpreterObject in the implementation of synthetic children to enhance type safety
Several places in the ScriptInterpreter interface used StringList objects where an std::string would suffice - Fixed
Refactoring calls that generated special-purposes functions in the Python interpreter to use helper functions instead of duplicating blobs of code


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
16376ed044df3ee70fcf69e19f06af01e71a8e9a 15-Feb-2012 Enrico Granata <granata.enrico@gmail.com> <rdar://problem/10062621>
New public API for handling formatters: creating, deleting, modifying categories, and formatters, and managing type/formatter association.
This provides SB classes for each of the main object types involved in providing formatter support:
SBTypeCategory
SBTypeFilter
SBTypeFormat
SBTypeSummary
SBTypeSynthetic
plus, an SBTypeNameSpecifier class that is used on the public API layer to abstract the notion that formatters can be applied to plain type-names as well as to regular expressions
For naming consistency, this patch also renames a lot of formatters-related classes.
Plus, the changes in how flags are handled that started with summaries is now extended to other classes as well. A new enum (lldb::eTypeOption) is meant to support this on the public side.
The patch also adds several new calls to the formatter infrastructure that are used to implement by-index accessing and several other design changes required to accommodate the new API layer.
An architectural change is introduced in that backing objects for formatters now become writable. On the public API layer, CoW is implemented to prevent unwanted propagation of changes.
Lastly, there are some modifications in how the "default" category is constructed and managed in relation to other categories.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
2f2c277dd88f3e252394f70516b63f757d1a09a3 03-Feb-2012 Enrico Granata <granata.enrico@gmail.com> Added a new --omit-names (-O, uppercase letter o) option to "type summary add".
When used in conjunction with --inline-children, this option will cause the names of the values to be omitted from the output. This can be beneficial in cases such as vFloat, where it will compact the representation from
([0]=1,[1]=2,[2]=3,[3]=4) to (1, 2, 3, 4).
Added a test case to check that the new option works correctly.
Also took some time to revisit SummaryFormat and related classes and tweak them for added readability and maintainability.
Finally, added a new class name to which the std::string summary should be applied.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
448b6d6c2847976b902bf3cfbcb69b46aad7c46d 31-Jan-2012 Enrico Granata <granata.enrico@gmail.com> quick fixes for two issues that were causing LLDB to crash

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
13d24fb1817faa7ccc4cfd799113ba1a2b8968eb 29-Jan-2012 Greg Clayton <gclayton@apple.com> Switching back to using std::tr1::shared_ptr. We originally switched away
due to RTTI worries since llvm and clang don't use RTTI, but I was able to
switch back with no issues as far as I can tell. Once the RTTI issue wasn't
an issue, we were looking for a way to properly track weak pointers to objects
to solve some of the threading issues we have been running into which naturally
led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared
pointer from just a pointer, which is also easily solved using the
std::tr1::enable_shared_from_this class.

The main reason for this move back is so we can start properly having weak
references to objects. Currently a lldb_private::Thread class has a refrence
to its parent lldb_private::Process. This doesn't work well when we now hand
out a SBThread object that contains a shared pointer to a lldb_private::Thread
as this SBThread can be held onto by external clients and if they end up
using one of these objects we can easily crash.

So the next task is to start adopting std::tr1::weak_ptr where ever it makes
sense which we can do with lldb_private::Debugger, lldb_private::Target,
lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and
many more objects now that they are no longer using intrusive ref counted
pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive
pointers).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
6010acef0cee54e044d4e7e472ef3d99e13c5045 07-Nov-2011 Enrico Granata <granata.enrico@gmail.com> this patch addresses several issues with "command script" subcommands:
a) adds a new --synchronicity (-s) setting for "command script add" that allows the user to decide if scripted commands should run synchronously or asynchronously (which can make a difference in how events are handled)
b) clears up several error messages
c) adds a new --allow-reload (-r) setting for "command script import" that allows the user to reload a module even if it has already been imported before
d) allows filename completion for "command script import" (much like what happens for "target create")
e) prevents "command script add" from replacing built-in commands with scripted commands
f) changes AddUserCommand() to take an std::string instead of a const char* (for performance reasons)
plus, it fixes an issue in "type summary add" command handling which caused several test suite errors


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
3e4238d47a6d1a3106f357d2e7b495870721c7ae 04-Nov-2011 Greg Clayton <gclayton@apple.com> Fixed the Xcode project building of LLVM to be a bit more user friendly:

- If you download and build the sources in the Xcode project, x86_64 builds
by default using the "llvm.zip" checkpointed LLVM.
- If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the
Xcode project will download the right LLVM sources and build them from
scratch
- If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib"
directory, we will use the sources you have placed in the LLDB directory.

Python can now be disabled for platforms that don't support it.

Changed the way the libllvmclang.a files get used. They now all get built into
arch specific directories and never get merged into universal binaries as this
was causing issues where you would have to go and delete the file if you wanted
to build an extra architecture slice.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
9c236733d43e6250c8a5671a438f4a2afeb9c0b2 26-Oct-2011 Greg Clayton <gclayton@apple.com> Cleaned up many error codes. For any who is filling in error strings into
lldb_private::Error objects the rules are:
- short strings that don't start with a capitol letter unless the name is a
class or anything else that is always capitolized
- no trailing newline character
- should be one line if possible

Implemented a first pass at adding "--gdb-format" support to anything that
accepts format with optional size/count.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
a42880a8e464a3e4f93951ae797313e5e38cdcd3 25-Oct-2011 Greg Clayton <gclayton@apple.com> Updated all commands that use a "--format" / "-f" options to use the new
OptionGroupFormat. Updated OptionGroupFormat to be able to also use the
"--size" and "--count" options. Commands that use a OptionGroupFormat instance
can choose which of the options they want by initializing OptionGroupFormat
accordingly. Clients can either get only the "--format", "--format" + "--size",
or "--format" + "--size" + "--count". This is in preparation for upcoming
chnages where there are alternate ways (GDB format specification) to set a
format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
7e5fa7fc1f8efd24c078e063b2c4b5e13ba5be20 20-Sep-2011 Jason Molenda <jmolenda@apple.com> Update declarations for all functions/methods that accept printf-style
stdarg formats to use __attribute__ format so the compiler can flag
incorrect uses. Fix all incorrect uses. Most of these are innocuous,
a few were resulting in crashes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
3b23d2097b526c6326b7b7c56d5fc84884d4e08b 10-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Renaming a bulk of method calls from Get() to something more descriptive

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
716a6286f8fd6d5d0e5da218c34317a16f5baa50 07-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Refactoring of Get() methods in FormatManager/FormatCategory to have explicative names and return shared-pointers instead of bools
Reduced the amount of memory required to avoid loops in DumpPrintableRepresentation() from 32 bits down to 1 bit
- Additionally, disallowed creating summary strings of the form ${var%S} which did nothing but cause endless loops by definition


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
915448044bac6fdac22a33cc46697dcb771a8df2 06-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Redesign of the interaction between Python and frozen objects:
- introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from
a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored
in frozen objects ; now such reads transparently move from host to target as required
- as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also
removed code that enabled to recognize an expression result VO as such
- introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO
representing a T* or T[], and doing dereferences transparently
in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData
- as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it
en lieu of doing the raw read itself
- introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers,
this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory)
in public layer this returns an SBData, just like GetPointeeData()
- introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData
the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any
of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values
- added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing
Solved a bug where global pointers to global variables were not dereferenced correctly for display
New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128
Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command
Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type
of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file
addresses that generate file address children UNLESS we have a live process)
Updated help text for summary-string
Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers
Edited the syntax and help for some commands to have proper argument types


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
242ffb80dd0c1c650c8a9f05656a3ba2f339993d 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Short option for --summary-string in 'type summary add' is now -s. This might be a breaking change for those who have summaries defined.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
2c6a3d80dab3cf50c26fefe037357a4e6e621258 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Additional code cleanups ; Short option name for --python-script in type summary add moved from -s to -o (this is a preliminary step in moving the short option for --summary-string from -f to -s) ; Accordingly updated the test suite

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
d587a5847c90ecb588f725532825fffe4211e019 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Separated FormatNavigator and FormatManager in two different files ; moved FormatCategoryItem enum out of FormatManager.h as a debugger-wide lldb_private enum ; minor style cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
0be2e9be82cb20dbf03dac41dd48e376e8fee4cb 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> More cleanups ; Separated implementation of FormatManager from class DataVisualization as a front-end by using separate .h/.cpp files - Final aim is to break up FormatManager.h/cpp into several separate files

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
b0968f5c6b8c15d5cb223676686e014eb12c44c1 22-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Code cleanup and refactoring (round 4):
- FormatCategories now are directly mapped by ConstString objects instead of going through
const char* -> ConstString -> const char*
- FormatCategory callback does not pass category name anymore. This is not necessary because
FormatCategory objects themselves hold their name as a member variable


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
d3a86a2bad17204570577dbafc51f3b107310de8 19-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Third round of code cleanups:
- reorganizing the PTS (Partial Template Specializations) in FormatManager.h
- applied a patch by Filipe Cabecinhas to make LLDB compile with GCC
Functional changes:
- fixed an issue where command type summary add for type "struct Foo" would not match any types.
currently, "struct" will be stripped off and type "Foo" will be matched.
similar behavior occurs for class, enum and union specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
1c61743af946076e988d88baf725382e99d905de 18-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Second round of code cleanups:
- reorganizing classes layout to have public part first
Typedefs that we want to keep private, but must be defined for some public code to work correctly are an exception
- avoiding methods in the form T foo() { code; } all on one-line
- moving method implementations from .h to .cpp whenever feasible
Templatized code is an exception and so are very small methods
- generally, adhering to coding conventions followed project-wide
Functional changes:
- fixed an issue where using ${var} in a summary for an aggregate, and then displaying a pointer-to-aggregate would lead to no summary being displayed
The issue was not a major one because all ${var} was meant to do in that context was display an error for invalid use of pointer
Accordingly fixed test cases and added a new test case


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
f501c5913d5daaf45a906477bdf466bb74ed10fb 18-Aug-2011 Enrico Granata <granata.enrico@gmail.com> First round of code cleanups:
- all instances of "vobj" have been renamed to "valobj"
- class Debugger::Formatting has been renamed to DataVisualization (defined in FormatManager.h/cpp)
The interface to this class has not changed
- FormatCategory now uses ConstString's as keys to the navigators instead of repeatedly casting
from ConstString to const char* and back all the time
Next step is making the same happen for categories themselves
- category gnu-libstdc++ is defined in the constructor for a FormatManager
The source code for it is defined in gnu_libstdcpp.py, drawn from examples/synthetic at compile time
All references to previous 'osxcpp' name have been removed from both code and file names
Functional changes:
- the name of the option to use a summary string for 'type summary add' has changed from the previous --format-string
to the new --summary-string. It is expected that the short option will change from -f to -s, and -s for --python-script
will become -o


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
074e3b6c2eac1438a85e464796cbc19b4354d5ad 17-Aug-2011 Enrico Granata <granata.enrico@gmail.com> New category "gnu-libstdc++" provides summary for std::string and synthetic children for types std::map, std::list and std::vector
The category is enabled by default. If you run into issues with it, disable it and the previous behavior of LLDB is restored
** This is a temporary solution. The general solution to having formatters pulled in at startup should involve going through the Platform.
Fixed an issue in type synthetic list where a category with synthetic providers in it was not shown if all the providers were regex-based


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
06f0db61da5e218e298ef6db0c4775e3daffc2c8 12-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Added an error message when the user tries to add a filter when a synthetic provider for the same type is already defined in the same category
The converse is also true: an error is shown when the user tries to add a synthetic provider to a category that already has a filter for the same type


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
018921dd162d818e71cf1ac86d03422e88f0a674 12-Aug-2011 Enrico Granata <granata.enrico@gmail.com> *Some more optimizations in usage of ConstString
*New setting target.max-children-count gives an upper-bound to the number of child objects that will be displayed at each depth-level
This might be a breaking change in some scenarios. To override the new limit you can use the --show-all-children (-A) option
to frame variable or increase the limit in your lldbinit file
*Command "type synthetic" has been split in two:
- "type synthetic" now only handles Python synthetic children providers
- the new command "type filter" handles filters
Because filters and synthetic providers are both ways to replace the children of a ValueObject, only one can be effective at any given time.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
711483118b234ef2fc40db1f2a32a0f3bbad4934 11-Aug-2011 Enrico Granata <granata.enrico@gmail.com> changed some variables from char* to std::string

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
a7e1b6de9510352bc9d56439685a978bb3ceb032 10-Aug-2011 Enrico Granata <granata.enrico@gmail.com> renaming command "type synth" to "type synthetic" for added readability

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
840eb267769b943926bb9fcb527ab91221cf7a07 10-Aug-2011 Enrico Granata <granata.enrico@gmail.com> CFString.py now shows contents in a more NSString-like way (e.g. you get @"Hello" instead of "Hello")
new --raw-output (-R) option to frame variable prevents using summaries and synthetic children
other future formatting enhancements will be excluded by using the -R option
test case enhanced to check that -R works correctly


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
a54ad9917626ca26d29edd13f74e1856548301d9 05-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Option --regex (-x) now also works for synthetic children:
- Added a test case in python-synth
Minor code improvements in categories, making them ready for adding new element types

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
979e20d127335143ffc89c2e37ec3a8b717ff22d 29-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Public API changes:
- Completely new implementation of SBType
- Various enhancements in several other classes
Python synthetic children providers for std::vector<T>, std::list<T> and std::map<K,V>:
- these return the actual elements into the container as the children of the container
- basic template name parsing that works (hopefully) on both Clang and GCC
- find them in examples/synthetic and in the test suite in functionalities/data-formatter/data-formatter-python-synth
New summary string token ${svar :
- the syntax is just the same as in ${var but this new token lets you read the values
coming from the synthetic children provider instead of the actual children
- Python providers above provide a synthetic child len that returns the number of elements
into the container
Full bug fix for the issue in which getting byte size for a non-complete type would crash LLDB
Several other fixes, including:
- inverted the order of arguments in the ClangASTType constructor
- EvaluationPoint now only returns SharedPointer's to Target and Process
- the help text for several type subcommands now correctly indicates argument-less options as such


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
ca67cc10637d1c2e69abe62901c63cbc7aead367 25-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Python synthetic providers must provide a num_children call; this was not specified in the docs up to now

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
e89ab7b58d2542f4f42e923fa65ef8984840a90c 25-Jul-2011 Enrico Granata <granata.enrico@gmail.com> new flag -P to type synth add lets you type a Python class interactively
added a final newline to fooSynthProvider.py
new option to automatically save user input in InputReaderEZ
checking for NULL pointers in several new places


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
9ae7cef26612773c6b3422834cec83f0fbb2cf8c 24-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Python synthetic children:
- you can now define a Python class as a synthetic children producer for a type
the class must adhere to this "interface":
def __init__(self, valobj, dict):
def get_child_at_index(self, index):
def get_child_index(self, name):
then using type synth add -l className typeName
(e.g. type synth add -l fooSynthProvider foo)
(This is still WIP with lots to be added)
A small test case is available also as reference

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
e4e3e2c0448bb0c77f8f8a3bbb47b951a481d3d8 22-Jul-2011 Enrico Granata <granata.enrico@gmail.com> when typing a summary string you can use the %S symbol to explicitly indicate that you want the summary to be used to print the target object
(e.g. ${var%S}). this might already be the default if your variable is of an aggregate type
new feature: synthetic filters. you can restrict the number of children for your variables to only a meaningful subset
- the restricted list of children obeys the typical rules (e.g. summaries prevail over children)
- one-line summaries show only the filtered (synthetic) children, if you type an expanded summary string, or you use Python scripts, all the real children are accessible
- to provide a synthetic children list use the "type synth add" command, as in:
type synth add foo_type --child varA --child varB[0] --child varC->packet->flags[1-4]
(you can use ., ->, single-item array operator [N] and bitfield operator [N-M]; array slice access is not supported, giving simplified names to expression paths is not supported)
- a new -S option to frame variable and target variable lets you override synthetic children and instead show real ones

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
1e620f0c6b953f86436a97fdd1d728648b4cdab1 20-Jul-2011 Enrico Granata <granata.enrico@gmail.com> type category list now supports a regular expression argument that filters categories to only include the ones matching the regex
type summary list now supports a -w flag with a regular expression argument that filters categories to only include the ones matching the regex
in category and summary listings, categories are printed in a meaningful order:
- enabled ones first, in the order in which they are searched for summaries
- disabled ones, in an unspecified order
type summary list by default only expands non-empty enabled categories. to obtain a full listing, you must use the -w flag giving a "match-all" regex

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
2bc9eb3ba78efc64a273729b480bafc3bbaa433a 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Patch by Matt Johnson to silence G++ warnings!
Used hand merge to apply the diffs. I did not apply the diffs for FormatManager.h and
the diffs for memberwise initialization for ValueObject.cpp because they changed since.
I will ask my colleague to apply them later.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
4c3fb4b50a87e6e08987096d7edacc26545f58dc 19-Jul-2011 Enrico Granata <granata.enrico@gmail.com> The implementation of categories is now synchronization safe
Code cleanup:
- The Format Manager implementation is now split between two files: FormatClasses.{h|cpp} where the
actual formatter classes (ValueFormat, SummaryFormat, ...) are implemented and
FormatManager.{h|cpp} where the infrastructure classes (FormatNavigator, FormatManager, ...)
are contained. The wrapper code always remains in Debugger.{h|cpp}
- Several leftover fields, methods and comments from previous design choices have been removed
type category subcommands (enable, disable, delete) now can take a list of category names as input
- for type category enable, saying "enable A B C" is the same as saying
enable C
enable B
enable A
(the ordering is relevant in enabling categories, and it is expected that a user typing
enable A B C wants to look into category A, then into B, then into C and not the other
way round)
- for the other two commands, the order is not really relevant (however, the same inverted ordering
is used for consistency)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
8a717e596312951672ecd8c54df2d255e6da20ba 19-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Fixed a bug where deleting a regex summary would not immediately reflect in the variables display
The "systemwide summaries" feature has been removed and replaced with a more general and
powerful mechanism.
Categories:
- summaries can now be grouped into buckets, called "categories" (it is expected that categories
correspond to libraries and/or runtime environments)
- to add a summary to a category, you can use the -w option to type summary add and give
a category name (e.g. type summary add -f "foo" foo_t -w foo_category)
- categories are by default disabled, which means LLDB will not look into them for summaries,
to enable a category use "type category enable". once a category is enabled, LLDB will
look into that category for summaries. the rules are quite trivial: every enabled category
is searched for an exact match. if an exact match is nowhere to be found, any match is
searched for in every enabled category (whether it involves cascading, going to base classes,
...). categories are searched into the order in which they were enabled (the most recently
enabled category first, then the second most and so on..)
- by default, most commands that deal with summaries, use a category named "default" if no
explicit -w parameter is given (the observable behavior of LLDB should not change when
categories are not explicitly used)
- the systemwide summaries are now part of a "system" category

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
7f163b363aeccffeec8eda23bd31e4965abc7226 16-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Some descriptive text for the Python script feature:
- help type summary add now gives some hints on how to use it
frame variable and target variable now have a --no-summary-depth (-Y) option:
- simply using -Y without an argument will skip one level of summaries, i.e.
your aggregate types will expand their children and display no summary, even
if they have one. children will behave normally
- using -Y<int>, as in -Y4, -Y7, ..., will skip as many levels of summaries as
given by the <int> parameter (obviously, -Y and -Y1 are the same thing). children
beneath the given depth level will behave normally
-Y0 is the same as omitting the --no-summary-depth parameter entirely
This option replaces the defined-but-unimplemented --no-summary

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
90d207ede88604e278f68ee1b02600a35e56dd14 16-Jul-2011 Enrico Granata <granata.enrico@gmail.com> System-wide summaries:
- Summaries for char*, const char* and char[] are loaded at startup as
system-wide summaries. This means you cannot delete them unless you use
the -a option to type summary delete/clear
- You can add your own system-wide summaries by using the -w option to type
summary add
Several code improvements for the Python summaries feature

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
f7a9b14c2c02d2fa9fad586c19f29d77533fcc09 15-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Python summary strings:
- you can use a Python script to write a summary string for data-types, in one of
three ways:
-P option and typing the script a line at a time
-s option and passing a one-line Python script
-F option and passing the name of a Python function
these options all work for the "type summary add" command
your Python code (if provided through -P or -s) is wrapped in a function
that accepts two parameters: valobj (a ValueObject) and dict (an LLDB
internal dictionary object). if you use -F and give a function name,
you're expected to define the function on your own and with the right
prototype. your function, however defined, must return a Python string
- test case for the Python summary feature
- a few quirks:
Python summaries cannot have names, and cannot use regex as type names
both issues will be fixed ASAP
major redesign of type summary code:
- type summary working with strings and type summary working with Python code
are two classes, with a common base class SummaryFormat
- SummaryFormat classes now are able to actively format objects rather than
just aggregating data
- cleaner code to print descriptions for summaries
the public API now exports a method to easily navigate a ValueObject hierarchy
New InputReaderEZ and PriorityPointerPair classes
Several minor fixes and improvements

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
1a102087f54079c25c8827afac6153a44ca535da 12-Jul-2011 Enrico Granata <granata.enrico@gmail.com> named summaries:
- a new --name option for "type summary add" lets you give a name to a summary
- a new --summary option for "frame variable" lets you bind a named summary to one or more variables
${var%s} now works for printing the value of 0-terminated CStrings
type format test case now tests for cascading
- this is disabled on GCC because GCC may end up stripping typedef chains, basically breaking cascading
new design for the FormatNavigator class
new template class CleanUp2 meant to support cleanup routines with 1 additional parameter beyond resource handle

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
1bba6e50d400090eb81efd7ab51957dfcbef06c0 07-Jul-2011 Enrico Granata <granata.enrico@gmail.com> new detailed descriptions for type summary add and type format add
some changes to the help system code for better display of long help text
-p and -r flags now also work for type format add


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
886bc3e5cb48e9660692609a7be69ec15b898bd7 02-Jul-2011 Enrico Granata <granata.enrico@gmail.com> several improvements to "type summary":
- type names can now be regular expressions (exact matching is done first, and is faster)
- integral (and floating) types can be printed as bitfields, i.e. ${var[low-high]} will extract bits low thru high of the value and print them
- array subscripts are supported, both for arrays and for pointers. the syntax is ${*var[low-high]}, or ${*var[]} to print the whole array (the latter only works for statically sized arrays)
- summary is now printed by default when a summary string references a variable. if that variable's type has no summary, value is printed instead. to force value, you can use %V as a format specifier
- basic support for ObjectiveC:
- ObjectiveC inheritance chains are now walked through
- %@ can be specified as a summary format, to print the ObjectiveC runtime description for an object
- some bug fixes

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
1391a391072a4b25c21b7198733ef7aa47a616c7 30-Jun-2011 Enrico Granata <granata.enrico@gmail.com> This commit adds a new top subcommand "summary" to command type named "type". Currently this command
implements three commands:

type summary add <format> <typename1> [<typename2> ...]
type summary delete <typename1> [<typename2> ...]
type summary list [<typename1> [<typename2>] ...]
type summary clear

This allows you to specify the default format that will be used to display
summaries for variables, shown when you use "frame variable" or "expression", or the SBValue classes.

Examples:
type summary add "x = ${var.x}" Point

type summary list

type summary add --one-liner SimpleType

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
fcfc118ebeae3c2b21d0605b16a151d238323ef1 24-Jun-2011 Johnny Chen <johnny.chen@apple.com> Add an initial test file for the newly added data formatter command.
main.cpp is contributed from Enrico.

Modify CommandObjectType.cpp to set status on the CommandReturnObject when succeeded as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
3182effd150f2e0381d7c6867236737ac69ad846 23-Jun-2011 Greg Clayton <gclayton@apple.com> Centralized all of the format to c-string and to format character code inside
the FormatManager class. Modified the format arguments in any commands to be
able to use a single character format, or a full format name, or a partial
format name if no full format names match.

Modified any code that was displaying formats to use the new FormatManager
calls so that our help text and errors never get out of date.

Modified the display of the "type format list" command to be a bit more
human readable by showing the format as a format string rather than the single
character format char.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp
5c28dd1daf8de701ce1eeb8f9b8d3e3b5e39ad50 23-Jun-2011 Greg Clayton <gclayton@apple.com> Committing type format code for Enrico Granata.

This commit adds a new top level command named "type". Currently this command
implements three commands:

type format add <format> <typename1> [<typename2> ...]
type format delete <typename1> [<typename2> ...]
type format list [<typename1> [<typename2>] ...]

This allows you to specify the default format that will be used to display
types when you use "frame variable" or "expression", or the SBValue classes.

Examples:

// Format uint*_t as hex
type format add x uint16_t uint32_t uint64_t

// Format intptr_t as a pointer
type format add p intptr_t

The format characters are the same as "printf" for the most part with many
additions. These format character specifiers are also used in many other
commands ("frame variable" for one). The current list of format characters
include:

a - char buffer
b - binary
B - boolean
c - char
C - printable char
d - signed decimal
e - float
f - float
g - float
i - signed decimal
I - complex integer
o - octal
O - OSType
p - pointer
s - c-string
u - unsigned decimal
x - hex
X - complex float
y - bytes
Y - bytes with ASCII




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Commands/CommandObjectType.cpp