2011-07-28 Phil Muldoon <pmuldoon@redhat.com>

* varobj.c (value_get_print_value): Move hint check later into the
	function.  Comment function.  Free thevalue before reusing it.

2011-07-28  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-mi.exp: Test printers returning string hint, and
	also not returning a value.
	* gdb.python/py-prettyprint.c: Add testcase for above.
	* gdb.python/py-prettyprint.py: Add test printer for above.
This commit is contained in:
Phil Muldoon
2011-07-28 10:36:40 +00:00
parent e89702a8bd
commit 00bd41d6bc
6 changed files with 71 additions and 9 deletions

View File

@ -149,6 +149,11 @@ struct justchildren
typedef struct justchildren nostring_type;
struct memory_error
{
const char *s;
};
struct container
{
string name;
@ -227,6 +232,7 @@ main ()
/* Clearing by being `static' could invoke an other GDB C++ bug. */
struct nullstr nullstr;
nostring_type nstype, nstype2;
struct memory_error me;
struct ns ns, ns2;
struct lazystring estring, estring2;
struct hint_error hint_error;
@ -234,6 +240,8 @@ main ()
nstype.elements = narray;
nstype.len = 0;
me.s = "blah";
init_ss(&ss, 1, 2);
init_ss(ssa+0, 3, 4);
init_ss(ssa+1, 5, 6);