1

GDB 7.2 python doesn't have gdb.Type.iteritems method. Anyway I can access the members of the anonymous structure (which is within another structure of course) from gdb 7.2 ? The assumption is that I dont know know the name of the members of the anonymous structure or else I could have done gdb.parse_and_eval on them.

1 Answer 1

1

I think you can use Type.fields to iterate over the fields.

Then, you can look at the field offset and you can compute a pointer to the anonymous field, along the lines of (type *) (((char *) obj) + offset).

This isn't ideal. There is a bug open to implement something better.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.