llvm-symbolizer: fix handling of DW_AT_specification in FRAME.
authorEvgenii Stepanov <eugenis@google.com>
Sat, 23 Nov 2019 02:04:58 +0000 (18:04 -0800)
committerEvgenii Stepanov <eugenis@google.com>
Mon, 25 Nov 2019 23:06:07 +0000 (15:06 -0800)
commit1b42cc0df160b2c741a258331e647472c370eb66
treeed7415cb355b61488347dfe77a3f317dac99478a
parent9f60820d8416a3e6839624839301a491ddb5d2a0
llvm-symbolizer: fix handling of DW_AT_specification in FRAME.

Summary:
Use getSubroutineName() to the the subrouting name; this function knows
how to handle cases when DW_TAG_subprogram refers to an earlier
declaration:

0x00000050:     DW_TAG_subprogram
                  DW_AT_linkage_name    ("_ZN1A1fEv")
                  DW_AT_name    ("f")
...
0x00000067:   DW_TAG_subprogram
                DW_AT_low_pc    (0x0000000000000000)
                DW_AT_high_pc   (0x0000000000000020)
                DW_AT_specification     (0x00000050 "_ZN1A1fEv")
...
0x0000008c:     DW_TAG_variable

Reviewers: pcc, vitalybuka, jdoerfert

Subscribers: srhines, hiraditya, rupprecht, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70630
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/test/tools/llvm-symbolizer/frame-specification.s [new file with mode: 0644]