Index: gdb/value.c =================================================================== RCS file: /cvs/src/src/gdb/value.c,v retrieving revision 1.64 diff -u -p -r1.64 value.c --- gdb/value.c 11 Jun 2008 19:59:09 -0000 1.64 +++ gdb/value.c 9 Sep 2008 17:17:14 -0000 @@ -1415,8 +1415,8 @@ value_field (struct value *arg1, int fie */ struct value * -value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *type, - int offset) +value_fn_field (struct value **arg1p, struct fn_field *f, int j, + struct type *type, int offset) { struct value *v; struct type *ftype = TYPE_FN_FIELD_TYPE (f, j); @@ -1440,7 +1440,16 @@ value_fn_field (struct value **arg1p, st v = allocate_value (ftype); if (sym) { - VALUE_ADDRESS (v) = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)); + /* Constructors of non-virtual classes will not have block. */ + struct block *block = SYMBOL_BLOCK_VALUE (sym); + + if (block) + VALUE_ADDRESS (v) = BLOCK_START (block); + else + { + release_value (v); + return NULL; + } } else {