GDB pretty-printers for glibc?

Siddhesh Poyarekar
Thu Jul 13 06:14:00 GMT 2017

On 13 July 2017 at 01:29, Paul Smith <> wrote:
> Sure, I wasn't suggesting that it would be checked in or distributed
> separately from the Git repo (although I will try filing a bug with
> Debian requesting they add these pretty-printers to one of their glibc
> dbg or dev packages).

Right, they're intended to be distributed in the dev packages with a
dependency on the exact name version and release of the library

> But it seems like the conversion from the .pysym -> .py doesn't require
> _compiling_ the entire glibc source tree... just configuring,
> generating headers, etc., and compiling the output of the awk script
> should be sufficient.
> A special make target like "make py-const-files" or something could be
> created that would do those steps without compiling all the C code.
> At least based on my limited investigation.

I agree it is quite trivial to actually get it working, just that a
general utility of adding a change to the Makefile to do that is
debatable.  It is worth a wider discussion (and I don't oppose the
target either, I just don't feel strongly enough about it to argue
either way) so please feel free to post a patch on the libc-alpha
mailing list.

Maybe when you document the target in README.pretty-printers, you
could specify that this is just for testing and that ABI differences
may prevent such a generated pretty printer from working with another
version of glibc.  That should cover all bases I think.


More information about the Libc-help mailing list