<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 7, 2014 at 11:33 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you checked out llvm-symbolize? It's what the asan folk<br>
(including Alexey) have created for backtrace symbolication.<br></blockquote><div><br></div><div>Yeah, we potentially can add some kind of option: "llvm-symbolizer -print-short-function-names", I don't yet see why this would be valuable.</div>
<div>What's wrong with printing full function names?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
-eric<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, May 7, 2014 at 11:28 AM, Isaiah Norton <<a href="mailto:isaiah.norton@gmail.com">isaiah.norton@gmail.com</a>> wrote:<br>
> The use case is getting the short name for backtraces. There are other<br>
> options, but I figured it was worth a shot trying to access from the DWARF<br>
> structure because what we need is already stored there anyway.<br>
><br>
> Thanks,<br>
> Isaiah<br>
><br>
><br>
> On Wed, May 7, 2014 at 12:24 PM, Alexey Samsonov <<a href="mailto:samsonov@google.com">samsonov@google.com</a>><br>
> wrote:<br>
>><br>
>> Yeah, public API of DebugInfo library is quite minimalistic. But I agree<br>
>> with Eric - what is the use case for getting unmangled name from DIE?<br>
>><br>
>><br>
>> On Tue, May 6, 2014 at 11:21 PM, Keno Fischer<br>
>> <<a href="mailto:kfischer@college.harvard.edu">kfischer@college.harvard.edu</a>> wrote:<br>
>>><br>
>>> That doesn't seem possible with the public API or am I mistaking?<br>
>>><br>
>>><br>
>>> On Wed, May 7, 2014 at 12:13 AM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> On Tue, May 6, 2014 at 8:09 PM, Isaiah Norton <<a href="mailto:isaiah.norton@gmail.com">isaiah.norton@gmail.com</a>><br>
>>>> wrote:<br>
>>>> > Hi,<br>
>>>> ><br>
>>>> > I am looking for a way to get unmangled subprogram names from a<br>
>>>> > DWARFContext. The name I want is available in the attribute<br>
>>>> > `DW_AT_name`<br>
>>>> > [1], but as far as I can tell this is only returned as a fallback in<br>
>>>> > `DWARFDebugInfoEntryMinimal::getSubroutineName` when the linkage name<br>
>>>> > is not<br>
>>>> > available [2].<br>
>>>> ><br>
>>>> > If this is not currently possible, is there any interest in adding<br>
>>>> > such<br>
>>>> > access to the public DebugInfo API? Perhaps with an additional<br>
>>>> > "UnmangledName" option in `DILineInfoSpecifier`.<br>
>>>> ><br>
>>>> > Thanks,<br>
>>>> > Isaiah<br>
>>>> ><br>
>>>> > [1]: for example:<br>
>>>> ><br>
>>>> > 0x0001bb00:   DW_TAG_subprogram [2]<br>
>>>> >                 DW_AT_MIPS_linkage_name [DW_FORM_strp]  (<br>
>>>> > .debug_str[0x00007934] = "julia_vcat4473")<br>
>>>> >                 DW_AT_name [DW_FORM_strp]       (<br>
>>>> > .debug_str[0x00000913] =<br>
>>>> > "vcat")<br>
>>>> ><br>
>>>> ><br>
>>>> > [2]<br>
>>>> ><br>
>>>> > <a href="https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARFDebugInfoEntry.cpp#L279-L286" target="_blank">https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARFDebugInfoEntry.cpp#L279-L286</a><br>

>>>> ><br>
>>>> ><br>
>>>><br>
>>>> If you just want the DW_AT_name you should be able to iterate over the<br>
>>>> DIEs and pull out the DW_AT_name attribute from all of the subprogram<br>
>>>> DIEs. Is there some other use that you're looking for? I'm not quite<br>
>>>> sure what you're trying to accomplish.<br>
>>>><br>
>>>> -eric<br>
>>>> _______________________________________________<br>
>>>> LLVM Developers mailing list<br>
>>>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> LLVM Developers mailing list<br>
>>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Alexey Samsonov, Mountain View, CA<br>
>><br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Alexey Samsonov, Mountain View, CA</div></div>
</div></div>