Go to file
Jonathan Wakely 9d50a6a785 libstdc++:: improve how pretty printers find node types (PR 91997)
This fixes two related problems.

The iterators for node-based containers use nested typedefs such as
std::list<T>::iterator::_Node to denote their node types. As reported in
https://bugzilla.redhat.com/show_bug.cgi?id=1053438 those typedefs are
not always present in the debug info. That means the pretty printers
cannot find them using gdb.lookup_type (via the find_type helper).
Instead of looking up the nested typedefs this patch makes the printers
look up the actual class templates directly.

A related problem (and the original topic of PR 91997) is that GDB fails
to find types via gdb.lookup_type when printing a backtrace from a
non-C++ functiion: https://sourceware.org/bugzilla/show_bug.cgi?id=25234
That is also solved by not looking up the nested typedef.

	PR libstdc++/91997
	* python/libstdcxx/v6/printers.py (find_type): Fail more gracefully
	if we run out of base classes to look at.
	(llokup_templ_spec, lookup_node_type): New utilities to find node
	types for node-based containers.
	(StdListPrinter.children, NodeIteratorPrinter.__init__)
	(NodeIteratorPrinter.to_string, StdSlistPrinter.children)
	(StdSlistIteratorPrinter.to_string, StdRbtreeIteratorPrinter.__init__)
	(StdMapPrinter.children, StdSetPrinter.children)
	(StdForwardListPrinter.children): Use lookup_node_type instead of
	find_type.
	(StdListIteratorPrinter.__init__, StdFwdListIteratorPrinter.__init__):
	Pass name of node type to NodeIteratorPrinter constructor.
	(Tr1HashtableIterator.__init__): Rename argument.
	(StdHashtableIterator.__init__): Likewise. Use lookup_templ_spec
	instead of find_type.
	* testsuite/libstdc++-prettyprinters/59161.cc: Remove workaround for
	_Node typedef not being present in debuginfo.
	* testsuite/libstdc++-prettyprinters/91997.cc: New test.

From-SVN: r278846
2019-11-29 14:47:03 +00:00
INSTALL
config [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
contrib download_prerequisites: Use http instead of ftp for downloading. 2019-11-13 19:48:52 +02:00
fixincludes
gcc tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Bail out early for too large objects. 2019-11-29 13:53:10 +00:00
gnattools
gotools libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
include [PATCH] Fix slowness in demangler 2019-11-16 10:14:14 -07:00
intl
libada libada: Respect `--enable-version-specific-runtime-libs' 2019-10-01 19:14:11 +00:00
libatomic Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libbacktrace Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libcc1 typeck.c (cp_build_indirect_ref_1): Add location_t parameter and use it in error messages. 2019-11-25 13:49:50 +00:00
libcpp Support UTF-8 character constants for C2x. 2019-11-14 20:18:33 +00:00
libdecnumber
libffi Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libgcc fix ChangeLog to reference the PR 2019-11-18 12:46:56 +00:00
libgfortran re PR libfortran/90374 (Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d and ew.d e0 edit descriptors for output) 2019-11-28 18:33:20 +00:00
libgo re PR go/92605 (r278509 causes/reveals issue in building go library) 2019-11-21 01:06:47 +00:00
libgomp Fortran] OpenACC – permit common blocks in some clauses 2019-11-29 14:59:21 +01:00
libhsail-rt Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libiberty [PATCH] Fix slowness in demangler 2019-11-16 10:14:14 -07:00
libitm Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libobjc Unbreak objc build – with --enable-maintainer-mode 2019-11-26 21:16:30 +01:00
liboffloadmic Regenerate `liboffloadmic/plugin/configure' for r275564 ("[ARM/FDPIC v6 02/24] [ARM] FDPIC... 2019-10-01 19:57:44 +00:00
libphobos Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libquadmath Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libsanitizer re PR sanitizer/92154 (new glibc breaks arm bootstrap due to libsanitizer) 2019-11-26 10:08:31 +01:00
libssp Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libstdc++-v3 libstdc++:: improve how pretty printers find node types (PR 91997) 2019-11-29 14:47:03 +00:00
libvtv Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
lto-plugin Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
maintainer-scripts Switch gcc ftp URL's to https 2019-11-20 22:24:48 +02:00
zlib Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
.dir-locals.el
.gitattributes * .gitattributes: Also check ChangeLog whitespace. 2019-10-21 23:12:04 -04:00
.gitignore Add .clangd and compile_commands.json to .gitignore. 2019-08-28 19:33:28 +00:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog PR 92463 - Cleanups due to minimum MPFR version bump to 3.1.0 2019-11-27 10:16:24 +01:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS Remove my name from AArch64 port maintainers 2019-11-20 09:29:13 +00:00
Makefile.def
Makefile.in
Makefile.tpl
README
ar-lib
compile
config-ml.in
config.guess Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
config.rpath
config.sub Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
configure PR 92463 - Cleanups due to minimum MPFR version bump to 3.1.0 2019-11-27 10:16:24 +01:00
configure.ac PR 92463 - Cleanups due to minimum MPFR version bump to 3.1.0 2019-11-27 10:16:24 +01:00
depcomp
install-sh
libtool-ldflags
libtool.m4 [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
symlink-tree
test-driver
ylwrap

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.