2012-11-02  Yao Qi  <yao@codesourcery.com>

	* std-operator.def: Remove OP_LABELED.
	* eval.c: Remove the declaration of 'get_label'.
	(get_label): Remove.
	(evaluate_struct_tuple): Remove code handling OP_LABELED.
	Update comment.
	Remove local variable 'variantno' and related code.
	Replace 'substruct_type' with 'struct_type'.  Replace 'subfieldno'
	with 'fieldno'.
	* expprint.c (print_subexp_standard): Likewise.
	(dump_subexp_body_standard): Likewise.
	* parse.c (operator_length_standard): Likewise.

gdb/testsuite:

2012-11-02  Yao Qi  <yao@codesourcery.com>

	* gdb.base/setvar.exp: Test setting nested struct.
	* gdb.base/setvar.c (v_struct3): New.
This commit is contained in:
Yao Qi
2012-11-02 00:14:39 +00:00
parent 9ad9e68c61
commit f0559fff60
8 changed files with 72 additions and 175 deletions

View File

@ -328,21 +328,6 @@ print_subexp_standard (struct expression *exp, int *pos,
}
return;
case OP_LABELED:
tem = longest_to_int (exp->elts[pc + 1].longconst);
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
/* Gcc support both these syntaxes. Unsure which is preferred. */
#if 1
fputs_filtered (&exp->elts[pc + 2].string, stream);
fputs_filtered (": ", stream);
#else
fputs_filtered (".", stream);
fputs_filtered (&exp->elts[pc + 2].string, stream);
fputs_filtered ("=", stream);
#endif
print_subexp (exp, pos, stream, PREC_SUFFIX);
return;
case TERNOP_COND:
if ((int) prec > (int) PREC_COMMA)
fputs_filtered ("(", stream);
@ -1031,7 +1016,6 @@ dump_subexp_body_standard (struct expression *exp,
case OP_BOOL:
case OP_M2_STRING:
case OP_THIS:
case OP_LABELED:
case OP_NAME:
fprintf_filtered (stream, "Unknown format");
}