[all-commits] [llvm/llvm-project] c8ae08: [llvm-dwarfdump] dump link to the immediate parent.

avl-llvm via All-commits all-commits at lists.llvm.org
Tue Nov 9 03:14:30 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c8ae08987db2db5ff26a094b963e126e90a922dc
      https://github.com/llvm/llvm-project/commit/c8ae08987db2db5ff26a094b963e126e90a922dc
  Author: Alexey Lapshin <a.v.lapshin at mail.ru>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
    A llvm/test/tools/llvm-dwarfdump/X86/tag-parent-offset.yaml
    M llvm/test/tools/llvm-dwarfdump/X86/verbose.test

  Log Message:
  -----------
  [llvm-dwarfdump] dump link to the immediate parent.

It is often useful to know which die is the parent of the current die.
This patch adds information about parent offset into the dump:

0x0000000b: DW_TAG_compile_unit
              DW_AT_producer    ("by_hand")

0x00000014:   DW_TAG_base_type (0x0000000b)  <<<<<<<<<<<<<<
                DW_AT_name      ("int")

Now it is easy to see which die is the parent of the current die.
This patch makes that behaviour to be default.
We can make it to be opt-in if neccessary.

This functionality differs from already existed "--show-parents"
in that sence that parent information is shown for all dies and
only link to the immediate parent is shown.

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




More information about the All-commits mailing list