gprofng: read Dwarf 5
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Mon, 6 Mar 2023 01:35:53 +0000 (17:35 -0800)
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Tue, 7 Mar 2023 17:56:19 +0000 (09:56 -0800)
commit74f1d7f4a3183bca13058dde29f5559d480a1b51
tree3c9e830cbc6c2fd17b55b1629e3a251a06d7451d
parent5fc6b6d44cd63651c2902cbfc5b9734a55aaa617
gprofng: read Dwarf 5

gprofng reads Dwarf to find function names, sources, and line numbers.
gprofng skips other debug information.
I fixed three places in gprofng Dwarf reader:
 - parsing the compilation unit header.
 - parsing the line number table header.
 - parsing new DW_FORMs.

Tested on aarch64-linux/x86_64-linux.

gprofng/ChangeLog
2023-03-05  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR gprofng/30195
gprofng/src/Dwarf.cc: Support Dwarf-5.
gprofng/src/DwarfLib.cc: Likewise.
gprofng/src/Dwarf.h: Likewise.
gprofng/src/DwarfLib.h: Likewise.
gprofng/src/collctrl.cc: Don't read freed memory.
gprofng/src/Dwarf.cc
gprofng/src/Dwarf.h
gprofng/src/DwarfLib.cc
gprofng/src/DwarfLib.h
gprofng/src/collctrl.cc