This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

considering changes to pretty-printing


I've been working on a fairly complete set of pretty-printers for
libstdc++.  I thought this would help point out problems.

>From this, I learned two things I would like to change.


First, I'd like to completely unify the MI- and CLI-cases.  I haven't
wanted to separate the two yet and I think it would be simpler, and
would allow some nice features, if the two cases were treated
identically.

For example, consider std::queue.  This is a container adapter, not a
container.  So, we want to delegate pretty-printing to the underlying
container's printer.  But how do we find that?  If we have unified the
two cases, we can call gdb.get_default_visualizer.


Second, I'd like to change how visualizers are constructed.  Right now
we pass a value to the to_string and children methods.  Instead, I'd
like to simply pass the value to the constructor.  In the MI case, I'd
then like to make a new visualizer each time a refresh is done.

I think this is preferable because it better reflects the typical
implementation of a visualizer.  Smart caching is still possible by
having the visualizer "constructor" be a smarter function.

Please comment.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]