perf: Dwarf Error : found dwarf version ‘XXX’, this reader only handles version 2, 3, 4 and 5 information

Solution Verified - Updated -

Issue

  • Compiling with LLVM/clang to create DWARF5 debug symbols and running perf record then perf report produces errors such as:
BFD: Dwarf Error: Invalid or unhandled FORM value: 0x25.
BFD: Dwarf Error: Unable to read alt ref 391304.
BFD: Dwarf Error: found dwarf version '1030', this reader only handles version 2, 3, 4 and 5 information.
BFD: Dwarf Error: found dwarf version '1030', this reader only handles version 2, 3, 4 and 5 information.
  • The same problem is not seen with DWARF4 debuginfo, nor with any version of GNU GCC/G++.

Environment

  • Red Hat Enterprise Linux 8.7
  • perf-4.18.0-425.3.1.el8
  • clang LLVM C/C++ compiler
  • Binary compiled with DWARF 5 debugging symbols

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content