Commit Graph

32 Commits

Author SHA1 Message Date
Greg Clayton 281b65bcde Update documenation for the changed in from ${var.script:<pythonfunction>} to the new ${script.var:<pythonfunction>}.
llvm-svn: 228216
2015-02-04 22:24:47 +00:00
Enrico Granata e8eb47037c Just a few words to introduce the extra optional argument to Python summaries
llvm-svn: 222594
2014-11-22 00:06:30 +00:00
Enrico Granata 90ff6428c9 Add a few words of documentation for the the $\{var.script:\} feature
llvm-svn: 220823
2014-10-28 21:13:31 +00:00
Enrico Granata 8387e2fafe Add a (Python only) lldb.SBSyntheticValueProvider class to our API surface
On a suggestion from Jim Ingham, this class allows you to very easily define synthetic child providers that return a synthetic value (in the sense of r219330), but no children

Also, document this new feature in our www docs

llvm-svn: 219337
2014-10-08 20:10:09 +00:00
Enrico Granata cf2412d41d Tweak documentation for formats in categories
llvm-svn: 192235
2013-10-08 21:07:22 +00:00
Daniel Malea dece1a5c5c Add links to LLDB API reference docs
llvm-svn: 186699
2013-07-19 17:33:02 +00:00
Enrico Granata 8e698323ec A few cleanups for our documentation
llvm-svn: 183058
2013-05-31 22:54:23 +00:00
Enrico Granata e5631635bf Lastly, a few synthetic children classes for Cocoa are available
llvm-svn: 175591
2013-02-20 02:27:07 +00:00
Enrico Granata 710d88fd64 And the NSString formatter is not Python anymore
llvm-svn: 175590
2013-02-20 02:24:20 +00:00
Enrico Granata df21e40f94 Data formatters are not a *recent* addition...
llvm-svn: 175589
2013-02-20 02:22:00 +00:00
Enrico Granata 44818163ed <rdar://problem/12523238> Commit 3 of 3
Changed all relevant test cases to verify that MightHaveChildren() works correctly for objects of interest
Added a bunch of convenience methods for test cases to use: target(), process(), thread() and frame() which mimic the lldb.X convenience variables
As a bonus, edited the documentation on the website to describe the new method available for synthetic children providers writers to implement!

That's all folks!

llvm-svn: 166535
2012-10-24 01:23:57 +00:00
Enrico Granata 40d557107f <rdar://problem/11975483> Removing user-visible references to 'dict' as a parameter name for Python summary-generating functions since it is a Python keyword.
llvm-svn: 161467
2012-08-08 02:06:30 +00:00
Enrico Granata 2980927107 Update the docs to reflect the recent changes to categories
llvm-svn: 156020
2012-05-02 21:13:16 +00:00
Enrico Granata 4a3274af96 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

llvm-svn: 153272
2012-03-22 19:55:55 +00:00
Enrico Granata a7a3a4c79e Editing documentation to reflect recent changes in the formatters support
llvm-svn: 153068
2012-03-19 23:57:06 +00:00
Enrico Granata 3713cadd09 Changed the URL to the CFString summary provider; slightly reworded the relevant piece of content
llvm-svn: 152972
2012-03-17 02:14:46 +00:00
Enrico Granata 0fddd5631d Pointing users to a new example of synthetic children provider en lieu of the old StdVector example which was removed earlier today
llvm-svn: 152971
2012-03-17 02:04:20 +00:00
Enrico Granata d769c128b6 other documentation changes
llvm-svn: 139271
2011-09-08 00:50:01 +00:00
Enrico Granata 645a763d72 documentation changes (WIP)
llvm-svn: 139249
2011-09-07 19:20:42 +00:00
Enrico Granata 45403f31f1 Documentation edits: correcting typos, adding information and general tweaks for readability
llvm-svn: 138442
2011-08-24 17:12:47 +00:00
Enrico Granata c5df00f0b9 Documentation on dynamic types (WIP)
llvm-svn: 138425
2011-08-24 04:53:31 +00:00
Enrico Granata 83cfc9abf8 Minor documentation changes (WIP)
llvm-svn: 138423
2011-08-24 01:49:09 +00:00
Enrico Granata 64997d6c0e More documentation changes (WIP)
llvm-svn: 138421
2011-08-24 01:32:46 +00:00
Enrico Granata 88da35f881 Improved the user-friendliness of errors shown by the summary feature in certain areas
Renamed format "signed decimal" to be "decimal". "unsigned decimal" remains unchanged:
 - the name "signed decimal" was interfering with symbol %S (use summary) in summary strings.
   because of the way summary strings are implemented, this did not really lead to a bug, but
   simply to performing more steps than necessary to display a summary. this is fixed.
Documentation improvements (more on synthetic children, some information on filters). This is still a WIP.

llvm-svn: 138384
2011-08-23 21:26:09 +00:00
Enrico Granata 5a61fc0da5 Exception-awareness for gnu_libstdcpp formatters ; Documentation update
llvm-svn: 138236
2011-08-22 16:10:25 +00:00
Enrico Granata d55546b27a 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

llvm-svn: 135731
2011-07-22 00:16:08 +00:00
Enrico Granata 1490c6fd8f 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

llvm-svn: 135463
2011-07-19 02:34:21 +00:00
Enrico Granata f2bbf717f7 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

llvm-svn: 135238
2011-07-15 02:26:42 +00:00
Enrico Granata 79dce0a66e fixing missing RefCounter class
llvm-svn: 135012
2011-07-13 00:00:57 +00:00
Enrico Granata f4efecd958 smarter summary strings:
- formats %s %char[] %c and %a now work to print 0-terminated c-strings if they are applied to a char* or char[] even without the [] operator (e.g. ${var%s})
 - array formats (char[], intN[], ..) now work when applied to an array of a scalar type even without the [] operator (e.g. ${var%int32_t[]})
LLDB will not crash because of endless loop when trying to obtain a summary for an object that has no value and references itself in its summary string
In many cases, a wrong summary string will now display an "<error>" message instead of giving out an empty string

llvm-svn: 135007
2011-07-12 22:56:10 +00:00
Enrico Granata fc7a7f3b75 final fix for the global constructors issue
new GetValueForExpressionPath() method in ValueObject to navigate expression paths in a more bitfield vs slices aware way
changes to the varformats.html document (WIP)

llvm-svn: 134679
2011-07-08 02:51:01 +00:00
Enrico Granata 8f11a4ac96 new webpage describing type command
llvm-svn: 134575
2011-07-07 00:39:55 +00:00