There had been significant discussion about producing a Format agnostic debug info interface, but we all kind of decided that it would be impossible in the general case, or at the very least extremely difficult.  Most situations don't require consuming both types of debug info so we decided it would be best to defer this kind of abstraction to the places that needed it.<br><br>We might be able to move a few specific utility classes to a common level, but I don't think it would work in the general case.<br><br>The context, session information, way that you make queries against the debug info are fundamentally different.<br><div class="gmail_quote">On Mon, Apr 20, 2015 at 5:55 PM Alexey Samsonov <<a href="mailto:vonosmas@gmail.com">vonosmas@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nit: could you upload a patch to Phabricator in a way that would save the context (<a href="http://llvm.org/docs/Phabricator.html" target="_blank">http://llvm.org/docs/Phabricator.html</a>)?<br>
<br>
Now, I don't really like introducing this hierarchy in tools/llvm-symbolizer. IMO we should keep the tool code straightforward, and instead add the functionality to the library (lib/DebugInfo), so that anyone can use format-agnostic symbolization-as-a-library. Now, I admit that I've missed the discussion and patches that added lib/DebugInfo/PDB and include/llvm/DebugInfo/PDB, so let me know if I'm revising some stuff discussed long ago. Specifically,<br>
<br>
adding SymbolizedLineInfo and SymbolizedLineInfoPDB doesn't look right. llvm::DILineInfo was already supposed to be "format-neutral container for source line information", and now<br>
it's moved under DebugInfo/DWARF. Can we move it back to include/llvm/DebugInfo folder, and use both in DWARF and PDB debug info parsers? Same holds for DINameKind - it certainly should not be a DWARF-specific enum.<br>
<br>
Same holds for DIContext - it would be nice to use that instead of introducing SymbolizationContext. We might have to change the layering of libraries - either introduce the library with code for DILineInfo/DIInliningInfo/DIContext used by DWARF and PDB readers, or merge DebugInfoDWARF and DebugInfoPDB into one fat library.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D9111" target="_blank">http://reviews.llvm.org/D9111</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>