old-cross-binutils/gdb/python
Simon Marchi bed91f4da2 Fix accessing a function's fields (parameters) from Python (PR 18073)
Since 7.4, gdb doesn't allow calling .fields() on a function type, even
though the documentation states it should return a list corresponding to
the function's parameters.  This patch restores the intended behaviour
and adds a test for it.

Reg-tested on Arch Linux x86-64.

gdb/ChangeLog:

	PR python/18073
	* python/py-type.c (typy_get_composite): Allow returning a
	function type.

gdb/testsuite/ChangeLog:

	PR python/18073
	* gdb.python/py-type.c (C::a_method): New.
	(C::a_const_method): New.
	(C::a_static_method): New.
	(a_function): New.
	* gdb.python/py-type.exp (test_fields): Test getting fields
	from function and method.
2015-10-21 15:57:22 -04:00
..
lib/gdb
py-arch.c
py-auto-load.c
py-block.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-bpevent.c
py-breakpoint.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-cmd.c
py-continueevent.c
py-event.c
py-event.h
py-events.h
py-evtregistry.c
py-evts.c
py-exitedevent.c
py-finishbreakpoint.c
py-frame.c
py-framefilter.c
py-function.c
py-gdb-readline.c
py-inferior.c Change some void* to gdb_byte* 2015-10-09 10:08:23 -04:00
py-infevents.c
py-infthread.c
py-lazy-string.c
py-linetable.c
py-newobjfileevent.c
py-objfile.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-param.c
py-prettyprint.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-progspace.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-symtab.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-threadevent.c
py-type.c Fix accessing a function's fields (parameters) from Python (PR 18073) 2015-10-21 15:57:22 -04:00
py-unwind.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-utils.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-value.c
py-varobj.c
py-xmethods.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
python-config.py
python-internal.h
python.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
python.h