[llvm-dev] Dynamic array debugging

via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 22 12:45:10 PST 2018


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

From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Nicholas Wilson via llvm-dev
Sent: Wednesday, February 21, 2018 9:15 PM
To: Peter McKinna
Cc: LLVM Developers
Subject: Re: [llvm-dev] Dynamic array debugging

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)


On 22 Feb 2018, at 12:46 pm, Peter McKinna via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:

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

_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180222/bfa40bff/attachment.html>


More information about the llvm-dev mailing list