[llvm-dev] Emitting output file information in Debug Info Metadata
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Tue Aug 22 18:30:22 PDT 2017
On Mon., 21 Aug. 2017, 3:50 pm Adrian Prantl via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
> > On Aug 21, 2017, at 3:17 PM, Zachary Turner <zturner at google.com> wrote:
> >
> > Hi all,
> >
> > In an effort to improve compatibility on the CodeView debug info side,
> we need to output a few new record types on the backend that don't seem to
> have the necessary info tracked by the debug info metadata. Specifically:
> >
> > 1) For each compile unit, we need to emit a record containing the output
> file name (e.g. foo.obj)
>
> It would probably be best to add this as new field to DICompileUnit.
>
Like the name of the dwo file, the name of the object isn't known at ir
generation time - for example in LTO situations. So this probably should be
passed down the same way the dwo name is - an MC option (I think that's
what I used) or backend option.
(Though I do have some questions about the need for this cv debug info - as
I mentioned on the associated llvm bug - though I don't recall the PR
number)
That's my guess.
> > 2) For each compile unit, we need to emit a record containing the full
> command line of the compiler invocation.
>
> When enabled, the clang codegen option CGOpts::DwarfDebugFlags already
> adds the command line to the DICompileUnit.
>
Agreed.
>
> > AFAICT, none of this information is in the debug info metadata. I've
> done a bunch of work on the backend of emitting debug info, but not so much
> on the front end. Where would be a good place to get started for looking
> into this?
>
> For (1) I would start by looking at the most recent patches that added new
> fields to DICompileUnit, such as the DebugInfoForProfiling flag.
>
> -- adrian
>
> _______________________________________________
> LLVM Developers mailing list
> 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/20170823/f0449532/attachment.html>
More information about the llvm-dev
mailing list