* NEWS: Update.

* c-typeprint.c (c_type_print_base): Handle print_method and
	print_typedefs flags.
	* gdbcmd.h (setprinttypelist, showprinttypelist): Declare.
	* python/py-type.c (typy_str): Use LA_PRINT_TYPE and raw
	options.
	* typeprint.c (type_print_raw_options, default_ptype_flags):
	Update for new field.s
	(whatis_exp): Parse flags.  Use LA_PRINT_TYPE.
	(setprinttypelist, showprinttypelist, print_methods,
	print_typedefs): New globals.
	(set_print_type, show_print_type, set_print_type_methods,
	show_print_type_methods, set_print_type_typedefs,
	show_print_type_typedefs): New functions.
	(_initialize_typeprint): Update documentation.  Add "print
	type methods" and "print type typedefs" parameters.
	* typeprint.h (struct type_print_options) <print_methods,
	print_typedefs>: New fields.
doc
	* gdb.texinfo (Symbols): Document "set print type methods",
	"set print type typedefs", and flags to ptype and whatis.
This commit is contained in:
Tom Tromey 2012-11-12 17:26:21 +00:00
parent 6c8702eb92
commit 53342f27db
9 changed files with 250 additions and 8 deletions

View file

@ -30,6 +30,7 @@
#include "vec.h"
#include "bcache.h"
#include "dwarf2loc.h"
#include "typeprint.h"
typedef struct pyty_type_object
{
@ -954,7 +955,8 @@ typy_str (PyObject *self)
stb = mem_fileopen ();
old_chain = make_cleanup_ui_file_delete (stb);
type_print (type_object_to_type (self), "", stb, -1);
LA_PRINT_TYPE (type_object_to_type (self), "", stb, -1, 0,
&type_print_raw_options);
thetype = ui_file_xstrdup (stb, &length);
do_cleanups (old_chain);