[llvm-commits] Review request: generate DWARF pubnames under a compiler option

Eric Christopher echristo at gmail.com
Tue Jan 22 16:19:41 PST 2013


Hi Krzysztof,

Sorry for the delay, here's the review you wanted :)

+static cl::opt<bool>
GenerateDwarfPubNamesSection("generate-dwarf-pubnames",
+     cl::Hidden, cl::ZeroOrMore, cl::init(false),
+     cl::desc("Generate DWARF pubnames section"));

I'd prefer this be a debug info option and not a TLOF option, also you can
just check the file static then as well.

Not sure if there's a point in emitting the section in emitDebugPubNames
(can we make it emitDebugPubnames since we're adding it back?) if
Globals.size() == 0 either.

+  if (const MCSection *PNS = TLOF.getDwarfPubNamesSection())
+    emitSectionSym(Asm, PNS);

You'll probably want to just emit the sym if we're emitting the section,
that said, since we pretty much don't check for any of the other sections
no need for the check here. (and SwitchSection has an assert in it).

If you wouldn't mind fleshing out the pubnames testcase to make sure a
wider variety of items are emitted into the pubnames section, also
llvm-dwarfdump needs to parse the section for the testcase.

Thanks!

-eric


On Mon, Jan 14, 2013 at 11:20 AM, Krzysztof Parzyszek <
kparzysz at codeaurora.org> wrote:

> This is a patch to restore the generation of the pubnames section in the
> DWARF information.  The code is disabled by default and can be enabled with
> -generate-dwarf-pubnames.
>
> Please review.
>
> Thank you,
> -Krzysztof
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130122/8f30e454/attachment.html>


More information about the llvm-commits mailing list