Commit Graph

3 Commits

Author SHA1 Message Date
Carlos Alberto Enciso 9d56d9a95f [llvm-debuginfo-analyzer] Fix memory leak reported by sanitizers.
The sanitizer reported memory leak issues; the command line
used in the test case is:

llvm-debuginfo-analyzer --attribute=level
                        --print=instructions
                        pr-incorrect-instructions-dwarf-clang.o

When dealing with logical instruction lines associated with
an artificial logical scope, skip the process of finding
their enclosing scope. Just add them to the scope.

Create logical debug lines only if the command line specifies:
  --print=lines or --print=elements or --print=all

Reviewed By: jryans, vitalybuka

Differential Revision: https://reviews.llvm.org/D137156
2022-11-02 06:07:33 +00:00
Carlos Alberto Enciso d858447584 [llvm-debuginfo-analyzer] (08/09) - ELF Reader
The unitest and test cases are platform dependent (x86_64)
causing failures in:

  https://lab.llvm.org/buildbot/#/builders/245/builds/146
  https://lab.llvm.org/buildbot/#/builders/188/builds/21397
  No available targets are compatible with triple "x86_64-unknown-unknown".

Added:
- ';REQUIRES: x86-registered-target' to the LIT tests.
- Code to check if the target 'Triple::x86_64' is supported to
  the unittest case.
2022-10-27 10:01:04 +01:00
Carlos Alberto Enciso 4f06d46f46 [llvm-debuginfo-analyzer] (08/09) - ELF Reader
llvm-debuginfo-analyzer is a command line tool that processes 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 code has been divided into the following patches:

1) Interval tree
2) Driver and documentation
3) Logical elements
4) Locations and ranges
5) Select elements
6) Warning and internal options
7) Compare elements
8) ELF Reader
9) CodeView Reader

Full details:
https://discourse.llvm.org/t/llvm-dev-rfc-llvm-dva-debug-information-visual-analyzer/62570

This patch:

This is a high level summary of the changes in this patch.

ELF Reader
- Support for ELF/DWARF.
  LVBinaryReader, LVELFReader

Reviewed By: psamolysov, probinson

Differential Revision: https://reviews.llvm.org/D125783
2022-10-27 05:37:51 +01:00