This is the mail archive of the mailing list for the GDB 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]

How to load C++ pretty-printers

I have a question regarding loading the C++ pretty-printers provided
by GCC.  This might be specific to MS-Windows, not sure.

So I have the C++ pretty-printers installed in
d:/usr/share/gcc-7.3.0/python/libstdcxx/v6.  I start GDB to debug
itself.  The "info pretty-printer" command says:

  (top-gdb) info pretty-printer
  global pretty-printers:
    objfile D:\gnu\gdb-8.2\gdb\gdb.exe pretty-printers:

This doesn't seem to mention the GCC-provided C++ pretty-printers.  So
I start the inferior GDB running:

  (top-gdb) start --config

After that, "info pretty-printers" still shows no C++ pretty-printers.
OK, me thinks, this could be because libstdc++ is statically linked
into GDB, so I load the pretty-printers by hand:

  (top-gdb) source d:/usr/share/gcc-7.3.0/python/libstdcxx/v6/

But "info pretty-printers" command still doesn't show the C++
pretty-printers I just loaded.

What am I missing here?  How does one load and enable the C++
pretty-printers provided with GCC?  Do I need some magic in my
~/.gdbinit file to do that?


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