Fix crash on lval_computed values.
	* valops.c (value_zero): Use not_lval for lval_computed.

gdb/testsuite/
	Fix crash on lval_computed values.
	* gdb.dwarf2/implptr.exp (print sizeof (j[0])): New test.
This commit is contained in:
Jan Kratochvil 2011-07-27 19:25:56 +00:00
parent 2d5213f8bc
commit bb7da2bfb5
4 changed files with 12 additions and 1 deletions

View file

@ -860,7 +860,7 @@ value_zero (struct type *type, enum lval_type lv)
{
struct value *val = allocate_value (type);
VALUE_LVAL (val) = lv;
VALUE_LVAL (val) = (lv == lval_computed ? not_lval : lv);
return val;
}