[PATCH] Use the DWARF form DW_FORM_sec_offset or DW_FORM_data4 depending on the Dwarf version being generated
echristo at gmail.com
Fri Nov 15 10:18:15 PST 2013
On Fri, Nov 15, 2013 at 2:34 AM, Keith Walker <kwalker at arm.com> wrote:
> In relation to this patch which is making the forms
> DW_FORM_sec_offset/DW_FORM_data4 be consistent with the Dwarf version, is
> the best thing at this stage to just not do the DWARF3 checks in the fission
> related tests?
Yeah, I think so.
> I think that checking whether fission is requested for Dwarf 3 and deciding
> on what action to then take to do is something for a future patch.
Agreed. I'm open to opinions on front end checks alongside "well, we
managed to create some IR and asked for dwarf3" internal errors in the
backend or something else.
> From: llvm-commits-bounces at cs.uiuc.edu
> [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Eric Christopher
> Sent: 14 November 2013 22:32
> To: Paul Robinson
> Cc: reviews+D2180+public+84546655657775ea at llvm-reviews.chandlerc.com;
> llvm-commits at cs.uiuc.edu
> Subject: RE: [PATCH] Use the DWARF form DW_FORM_sec_offset or DW_FORM_data4
> depending on the Dwarf version being generated
> Good catch. I'd looked for this case but apparently missed it in the diff.
> Fission is a dwarf5 feature and so this probably shouldn't work since it
> relies on forms that are only in dwarf5.
> On Nov 14, 2013 2:18 PM, "Robinson, Paul"
> <Paul_Robinson at playstation.sony.com> wrote:
> +; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu
> -filetype=obj -o %t -dwarf-version=3
> This seems weird, fission with DWARF 3... but of course 4 doesn't
> have it either, so it's no less weird than what we have today.
> It's good to have the forms more consistent with the target version
> but eventually we might want to be more picky about mix-n-match.
>> -----Original Message-----
>> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
>> bounces at cs.uiuc.edu] On Behalf Of Keith Walker
>> Sent: Thursday, November 14, 2013 8:29 AM
>> To: echristo at gmail.com; kwalker at arm.com
>> Cc: llvm-commits at cs.uiuc.edu
>> Subject: [PATCH] Use the DWARF form DW_FORM_sec_offset or DW_FORM_data4
>> depending on the Dwarf version being generated
>> Hi echristo,
>> In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into a
>> section use the form DW_FORM_data4 whilst in Dwarf 4 and later they use
>> the form DW_FORM_sec_offset.
>> This patch updates the places where such attributes are generated to use
>> the appropriate form depending on the Dwarf version. The DIE entries
>> affected have the following tags:
>> DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames,
>> DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base
>> It also adds a hidden command line option "--dwarf-version=<uint>" to
>> llc which allows the version of Dwarf to be generated to override what
>> is specified in the metadata; this makes it possible to update existing
>> tests to check the debugging information generated for both Dwarf 4 (the
>> default) and Dwarf 3 using the same metadata.
More information about the llvm-commits