[PATCH] D16697: Updating .debug_line section version information to match DWARF version.
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 28 16:57:55 PST 2016
+Adrian for Apple/LLDB perspective
One way to merge the tests would be to add another command line argument
into DwarfDebug (see the way the split-dwarf command line argument is
used), just for testing purposes. The command line argument can override
the value specified in the metadata - so you can have one input file for
the 3 different versions.
On Thu, Jan 28, 2016 at 4:28 PM, Katya Romanova via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> kromanova created this revision.
> kromanova added reviewers: dblaikie, echristo, probinson.
> kromanova added a subscriber: cfe-commits.
> kromanova set the repository for this revision to rL LLVM.
> The compiler always emits .debug_line version 2, though some opcodes from
> DWARF 3 (e.g. DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin or
> DW_LNS_set_isa) and from DWARF 4 could be emitted by the compiler. That's
> not exactly right.
> This patch changes version information of .debug_line to exactly match the
> DWARF version (which is 4 by default).
> For .debug_line version 4, a new field maximum_operations_per_instruction
> is emitted. I'm not exactly sure how to set this field correctly for VLIW
> architectures. Hopefully, there are some experts in the community that
> could help out (any Hexagon debuginfo developers out there?).
> I’ve tried a few tools to check if they could handle .debug_line version 4.
> On a simple testcase, I verified that GDB debugger 7.7 understands
> .debug_line version 4.
> Sony’s proprietary debugger can understand it too.
> I don't have LLDB built, so I haven’t tried it.
> GCC (older version 4.8.2) still emits version 2 for the .debug_line
> section, even though the DWARF version is set to 4. I'm not sure about the
> latest GCC.
> GNU's readelf (version 2.24) can handle .debug_line version 4.
> I added 3 new tests debug-line-version2.ll, debug-line-version3.ll and
> debug-line-version4.ll. The IR is generated from one source using different
> options (-gdwarf-2, -gdwarf-3 and –gdwarf-4). Any idea how to merge these
> three tests into one?
> Let me know what do you think about the patch.
> rL LLVM
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits