X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fp-exp.y;h=85ef4bd385297a7ee2a31bbff27140f92aae2f6d;hb=940da03e32c28144134d0373faf7fd5ea158f1ae;hp=6403e410571656d971faea7f3a6ce1bc17467995;hpb=b6cdac4b80c1d32726227305e16483cef9d40e2c;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/p-exp.y b/gdb/p-exp.y index 6403e41057..85ef4bd385 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -316,8 +316,9 @@ exp : exp '[' stringsval.ptr = buf; stringsval.length = strlen (arrayname); strcpy (buf, arrayname); - current_type = TYPE_FIELD_TYPE (current_type, - arrayfieldindex - 1); + current_type + = (current_type + ->field (arrayfieldindex - 1).type ()); write_exp_elt_opcode (pstate, STRUCTOP_STRUCT); write_exp_string (pstate, stringsval); write_exp_elt_opcode (pstate, STRUCTOP_STRUCT);