<div dir="ltr">Hello,<br><br>Consider the following two functions:<br><br>void foo(int* arg_ptr) {<br>...<br>}<br><br>void bar(int arg_arr[42]) {<br>...<br>}<br><br>------<br><br>According to the C standard, both arguments will be passed to the function as pointers. However, in the debug information metadata generated in LLVM, it appears that they are also equivalent.<br>

<br>More specifically, for both arg_ptr and arg_arr I get a derived type descriptor with the DW_TAG_pointer_type tag, referencing 'int' as the type derived from, in argument 8 of the relevant MDNode. There is no way to know arg_arr is in the user's eyes an array.<br>

<br>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>Eli<br><br><br></div>