[llvm] r176143 - Debug Info: for static member variables, add AT_MIPS_linkage_name to the
Eric Christopher
echristo at gmail.com
Tue Feb 26 16:09:15 PST 2013
> Debug Info: for static member variables, add AT_MIPS_linkage_name to the
> definition DIE, to make old GDB happy.
>
>
Again, is this for compatibility or for correctness?
> We have a regression for old GDB when Clang uses DW_TAG_member to declare
> static members inside a class, instead of DW_TAG_variable. This patch will
> fix
> this regression.
>
>
So, did you check the other uses of AT_MIPS_linkage_name?
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=176143&r1=176142&r2=176143&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Tue Feb 26
> 18:02:32 2013
> @@ -1348,9 +1348,15 @@ void CompileUnit::createGlobalVariableDI
> }
> // Add linkage name.
> StringRef LinkageName = GV.getLinkageName();
> - if (!LinkageName.empty() && isGlobalVariable)
> + if (!LinkageName.empty() && isGlobalVariable) {
> addString(VariableDIE, dwarf::DW_AT_MIPS_linkage_name,
> getRealLinkageName(LinkageName));
> + // To make old GDB happy, for static member variables, we add
> + // AT_MIPS_linkage_name to the definition DIE as well.
>
Can you explain this more? What's going on? What's the problem?
-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130226/ae1388df/attachment.html>
More information about the llvm-commits
mailing list