Issue 110926.1: .debug_frame DW_OP_call_ref allowance

Author: Jan Kratochvil
Champion: Todd Allen
Date submitted: 2011-09-26
Date revised:
Date closed:
Type: Clarification
Status: Accepted with modification
DWARF Version: 5
Section 6.4, pg 131
DWARF-4 states:

> 6.4.2 Call Frame Instructions
> DW_OP_call2, DW_OP_call4 and DW_OP_call_ref operators are not meaningful in 
> an operand of these instructions because there is no mapping from call frame
> information to any corresponding debugging compilation unit information, 
> thus there is no way to interpret the call offset.

(a) 
DW_OP_call_ref is absolute intended for cross-CU references.  There is no need
to know "corresponding debugging compilation unit" to interpret
DW_OP_call_ref.  (It applies also to DW_OP_implicit_pointer now.)

(b)
DWARF-4 also states:

> 6.4.1 Structure of Call Frame Information
> 5. address_size (ubyte)
> If a compilation unit exists for this frame, its address size must match the
> address size here.

So is there any "corresponding debugging compilation unit" or not?  This 
paragraph states there is such "exists for" - "corresponding" (expecting just
by matching the FDE address range to DW_AT_low_pc/DW_AT_high_pc/DW_AT_ranges).

--

Revised text:
     6.4.2, bullet 1:
     DW_OP_call2, DW_OP_call4 and DW_OP_call_ref operators are not
     allowed in an operand of these instructions because
     the call frame information must not depend on other
     debug sections.

Accepted with modifications -- May 15, 2012.
{"cc_re__cc_re__cc_by_4_0": ["s=\"\"><a href=\"../code-of-conduct.html\">Code of Conduct</a></li>\n\t\t<li class=\"\"><a href=\"../member-agreement.html\">Membership Agreement</a></li>\n\t\t<li class=\"\"><a href=\"../procedures.html\">Procedures</a></li>\n\t</ul>\n\t</li>\n</ul>\n\n  </div> <!-- nav -->\n\n  <div class=\"clearer\"></div>\n\n  <div class=\"pagefooter\">\n<p>dwarfstd.org is supported by <a href=\"https://sourceware.org/\">Sourceware</a>.\nContributions are welcome.</p>\n<p>Copyright &copy; 2023 DWARF Debugging Information Format Committee</p>\n<p><a rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by/4.0/88x31.png\" /></a><br />\nThis work is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\">Creative Commons Attribution 4.0 International License</a>.</p>\n\n  </div> <!-- footer -->\n</body>\n</html>\n", "l>\n\n  </div> <!-- nav -->\n\n  <div class=\"clearer\"></div>\n\n  <div class=\"pagefooter\">\n<p>dwarfstd.org is supported by <a href=\"https://sourceware.org/\">Sourceware</a>.\nContributions are welcome.</p>\n<p>Copyright &copy; 2023 DWARF Debugging Information Format Committee</p>\n<p><a rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by/4.0/88x31.png\" /></a><br />\nThis work is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by/4.0/\">Creative Commons Attribution 4.0 International License</a>.</p>\n\n  </div> <!-- footer -->\n</body>\n</html>\n"], "copyright__copyright__copyright": ["rresponding debugging compilation unit\" or not?  This \nparagraph states there is such \"exists for\" - \"corresponding\" (expecting just\nby matching the FDE address range to DW_AT_low_pc/DW_AT_high_pc/DW_AT_ranges).\n\n--\n\nRevised text:\n     6.4.2, bullet 1:\n     DW_OP_call2, DW_OP_call4 and DW_OP_call_ref operators are not\n     allowed in an operand of these instructions because\n     the call frame information must not depend on other\n     debug sections.\n\nAccepted with modifications -- May 15, 2012."]}