Boost logo

Boost Users :

Subject: Re: [Boost-users] Support of Pretty print
From: tom fogal (tfogal_at_[hidden])
Date: 2009-07-02 17:23:17


Mario Chacon <the.masch_at_[hidden]> writes:
> Sorry, yes I was referring the pretty print that Volodya said.
> So Is it possible to start with some libraries???

Just look at the ones in libstdc++. They look fairly obvious; you just
need to know the internal names for the data structures in question. I
don't think you really need a boost-specific example.

-tom

> On Fri, Jun 26, 2009 at 12:42 PM, Vladimir Prus
> <vladimir_at_[hidden]>wrote:
>
> > Zachary Turner wrote:
> >
> > > On Fri, Jun 26, 2009 at 9:49 AM, Mario Chacon<the.masch_at_[hidden]>
> > wrote:
> > >> eheh... I do not know enough to write pretty prints, it's will be help
> > if
> > >> there are some example that other can continue, Do you know if exist
> > some
> > >> pretty print boost exampless?
> > >>
> > >
> > >
> > > It's nothing specific to boost, you just have to learn the GDB macro
> > > language. One of the difficulties in writing GDB pretty prints is
> > > that, unlike with Visual Studio debug visualizers, GDB pretty printing
> > > does not happen "automatically". You have to write a special command
> > > for every single type you want to pretty print. "printboostvariant",
> > > "printboostany", "printboostfspath", etc. It's a little bit annoying
> > > for sure. You can get around this even by writing a GDB plugin.
> >
> > I guess much of confusion has resulted from the fact that Mario did not
> > say what exactly he is talking about. The GDB pretty-printers he mention
> > have nothing to do with that inadequate-for-anything GDB macro language.
> > These are Python pretty-printers. See:
> >
> > http://tromey.com/blog/?p=524
> >
> > These are also documented in the development version of the GDB.
> >
> > > If you want to write a GDB plugin, there is not as much available
> > > info, but you can refer to this page:
> > >
> > > http://sourceware.org/ml/gdb-patches/2008-05/msg00671.html
> > >
> > > in which someone submitted a plugin for GDB to automatically display
> > > correctly STL types just by using the normal "print" statement.
> >
> > That specific patch did not went further, since Python support was already
> > in development.
> >
> > - Volodya
> >
> >
> >
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
> >
>
> --000325572b8267bfec046d42c9d0
> Content-Type: text/html; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
>
> Sorry, yes I was referring the pretty print that Volodya said.<br>So Is it =
> possible to start with some libraries???<br><br>Salu2...<br>masch...<br><br=
> ><div class=3D"gmail_quote">On Fri, Jun 26, 2009 at 12:42 PM, Vladimir Prus=
> <span dir=3D"ltr">&lt;<a href=3D"mailto:vladimir_at_[hidden]">vladimi=
> r_at_[hidden]</a>&gt;</span> wrote:<br>
>
> <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
> 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class=3D"im"=
> >Zachary Turner wrote:<br>
> <br>
> &gt; On Fri, Jun 26, 2009 at 9:49 AM, Mario Chacon&lt;<a href=3D"mailto:the=
> .masch_at_[hidden]">the.masch_at_[hidden]</a>&gt; wrote:<br>
> &gt;&gt; eheh... I do not know enough to write pretty prints, it&#39;s will=
> be help if<br>
> &gt;&gt; there are some example that other can continue, Do you know if exi=
> st some<br>
> &gt;&gt; pretty print boost exampless?<br>
> &gt;&gt;<br>
> &gt;<br>
> &gt;<br>
> &gt; It&#39;s nothing specific to boost, you just have to learn the GDB mac=
> ro<br>
> &gt; language. =C2=A0One of the difficulties in writing GDB pretty prints i=
> s<br>
> &gt; that, unlike with Visual Studio debug visualizers, GDB pretty printing=
> <br>
> &gt; does not happen &quot;automatically&quot;. =C2=A0You have to write a s=
> pecial command<br>
> &gt; for every single type you want to pretty print. =C2=A0 &quot;printboos=
> tvariant&quot;,<br>
> &gt; &quot;printboostany&quot;, &quot;printboostfspath&quot;, etc. =C2=A0It=
> &#39;s a little bit annoying<br>
> &gt; for sure. =C2=A0You can get around this even by writing a GDB plugin.<=
> br>
> <br>
> </div>I guess much of confusion has resulted from the fact that Mario did n=
> ot<br>
> say what exactly he is talking about. The GDB pretty-printers he mention<br=
> >
> have nothing to do with that inadequate-for-anything GDB macro language.<br=
> >
> These are Python pretty-printers. See:<br>
> <br>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0<a href=3D"http://tromey.com/blog/?p=3D524" tar=
> get=3D"_blank">http://tromey.com/blog/?p=3D524><br>
> <br>
> These are also documented in the development version of the GDB.<br>
> <div class=3D"im"><br>
> &gt; If you want to write a GDB plugin, there is not as much available<br>
> &gt; info, but you can refer to this page:<br>
> &gt;<br>
> &gt; <a href=3D"
http://sourceware.org/ml/gdb-patches/2008-05/msg00671.html"=
> target=3D"_blank">http://sourceware.org/ml/gdb-patches/2008-05/msg00671.ht=
> ml</a><br>
> &gt;<br>
> &gt; in which someone submitted a plugin for GDB to automatically display<b=
> r>
> &gt; correctly STL types just by using the normal &quot;print&quot; stateme=
> nt.<br>
> <br>
> </div>That specific patch did not went further, since Python support was al=
> ready<br>
> in development.<br>
> <br>
> - Volodya<br>
> <div><div></div><div class=3D"h5"><br>
> <br>
> <br>
> _______________________________________________<br>
> Boost-users mailing list<br>
> <a href=3D"mailto:Boost-users_at_[hidden]">Boost-users_at_[hidden]<=
> /a><br>
> <a href=3D"http://lists.boost.org/mailman/listinfo.cgi/boost-users" target=
> =3D"_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users><br>
> </div></div></blockquote></div><br>
>
> --000325572b8267bfec046d42c9d0--
>
> --===============0305474003==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
>
http://lists.boost.org/mailman/listinfo.cgi/boost-users
> --===============0305474003==--


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net