MPS issue job003767

TitleDescribe output is hard to read
Assigned userGareth Rees
DescriptionThe output from Describe functions is hard to read because the indentation does not match the logical structure. For example, GlobalsDescribe describes the pools, and the pools describe their formats, but all of these structures appear with no indentation, so it is hard to see which formats belong to which pools.
AnalysisPossible solutions:

1. Write some kind of Emacs mode that watches your gdb or lldb session and indents the output. But this wouldn't work when debugging via Xcode.

2. All the information to maintain the indentation level is already in the format strings: we consistently use { to increase the indent level and } to reduce it. So read these characters and adjust indentation accordingly. But this violates design.mps.writef.snazzy [1]

3. Add a depth parameter to WriteF; if this is greater than zero, output indentation at the start of each line. Add a depth parameter to all the Describe functions and adjust it so that the indentation is correct.
How foundmanual_test
Evidence[1] <>
Created byGareth Rees
Created on2014-04-17 12:14:23
Last modified byGareth Rees
Last modified on2014-06-12 14:04:56
History2014-04-17 GDR Created.


Change Effect Date User Description
186528 closed 2014-06-12 14:04:54 Gareth Rees Merge branch/2014-04-17/describe into the master sources.