binutils-gdb/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 PR python/17136 2015-08-06 09:24:58 -07:00
py-arch.c Split TRY_CATCH into TRY + CATCH 2015-03-07 15:14:14 +00:00
py-auto-load.c
py-block.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-bpevent.c Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
py-breakpoint.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-cmd.c Add casts to memory allocation related calls 2015-09-25 14:08:06 -04:00
py-continueevent.c Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
py-event.c
py-event.h Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
py-events.h
py-evtregistry.c Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
py-evts.c
py-exitedevent.c Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
py-finishbreakpoint.c Garbage collect dummy_frame_ctx_saver 2015-09-09 18:25:15 +01:00
py-frame.c DWARF: handle non-local references in nested functions 2015-08-25 08:13:28 -04:00
py-framefilter.c DWARF: handle non-local references in nested functions 2015-08-25 08:13:28 -04:00
py-function.c Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
py-gdb-readline.c Add casts to memory allocation related calls 2015-09-25 14:08:06 -04:00
py-inferior.c Change some void* to gdb_byte* 2015-10-09 10:08:23 -04:00
py-infevents.c Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
py-infthread.c Split TRY_CATCH into TRY + CATCH 2015-03-07 15:14:14 +00:00
py-lazy-string.c PR python/18438 2015-05-26 16:13:04 -07:00
py-linetable.c python: fix Linetable case to LineTable in docstrings and comments 2015-08-04 09:50:53 -07:00
py-newobjfileevent.c Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
py-objfile.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
py-param.c Replace some xmalloc-family functions with XNEW-family ones 2015-08-26 17:18:12 -04:00
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 Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
py-stopevent.c Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
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 Fix redefinition errors in C++ mode 2015-02-11 11:20:21 +00:00
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 Replace some xmalloc-family functions with XNEW-family ones 2015-08-26 17:18:12 -04:00
py-varobj.c Replace some xmalloc-family functions with XNEW-family ones 2015-08-26 17:18:12 -04:00
py-xmethods.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
python-config.py
python-internal.h Remove redundant include directives. 2015-06-24 13:52:29 +01:00
python.c Add some more casts (2/2) 2015-09-25 14:08:07 -04:00
python.h