* eval.c (evaluate_subexp_with_coercion): Add call to
 	check_typedef, to handle typedeffed vars correctly.

	* gdb.base/printcmds.c: Add typedeffed arrays.

	* gdb.base/printcmds.exp (test_print_typedef_arrays): New
 	procedure to test arrays that are typedef'd.
This commit is contained in:
Elena Zannoni
2000-03-14 17:01:05 +00:00
parent ee4dd2c975
commit 751a959bb8
5 changed files with 37 additions and 2 deletions

View File

@@ -1875,7 +1875,7 @@ evaluate_subexp_with_coercion (exp, pos, noside)
val =
locate_var_value
(var, block_innermost_frame (exp->elts[pc + 1].block));
return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (SYMBOL_TYPE (var))),
return value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (check_typedef (SYMBOL_TYPE (var)))),
val);
}
/* FALLTHROUGH */