Re: lack of "info pretty-printer" in gdb 7.2 and 7.7
Doug Evans <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CADPb22Skd4QseQs=pYoM1qb6eHV9ZNDiNTTQXXZy23AsuQ72vg@mail.gmail.com> |
On Wed, Apr 30, 2014 at 2:19 AM, Lukács István <[email protected]> wrote: > Dear Community, > > I would like to use pretty printer feature during debugging. > I built the programs gdb 7.2 and gdb 7.7. > > My problem is the following: when I call "help info" command, there is > a lack of "info pretty-printer" in the output of previous command. > > This is the output of "apropos pretty": > (gdb) apropos pretty > set print array -- Set pretty formatting of arrays > set print pretty -- Set pretty formatting of structures > set print raw frame-arguments -- Set whether to print frame arguments > in raw form > show print array -- Show pretty formatting of arrays > show print pretty -- Show pretty formatting of structures > show print raw frame-arguments -- Show whether to print frame > arguments in raw form > > My build command was the following: > "/configure --prefix=/usr --with-python && make" > My system is: > Linux _myhostname_ 2.6.27.54-0.2-default #1 SMP 2010-10-19 18:40:07 > +0200 x86_64 x86_64 x86_64 GNU/Linux > > On the basis of this page: > http://lumiera.org/documentation/technical/howto/DebugGdbPretty.html > I checked out the stlPrettyPrinter and updated my .gdbinit file as well. > > In gdb, there is python support: > (gdb) python print(123) > 123 > > Could you help me to be able to use this feature in gdb? Hi. "info pretty-printer" is a gdb command implemented in Python. So the question is: Why didn't your gdb load its ancillary python files when it started. In the gdb source tree the ancillary python support lives in gdb/python/lib. When installed with --prefix=/usr, the files live in /usr/share/gdb/python. gdb will print an error message if it can't load its Python support. It would be useful to provide an *entire* gdb session showing the problem (including the command used to start gdb). Then we can see whether this error message is being printed.