r184276 - Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4
Manman Ren
mren at apple.com
Wed Jun 19 16:01:25 PDT 2013
On Jun 19, 2013, at 8:57 AM, Eric Christopher wrote:
> Hi Manman,
>
> Few issues with this patch:
>
>> Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4
>>
>> These options will add a module flag with name "Dwarf Version".
>> The behavior flag is currently set to Warning, so when two values disagree,
>> a warning will be emitted.
>>
>
> I don't think a module flag is the way we want to go about this, I
> think it should be an attribute on the compile unit created.
Using module flag is from previous email exchanges where you mentioned "a module level attribute".
I may have misinterpreted what you meant.
I assume you are now suggesting adding a member in DICompileUnit for Dwarf version.
I agree that having a dwarf version on each CU gives us finer control as mentioned in your point b).
>
> Few constraints there:
>
> a) this means that we just check the compile unit as we create up the
> DIE and we don't have to check the module.
> b) at LTO time we can link and generate debug info for modules that
> may (due to historic, or otherwise silly reasons) have used two
> different values for dwarf level without a warning,
> c) at LTO time we'll likely want to constrain to a minimum dwarf
> version that contains ref addr so that we can minimize, but this is by
> no means required,
> d) it matches how linkers actually link debug information
>
> Also:
>
>> + else if (Opts.getDebugInfo() != CodeGenOptions::NoDebugInfo)
>> + // Default Dwarf version is 3 if we are generating debug information.
>> + Opts.DwarfVersion = 3;
>>
>
> We want 4 here I believe, or even a level for "latest" with all of the
> bells and whistles. 4 is a likely sufficient start though since we'd
> have to define what "all the bells and whistles" means :) Or, as an
> alternate question, "why 3?"
I remember you tried to bump the version from 2 to 3 before, so I used 3 as a startup.
We can definitely bump it further to 4 if 3 is not causing any issue.
Thanks,
Manman
>
> Thanks!
>
> -eric
More information about the cfe-commits
mailing list