[PATCH] [dwarfdump] Implement extraction of file information referenced in .debug_info.
David Blaikie
dblaikie at gmail.com
Thu Sep 4 08:19:56 PDT 2014
On Thu, Sep 4, 2014 at 6:55 AM, Frederic Riss <friss at apple.com> wrote:
> Hi dblaikie, echristo, aprantl,
>
> This is the merge of 2 patches:
>
> Pass the DWARFUnit to DWARFDebugLine::getFileNameByIndex().
>
> This way it can query the compilation dir when it is referenced (when a
> file references directory index 0, it refers to the compilation dir).
>
Alternatively (Though not necessarily better - open to
opinions/preferences) DWARFUnit could have a wrapper for getFileNameByIndex
and could be returned a zero/default/something that the DWARFUnit could
detect and return the CU.
Or the DWARFDebugLine could be constructed with its unit, or just with the
comp_dir of its unit so it didn't have to be passed in/queried for on every
lookup?
>
> and:
>
> [dwarfdump] Implement extraction of file information referenced in
> .debug_info.
>
> This patch pretty prints the contents of the DW_AT_decl_file,
> DW_AT_call_file, DW_AT_decl_line and DW_AT_call line attributes.
> Drop the const on the passed DWARFUnit to be able to call
> getLineTableForUnit (the line table construction is lazy, thus the getter
> might modify the Unit).
>
What pretty printing occurs for lines? (obviously for files this would
allow you to print the file name rather than the file number - but
DW_AT_decl/call_line already contain the line number, right?)
>
> http://reviews.llvm.org/D5192
>
> Files:
> lib/DebugInfo/DWARFContext.cpp
> lib/DebugInfo/DWARFDebugInfoEntry.cpp
> lib/DebugInfo/DWARFDebugInfoEntry.h
> lib/DebugInfo/DWARFDebugLine.cpp
> lib/DebugInfo/DWARFDebugLine.h
> test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
> test/DebugInfo/X86/fission-cu.ll
> test/DebugInfo/namespace.ll
> test/MC/MachO/gen-dwarf.s
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140904/2cdad7f1/attachment.html>
More information about the llvm-commits
mailing list