[all-commits] [llvm/llvm-project] f97019: [llvm-readobj/elf] - Add a testing for --stackmap ...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Wed Aug 5 03:09:46 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f97019ad6e3a96995dda3f759ee692eb81abcc4c
      https://github.com/llvm/llvm-project/commit/f97019ad6e3a96995dda3f759ee692eb81abcc4c
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M llvm/include/llvm/Object/StackMapParser.h
    M llvm/lib/CodeGen/StackMaps.cpp
    A llvm/test/tools/llvm-readobj/ELF/stackmap.test
    M llvm/tools/llvm-readobj/COFFDumper.cpp
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [llvm-readobj/elf] - Add a testing for --stackmap and refine the implementation.

Currently, we only test the `--stackmap` option here:
https://github.com/llvm/llvm-project/blob/master/llvm/test/Object/stackmap-dump.test
it uses a precompiled MachO binary currently and I've found no tests for this option for ELF.

The implementation also has issues. For example, it might assert on a wrong version
of the .llvm-stackmaps section. Or it might crash on an empty or truncated section.

This patch introduces a new tools/llvm-readobj/ELF test file as well as implements a few
basic checks to catch simple crashes/issues

It also eliminates `unwrapOrError` calls in `printStackMap()`.

Differential revision: https://reviews.llvm.org/D85208




More information about the All-commits mailing list