Dynamic array debugging

Hi,

Does anyone have any hints as to how one might generate debug info for dynamic arrays using the DIBuilder class?
In this particular case, the length of the array is in the second word of the variable. Just taking the
one dimensional case first and see if I can get that working before moving to higher dimensions.

Thanks

With a struct that is {T* ptr; size_t length}

e.g.
https://github.com/ldc-developers/ldc/blob/master/gen/dibuilder.cpp#L531
(only difference is that our dynamic arrays are length then pointer)

Recently there was work done to support C’s VLAs, I should think you’d be able to make use of that. The bound or count would point to your length field.

–paulr