[all-commits] [llvm/llvm-project] a3b7cb: [llvm-pdbutil] Add options to only dump symbol rec...

Zequan Wu via All-commits all-commits at lists.llvm.org
Wed Apr 27 14:37:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a3b7cb015fd5fd2aa98afda8ae22759576ce2888
      https://github.com/llvm/llvm-project/commit/a3b7cb015fd5fd2aa98afda8ae22759576ce2888
  Author: Zequan Wu <zequanwu at google.com>
  Date:   2022-04-27 (Wed, 27 Apr 2022)

  Changed paths:
    M llvm/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h
    M llvm/include/llvm/DebugInfo/PDB/Native/InputFile.h
    M llvm/include/llvm/DebugInfo/PDB/Native/LinePrinter.h
    M llvm/include/llvm/Support/BinaryStreamArray.h
    M llvm/lib/DebugInfo/CodeView/CVSymbolVisitor.cpp
    M llvm/lib/DebugInfo/PDB/Native/InputFile.cpp
    A llvm/test/tools/llvm-pdbutil/Inputs/symbol-offset.yaml
    A llvm/test/tools/llvm-pdbutil/symbol-offset.test
    M llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
    M llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp

  Log Message:
  -----------
  [llvm-pdbutil] Add options to only dump symbol record at specified offset and its parents or children with spcified depth.

Right now, if we want to dump symbol at specified offset, we need to use `grep`.
And it can only show surrounding symbols in layout (not in lexical scope sense).

This adds similar options to `dump` command as `llvm-dwarfdump` to allow users
to dump symbol record at specified offset and its parents or children with
spcified depth.

`--symbol-offset=` must be used with `--modi` to dump only one symbol at given
offset.

`--show-parents`/`--show-children` must be used with `--symbol-offset` to
dump all symbols that are parents/children of the symbol at given offset.

`--parent-recurse-depth`/`--children-recurse-depth` must be used with
`--show-parents`/`--show-children` to specify the max up/down depth.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D124317




More information about the All-commits mailing list