binutils-gdb/gdb/python
Tom Tromey 42331a1ea2 Change extension language pretty-printers to use value API
This changes the extension language pretty-printers to use the value
API.

Note that new functions were needed, for both Guile and Python.
Currently both languages always wrap values by removing the values
from the value chain.  This makes sense to avoid strange behavior with
watchpoints, and to avoid excessive memory use.  However, when
printing, it's important to leave the passed-in value untouched, in
case pretty-printing does nothing -- that way the caller can still
access it.

gdb/ChangeLog
2020-03-13  Tom Tromey  <tom@tromey.com>

	* valprint.c (do_val_print): Update.
	* python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
	a struct value.
	(value_to_value_object_no_release): Declare.
	* python/py-value.c (value_to_value_object_no_release): New
	function.
	* python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
	struct value.
	* guile/scm-value.c (vlscm_scm_from_value_no_release): New
	function.
	* guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
	a struct value.
	* guile/guile-internal.h (vlscm_scm_from_value_no_release):
	Declare.
	(gdbscm_apply_val_pretty_printer): Take a struct value.
	* extension.h (apply_ext_lang_val_pretty_printer): Take a struct
	value.
	* extension.c (apply_ext_lang_val_pretty_printer): Take a struct
	value.
	* extension-priv.h (struct extension_language_ops)
	<apply_val_pretty_printer>: Take a struct value.
	* cp-valprint.c (cp_print_value): Create a struct value.
	(cp_print_value): Update.
2020-03-13 18:03:42 -06:00
..
lib/gdb Allow use of Pygments to colorize source code 2020-01-21 12:39:17 -07:00
py-all-events.def Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-arch.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-auto-load.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-block.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-bpevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-breakpoint.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-cmd.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-continueevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-event-types.def Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-event.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-event.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-events.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-evtregistry.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-evts.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-exitedevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-finishbreakpoint.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-frame.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-framefilter.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-function.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-gdb-readline.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-inferior.c gdb: remove use of iterate_over_inferiors in py-inferior.c 2020-01-17 09:51:10 -05:00
py-infevents.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-infthread.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-instruction.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-instruction.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-lazy-string.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-linetable.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-newobjfileevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-objfile.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-param.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-prettyprint.c Change extension language pretty-printers to use value API 2020-03-13 18:03:42 -06:00
py-progspace.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record-btrace.c Fix some spelling errors. 2020-01-16 16:46:25 -06:00
py-record-btrace.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record-full.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record-full.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-ref.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-signalevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-stopevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-stopevent.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-symbol.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-symtab.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-threadevent.c Multi-target support 2020-01-10 20:06:08 +00:00
py-tui.c Allow TUI windows in Python 2020-02-22 12:57:25 -07:00
py-type.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-unwind.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-utils.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-value.c Change extension language pretty-printers to use value API 2020-03-13 18:03:42 -06:00
py-varobj.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-xmethods.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
python-config.py configure uses incorrect link order when testing libpython 2018-05-04 10:08:09 -04:00
python-internal.h Change extension language pretty-printers to use value API 2020-03-13 18:03:42 -06:00
python.c Allow TUI windows in Python 2020-02-22 12:57:25 -07:00
python.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00