binutils-gdb/gdb/doc
Andrew Burgess 9f9aa85206 gdb: Make python display_hint None handling defined behaviour
The documentation say that the display_hint method must return a
string to serve as a display hint, and then goes on to list some
acceptable strings.

However, if we don't supply the display_hint method then we get a
default display style behaviour and there's currently no way (in the
python api) to force this default behaviour.

The guile api allows #f to be used in order to force the default
display style behaviour, and this is documented.

Currently, using None in the python api also forces the default
display behaviour.

This commit extends the documentation to make returning None from the
display_hint method an official mechanism by which the user can get
the default display style.

I've extended one of the existing tests to cover this case.

gdb/doc/ChangeLog:

	* python.texi (Pretty Printing API): Document use of None for the
	display_hint.

gdb/testsuite/ChangeLog:

	* gdb.python/py-prettyprint.c (struct container) <is_map_p>: New
	field.
	(make_container): Initialise new field.
	* gdb.python/py-prettyprint.exp: Add new tests.
	* gdb.python/py-prettyprint.py (class ContainerPrinter)
	<display_hint>: New method.
2019-03-26 18:25:10 +00:00
..
.gitignore
a4rc.sed
agentexpr.texi
all-cfg.texi
annotate.texinfo
ChangeLog gdb: Make python display_hint None handling defined behaviour 2019-03-26 18:25:10 +00:00
doxy-index.in
Doxyfile-base.in
Doxyfile-gdb-api.in
Doxyfile-gdb-xref.in
Doxyfile-gdbserver.in
fdl.texi
filter-for-doxygen
filter-params.pl
gdb.texinfo
gpl.texi
guile.texi
lpsrc.sed
Makefile.in
psrc.sed
python.texi gdb: Make python display_hint None handling defined behaviour 2019-03-26 18:25:10 +00:00
refcard.tex
stabs.texinfo
stack_frame.eps
stack_frame.pdf
stack_frame.png
stack_frame.svg
stack_frame.txt