<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 27, 2013, at 10:31 AM, Eric Christopher wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 27, 2013 at 9:59 AM, Manman Ren <span dir="ltr"><<a href="mailto:mren@apple.com" target="_blank">mren@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div class="h5"><div>On Feb 26, 2013, at 5:59 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 26, 2013 at 5:55 PM, Manman Ren <span dir="ltr"><<a href="mailto:mren@apple.com" target="_blank">mren@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div><div>On Feb 26, 2013, at 5:18 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div>

<br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>which seems to have the linkage name on the TAG_variable die and nowhere else (for this testcase) which partially seems what you're doing (adding it to the TAG_variable).</div>


<div><br></div></div></div></div></blockquote><div><br></div><div>Just noticed, FWIW, that gcc 4.8 is using the newer DW_AT_linkage_name from dwarf-4 2.22 for the linkage names which obviously won't work here, but it gives a definition of:</div>


<div>
                
        
        
                <div title="Page 55">
                        <div>
                                <div><div>
                
        
        
                <br></div><div title="Page 55">
                        <div>
                                <div><p><span style="font-family:TimesNewRomanPS">"Some language implementations, notably C++ and similar languages, make use of
implementation defined names within object files that are different from the identifier names (see
Section </span><span style="font-family:TimesNewRomanPS;color:rgb(0,0,255)">2.15) </span><span style="font-family:TimesNewRomanPS">of entities as they appear in the source. Such names, sometimes known as mangled
names, are used in various ways, such as: to encode additional information about an entity, to
distinguish multiple entities that have the same name, and so on. When an entity has an
associated distinct linkage name it may sometimes be useful for a producer to include this name
in the DWARF description of the program to facilitate consumer access to and use of object file
information about an entity and/or information that is encoded in the linkage name itself.
</span></p><p><span style="font-family:TimesNewRomanPSMT">A debugging information entry may have a DW_AT_linkage_name attribute whose value is a
null-terminated string describing the object file linkage name associated with the corresponding
entity.
</span></p><p><span style="font-family:TimesNewRomanPS">Debugging information entries to which DW_AT_linkage_name may apply include:
</span><span style="font-family:TimesNewRomanPS;color:rgb(0,0,255)">DW_TAG_common_block</span><span style="font-family:TimesNewRomanPS">, </span><span style="font-family:TimesNewRomanPS;color:rgb(0,0,255)">DW_TAG_constant</span><span style="font-family:TimesNewRomanPS">, </span><span style="font-family:TimesNewRomanPS;color:rgb(0,0,255)">DW_TAG_entry_point</span><span style="font-family:TimesNewRomanPS">, </span><span style="font-family:TimesNewRomanPS;color:rgb(0,0,255)">DW_TAG_subprogram
</span><span style="font-family:TimesNewRomanPS">and </span><span style="font-family:TimesNewRomanPS;color:rgb(0,0,255)">DW_TAG_variable</span><span style="font-family:TimesNewRomanPS">.<i>"</i></span></p>
                                </div>
                        </div>
                </div><div><br></div>
                                </div>
                        </div>
                </div></div></div>but if gdb needs the linkage name on the variable and on the member then we should probably go ahead and put it on the member as a compatibility option and on the variable always (and updating the comments/testcases appropriately).</div>

</div></blockquote><div><br></div></div></div>Without any of my checkins, we used to put AT_linkage_name on the member, will changing it to a compatibility option cause issues on debuggers that are not ready for dwarf-4?</div>

<div><br></div></div></blockquote><div><br></div><div>Well, keep the spelling the same as DW_AT_MIPS_linkage_name for now, I'll worry about that part. I was mostly thinking about not putting it on the member similarly to how we've got it for subprogram DIEs (DwarfCompileUnit.cpp) where we had a similar sort of issue. Was hoping you'd let me know if things would fail with darwin gdb with that change. This way we're leaving out the compatibility language unless we need it on the TAG_member since putting it on the TAG_variable matches with what we've got from dwarf-4. If we need to have something compatible that's fine too but wanted to have it on the notionally correct DIEs first and then add compatibility from there.</div>
</div></div></div></blockquote></div></div>Any pointer on how to add a compatibility option? Do we need a separate option for AT_MIPS_linkage_name on TAG_member? If yes, any suggestion on the name?</div></div></blockquote>
<div><br></div><div style="">There's already an option for compatibility with old darwin gdb, I figure we'd just use that?</div></div></div></div></blockquote>Great, what is the existing option? I can guard the MIPS_linkage_name on TAG_member with that option.</div><div><br></div><div>Thanks,</div><div>Manman<br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div style=""><br></div><div style="">-eric </div></div></div></div>
</blockquote></div><br></body></html>