Hi, I am looking for a way to get unmangled subprogram names from a DWARFContext. The name I want is available in the attribute `DW_AT_name` [1], but as far as I can tell this is only returned as a fallback in `DWARFDebugInfoEntryMinimal::getSubroutineName` when the linkage name is not available [2]. If this is not currently possible, is there any interest in adding such access to the public DebugInfo API? Perhaps with an additional "UnmangledName" option in `DILineInfoSpecifier`. Thanks, Isaiah [1]: for example: 0x0001bb00: DW_TAG_subprogram [2] DW_AT_MIPS_linkage_name [DW_FORM_strp] ( .debug_str[0x00007934] = "julia_vcat4473") DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000913] "vcat") [2] https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARFDebugInfoEntry.cpp#L279-L286 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140506/5ec88189/attachment.html>
Eric Christopher
2014-May-07 04:13 UTC
[LLVMdev] DWARF unmangled subprog name (DW_AT_name)
On Tue, May 6, 2014 at 8:09 PM, Isaiah Norton <isaiah.norton at gmail.com> wrote:> Hi, > > I am looking for a way to get unmangled subprogram names from a > DWARFContext. The name I want is available in the attribute `DW_AT_name` > [1], but as far as I can tell this is only returned as a fallback in > `DWARFDebugInfoEntryMinimal::getSubroutineName` when the linkage name is not > available [2]. > > If this is not currently possible, is there any interest in adding such > access to the public DebugInfo API? Perhaps with an additional > "UnmangledName" option in `DILineInfoSpecifier`. > > Thanks, > Isaiah > > [1]: for example: > > 0x0001bb00: DW_TAG_subprogram [2] > DW_AT_MIPS_linkage_name [DW_FORM_strp] ( > .debug_str[0x00007934] = "julia_vcat4473") > DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000913] > "vcat") > > > [2] > https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARFDebugInfoEntry.cpp#L279-L286 > >If you just want the DW_AT_name you should be able to iterate over the DIEs and pull out the DW_AT_name attribute from all of the subprogram DIEs. Is there some other use that you're looking for? I'm not quite sure what you're trying to accomplish. -eric
That doesn't seem possible with the public API or am I mistaking? On Wed, May 7, 2014 at 12:13 AM, Eric Christopher <echristo at gmail.com>wrote:> On Tue, May 6, 2014 at 8:09 PM, Isaiah Norton <isaiah.norton at gmail.com> > wrote: > > Hi, > > > > I am looking for a way to get unmangled subprogram names from a > > DWARFContext. The name I want is available in the attribute `DW_AT_name` > > [1], but as far as I can tell this is only returned as a fallback in > > `DWARFDebugInfoEntryMinimal::getSubroutineName` when the linkage name is > not > > available [2]. > > > > If this is not currently possible, is there any interest in adding such > > access to the public DebugInfo API? Perhaps with an additional > > "UnmangledName" option in `DILineInfoSpecifier`. > > > > Thanks, > > Isaiah > > > > [1]: for example: > > > > 0x0001bb00: DW_TAG_subprogram [2] > > DW_AT_MIPS_linkage_name [DW_FORM_strp] ( > > .debug_str[0x00007934] = "julia_vcat4473") > > DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000913] > > > "vcat") > > > > > > [2] > > > https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARFDebugInfoEntry.cpp#L279-L286 > > > > > > If you just want the DW_AT_name you should be able to iterate over the > DIEs and pull out the DW_AT_name attribute from all of the subprogram > DIEs. Is there some other use that you're looking for? I'm not quite > sure what you're trying to accomplish. > > -eric > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140507/d8720566/attachment.html>