[lldb-dev] Questions about DWARFDebugInfoEntry::Extract and DWARFDebugInfoEntry::FastExtract
Greg Clayton
gclayton at apple.com
Thu Feb 3 18:19:05 PST 2011
The fast path currently ignores checking if offsets are valid while parsing a single DIE which can be bad if we have bad DWARF. So both should stay.
Send a patch to the list for one and I can fix it in both!
If you have an example file that contains DWARF with this issue, I wouldn't mind getting my hands on a few more external DWARF files so I can test my DWARF tools with them. I am not sure if you can spare any sample DWARF files if they don't contain anything proprietary, but if you can, please email me some directly.
Greg Clayton
On Feb 3, 2011, at 12:34 PM, Warren.Paul at nokia.com wrote:
> I hit an infinite loop in DWARFDebugInfoEntry::FastExtract when consuming some of our sym files containing DW_FORM_indirect attribute forms. In fixing the problem, I saw DWARFDebugInfoEntry::Extract which does pretty much the same thing (and did not have the bug). But looking at the call graph, it doesn't look like Extract is called, at least not by any functions that are called themselves (see call graph at the bottom). It's basically used by Dump and Verify and helpers for those methods.
>
> So the question is, should I get rid of Extract and change everything to use FastExtract, or just fix the problem in FastExtract and leave everything else be?
>
> Thanks,
> Warren
>
>
>
> DWARFDebugInfoEntry::Extract(SymbolFileDWARF *, const DWARFCompileUnit *, dw_offset_t *)
> DWARFDebugInfo::Parse(SymbolFileDWARF *, Callback, void *)
> DWARFDebugInfo::Dump(lldb_private::Stream *, SymbolFileDWARF *, unsigned int, unsigned int)
> DWARFDebugInfo::Find(const char *, bool, std::vector<unsigned int,std::allocator<unsigned int>> &)
> DWARFDebugInfo::Find(lldb_private::RegularExpression &, std::vector<unsigned int,std::allocator<unsigned int>> &)
> DWARFDebugInfo::Verify(lldb_private::Stream *, SymbolFileDWARF *)
> DWARFDebugInfoEntry::AppendTypeName(SymbolFileDWARF *, const DWARFCompileUnit *, unsigned int, lldb_private::Stream *)
> DWARFDebugInfoEntry::AppendTypeName(SymbolFileDWARF *, const DWARFCompileUnit *, unsigned int, lldb_private::Stream *)
> DWARFDebugInfoEntry::DumpAttribute(SymbolFileDWARF *, const DWARFCompileUnit *, const lldb_private::DataExtractor &, uint32_t *, lldb_private::Stream *, dw_attr_t, dw_form_t)
> DWARFDebugInfoEntry::Dump(SymbolFileDWARF *, const DWARFCompileUnit *, lldb_private::Stream *, uint32_t)
> DumpCallback(SymbolFileDWARF *, DWARFCompileUnitSP &, DWARFDebugInfoEntry *, unsigned int, unsigned int, void *) (4 matches)
> DWARFDebugInfo::Dump(lldb_private::Stream *, SymbolFileDWARF *, unsigned int, unsigned int)
> DWARFDebugInfo::Dump(lldb_private::Stream *, unsigned int, unsigned int)
> DWARFDebugInfo::Dump(lldb_private::Stream *, unsigned int, unsigned int)
> DWARFDebugInfoEntry::Dump(SymbolFileDWARF *, const DWARFCompileUnit *, lldb_private::Stream *, uint32_t)
> DWARFDebugInfoEntry::DumpAncestry(SymbolFileDWARF *, const DWARFCompileUnit *, const DWARFDebugInfoEntry *, lldb_private::Stream *, uint32_t)
> DWARFDebugInfoEntry::DumpAncestry(SymbolFileDWARF *, const DWARFCompileUnit *, const DWARFDebugInfoEntry *, lldb_private::Stream *, uint32_t)
> DWARFDebugInfoEntry::GetName(SymbolFileDWARF *, const DWARFCompileUnit *, unsigned int, lldb_private::Stream *)
> DWARFDebugInfoEntry::DumpAttribute(SymbolFileDWARF *, const DWARFCompileUnit *, const lldb_private::DataExtractor &, uint32_t *, lldb_private::Stream *, dw_attr_t, dw_form_t)
> DWARFDebugInfoEntry::Dump(SymbolFileDWARF *, const DWARFCompileUnit *, lldb_private::Stream *, uint32_t)
> DumpCallback(SymbolFileDWARF *, DWARFCompileUnitSP &, DWARFDebugInfoEntry *, unsigned int, unsigned int, void *) (4 matches)
> DWARFDebugInfo::Dump(lldb_private::Stream *, SymbolFileDWARF *, unsigned int, unsigned int)
> DWARFDebugInfo::Dump(lldb_private::Stream *, unsigned int, unsigned int)
> DWARFDebugInfo::Dump(lldb_private::Stream *, unsigned int, unsigned int)
> DWARFDebugInfoEntry::Dump(SymbolFileDWARF *, const DWARFCompileUnit *, lldb_private::Stream *, uint32_t)
> DWARFDebugInfoEntry::DumpAncestry(SymbolFileDWARF *, const DWARFCompileUnit *, const DWARFDebugInfoEntry *, lldb_private::Stream *, uint32_t)
> DWARFDebugInfoEntry::DumpAncestry(SymbolFileDWARF *, const DWARFCompileUnit *, const DWARFDebugInfoEntry *, lldb_private::Stream *, uint32_t)
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
More information about the lldb-dev
mailing list