This is the mail archive of the
mailing list for the GDB project.
Re: lack of "info pretty-printer" in gdb 7.2 and 7.7
- From: Doug Evans <dje at google dot com>
- To: LukÃcs IstvÃn <lukacs dot istvan dot 83 at gmail dot com>
- Cc: gdb <gdb at sourceware dot org>
- Date: Fri, 2 May 2014 10:32:51 -0700
- Subject: Re: lack of "info pretty-printer" in gdb 7.2 and 7.7
- Authentication-results: sourceware.org; auth=none
- References: <CACnu1RwuQO8n-wezuMbW1V3pRLP-16jugZpgJ8wxD+nVHf-fXw at mail dot gmail dot com>
On Wed, Apr 30, 2014 at 2:19 AM, LukÃcs IstvÃn
> 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_ 22.214.171.124-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:
> I checked out the stlPrettyPrinter and updated my .gdbinit file as well.
> In gdb, there is python support:
> (gdb) python print(123)
> Could you help me to be able to use this feature in gdb?
"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.