[PATCH] D88661: llvm-diva - Debug Information Visual Analizer

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 08:07:01 PDT 2020


CarlosAlbertoEnciso created this revision.
CarlosAlbertoEnciso added a reviewer: debug-info.
CarlosAlbertoEnciso added projects: debug-info, LLVM.
Herald added subscribers: llvm-commits, arphaman, dexonsmith, mgrang, hiraditya, mgorny.
CarlosAlbertoEnciso requested review of this revision.

NOTE: The purpose of this revision, is to provide the LLVM community with a single patch, so llvmdiva can be build and try out right away, rather than review it. We are in the process of creating a reviewable series of patches, which we will start uploading after the conference.

At Sony, we have been developing an LLVM-based debug information analysis tool which we have called **llvm-diva** (short for LLVM debug information visual analyzer), designed to visualize these mappings. It's based entirely on the existing LLVM libraries for debug info parsing, target support, etc. and at this stage we believe that its proven its worth internally to the point where we would like to propose upstreaming it as part of the mainline LLVM project alongside existing tools such as llvm-dwarfdump.

**llvm-diva** is a command line tool that process debug info contained in a binary file and produces a debug information format agnostic "Logical View", which is a high-level semantic representation of the debug info, independent of the low-level format.

The logical view is composed of the tradition programming elements as: scopes, types, symbols, lines. These elements can display additional information, such as variable coverage factor, lexical block level, disassembly code, code ranges, etc.

The diversity of **llvm-diva** command line options enables the creation of very rich logical views to include more low-level debug information: disassembly code associated with the debug lines, variables runtime location and coverage, internal offsets for the elements within the binary file, etc.

With **llvm-diva**, we aim to address the following points:

- Which variables are dropped due to optimization?
- Why I cannot stop at a particular line?
- Which lines are associated to a specific code range?
- Does the debug information represent the original source?
- What is the semantic difference between the debug info generated by different toolchain versions?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88661

Files:
  llvm/docs/CommandGuide/index.rst
  llvm/docs/CommandGuide/llvm-diva.rst
  llvm/docs/ProgrammersManual.rst
  llvm/include/llvm/ADT/IntervalTree.h
  llvm/include/llvm/DebugInfo/CodeView/TypeRecordHelpers.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVBasicDefinitions.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVCompare.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVElement.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVError.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVLine.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVLocation.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVRange.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVReader.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVSort.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVStringPool.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVSupport.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVSymbol.h
  llvm/include/llvm/DebugInfo/LogicalView/Core/LVType.h
  llvm/include/llvm/DebugInfo/LogicalView/LVReaderHandler.h
  llvm/include/llvm/DebugInfo/LogicalView/Readers/LVCodeViewReader.h
  llvm/include/llvm/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.h
  llvm/include/llvm/DebugInfo/LogicalView/Readers/LVElfReader.h
  llvm/lib/DebugInfo/CMakeLists.txt
  llvm/lib/DebugInfo/CodeView/TypeRecordHelpers.cpp
  llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
  llvm/lib/DebugInfo/LLVMBuild.txt
  llvm/lib/DebugInfo/LogicalView/CMakeLists.txt
  llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVElement.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVError.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVLine.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVLocation.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVObject.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVOptions.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVRange.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVReader.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVSort.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVSupport.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVSymbol.cpp
  llvm/lib/DebugInfo/LogicalView/Core/LVType.cpp
  llvm/lib/DebugInfo/LogicalView/LLVMBuild.txt
  llvm/lib/DebugInfo/LogicalView/LVReaderHandler.cpp
  llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp
  llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
  llvm/lib/DebugInfo/LogicalView/Readers/LVElfReader.cpp
  llvm/tools/llvm-diva/CMakeLists.txt
  llvm/tools/llvm-diva/LLVMBuild.txt
  llvm/tools/llvm-diva/Options.cpp
  llvm/tools/llvm-diva/Options.h
  llvm/tools/llvm-diva/llvm-diva.cpp
  llvm/unittests/ADT/CMakeLists.txt
  llvm/unittests/ADT/IntervalTreeTest.cpp
  llvm/unittests/DebugInfo/CMakeLists.txt
  llvm/unittests/DebugInfo/LogicalView/CMakeLists.txt
  llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp



More information about the llvm-commits mailing list