<div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">
> This reflects the compiler's view of things correctly, but is problematic for a debugger. The debugger should know that arg_arr refers to a 42-element array and isn't just a pointer into a buffer of unspecified length. This is something the user would expect.<br>


> On the other hand, the debugger should also get the information that arg_arr is actually a pointer, to be able to get to its values correctly.<br>
><br>
> Is there a way out?<br>
<br>
</div></div>The only way out is to figure out how to distinguish between these two in front-end AST nodes while emitting LLVM IR. The part of front end that emits debug info for an argument is seeing arg_arr as a pointer to int.<br>


<br>
If you manually patch metadata in llvm IR then you'll get debug info as you expect.<br>
-<br></blockquote></div><br>Suppose one would start writing a patch to Clang to rectify this, how would this information be encoded in the debug metadata, given the dual nature of the arg_arr argument? Is there a mechanism to support it, or is an extension required?<br>

<br>Thanks in advance<br>Eli<br><br><br><br><br><br><br></div>