This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [Ada] Enhance type printing for arrays with variable-sized elements


On 09/15/2015 06:06 PM, Joel Brobecker wrote:
This looks like an easy improvement. Thanks, Pierre-Marie!

Yes it is. ;-)

I'm curious - what happens if you do:

     (gdb) print a
     (gdb) ptype $

The concern is that $ refers to the resolved version of "A", and
that therefore we might lose the dynamic property. But I think it will
work in this case, because we do not resolve the array's element type
(each element of the actual array has to be resolved individually,
since the actual type changes from element to element).

It's worth extending your new testcase with the above scenario as well,
I think.

Huh, very interesting, thanks for raising this! Your intuition is correct: this already works for this reason. I've extended the testcase to check exactly this.

Other than that, the patch itself looks pretty good to me.

The updated patch is pushed. Thank you for reviewing!

--
Pierre-Marie de Rodat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]