[PATCH] [dwarfdump] Implement extraction of file information referenced in .debug_info.

Frederic Riss friss at apple.com
Thu Sep 4 06:55:07 PDT 2014


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).

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).

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 --------------
A non-text attachment was scrubbed...
Name: D5192.13258.patch
Type: text/x-patch
Size: 14007 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140904/9a628330/attachment.bin>


More information about the llvm-commits mailing list