<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Summary strings should have a way to run expressions"
href="http://llvm.org/bugs/show_bug.cgi?id=17472">17472</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Summary strings should have a way to run expressions
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Reporter</th>
<td>egranata@apple.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>LLDB includes a summary string feature that one can use to provide a summary
for a data type by providing a string that is then formatted with a bunch of
escape sequences and rules. For instance "foo=${var.foo%x}” amounts to
displaying
foo=<value of child member foo formatted as a hex number>
when evaluated as a summary
This ER requests the addition of a syntax through which expressions can be run
in order to generate a summary. For instance, if my class has a function
getUsefulString(), one could want to vend a summary that displays the useful
string. Currently, Python summaries are the way to achieve that effect, but it
would be nice if one could simply say something like
${expr:$VAR.getUsefulString()}
The ${expr: / $VAR syntax is in no way mandatory, and simply an example of a
proposal. However a syntax that seamlessly blends in with the current ${…
format is certainly a plus
Bonus points if the implementation is able to recognize a Foo from a Foo* and
automagically do the right thing w.r.t. dot vs arrow</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>