[llvm-dev] Have the debugger show an away with a dynamic size?

Levo DeLellis via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 13 10:03:00 PST 2020


Hi. I searched and the closest thing I could find was this
http://lists.llvm.org/pipermail/llvm-dev/2018-February/121348.html

Currently a known sized array looks and debugs as expected. I use
llvm.dbg.declare with DICompositeType tag: DW_TAG_array_type and the size
field. In my language arrays are always passed around with a pointer and
size pair. I'd like debugging to show up as nicely instead of a pointer
addr with no information about the elements. How would I do this? I don't
use the C API, I output llvm-ir directly. I was hoping I can call
llvm.dbg.declare/addr/value to specify the pointer, name and size of the
variable but I really have no idea how to pass the size to the debugger.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200213/0941e6d1/attachment.html>


More information about the llvm-dev mailing list