The code changes are very straight-forward -- just handle both DW_AT_GNU
and DW_AT_call versions of all tags and attributes. There is just one
small gotcha: in the GNU version, DW_AT_low_pc was used both for the
"return pc" and the "call pc" values, depending on whether the tag was
describing a tail call, while the official scheme uses different
attributes for the two things.
Depends on D80518.
I think this needs to be call_inst_pc = low_pc - 1, see DwarfCompileUnit::constructCallSiteEntryDIE for the rationale, and StackFrameList::SynthesizeTailCallFrames for where we use this information. The relevant part of the comment from SynthesizeTailCallFrames is:
"We do not want to subtract 1 from this PC, as it's the actual address of the tail-calling branch instruction. This address is provided by the compiler via DW_AT_call_pc."
In GNU+Dwarf4 mode, that's no longer true, the DW_AT_low_pc is a fake "return address" for the tail call (really: the address of the instruction after the tail-calling jump).
On x86_64, this test doesn't seem to stress this case, but the test breaks on Darwin/arm64 without the adjustment.