[LLVMdev] debug metadata incomplete for array arguments to functions?

Renato Golin renato.golin at arm.com
Fri Jul 15 01:27:42 PDT 2011


On 15 July 2011 05:35, Eli Bendersky <eliben at gmail.com> wrote:
> 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?

Hi Eli,

The first thing is to make sure it actually makes any difference. I'd
get an IR that is valid and can be debugged (but prints the wrong
declaration) and start by changing manually the metadata in the IR
until it achieves what you want (to work AND print the correct
declaration). Only then I'd start changing Clang...

Dwarf is too generic and debuggers' support is too ad-hoc for one to
say "correct implementation". I wouldn't assume anything before seeing
it working on a number of debuggers. Dwarf can be syntactically
correct and not be understood by some debuggers, but it can't ever be
syntactically incorrect, which I gather from your comment that it's
not in your case.

You can also see what other tool-chains generate from your example. It
may be the quickest path to get the right answer.

cheers,
--renato



More information about the llvm-dev mailing list