[PATCH] Fix bug in dynamic type resolution

Tom Tromey tromey@adacore.com
Tue Oct 19 19:03:42 GMT 2021


>>>>> "Tom" == Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> writes:

Tom> A customer-reported problem led us to a bug in dynamic type
Tom> resolution.  resolve_dynamic_struct will recursively call
Tom> resolve_dynamic_type_internal, passing it the sub-object for the
Tom> particular field being resolved.  While it offsets the address here,
Tom> it does not also offset the "valaddr" -- the array of bytes describing
Tom> the memory.

Tom> This patch fixes the bug, by offsetting both.  A test case is included
Tom> that can be used to reproduce the bug.

I'm checking this in now.

Tom


More information about the Gdb-patches mailing list