<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Tim writes:</div><div dir="ltr"><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>DWARF5 Section 2.17.3 explicitly states that <i>Bounded</i> ranges cannot overlap, but there is no comment about contiguous ranges (DW_AT_{low,high}_pc) or <i>Base address</i> range list entries. Is this a case of "the exception that proves the rule"?</div></blockquote><div dir="ltr"><br></div>A "bounded range" is a contiguous range by definition. A base address range entry is not a range at all--it merely modifies how the limit values in following bounded range entries of the same list are interpreted. So what is the problem or question? I see no exception that needs proving...</div><div dir="ltr"><br><div>More completely, DWARF5 states (page 53, lines 15-16):</div><div><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div dir="ltr"><div>Bounded range entries in a range list may not overlap. </div></div></blockquote></div></div><div><br></div><div>That is, the bounded range entries <u>within a single range list</u> may not overlap. There is no restriction against entries in two different lists overlapping. For example, the addresses for a function are necessarily included in the addresses of the containing compilation unit. Their ranges thus overlap--but they have distinct range lists.</div><div><br></div><div>The question about an outlined subprogram is unclear to me. If there are two DW_AT_subprogram entries then each will have a distinct range list. Even if the two units "share" some common code, each list can be complete and include the common code without creating an overlap within its list.<br></div><div><br></div><div>Perhaps I am missing something--if so, please clarify.</div><div><br></div><div>Ron</div><div><br></div>=========================================<br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 22, 2023 at 11:43 PM Tim Haines via Dwarf-discuss <<a href="mailto:dwarf-discuss@lists.dwarfstd.org">dwarf-discuss@lists.dwarfstd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>DWARF5 Section 2.17.3 explicitly states that <i>Bounded</i> ranges cannot overlap, but there is no comment about contiguous ranges (DW_AT_{low,high}_pc) or <i>Base address</i> range list entries. Is this a case of "the exception that proves the rule"?<br></div><div><br></div><div>For DW_TAG_compile_unit and DW_TAG_type_unit entries, I don't think it would ever make sense for a compiler to emit overlapping PC ranges. Am I lacking imagination here? Was there a corner case in DWARF4 that needed this?<br></div><div><br></div><div>For a DW_AT_subprogram entry, it might make sense to have overlapping ranges as it's possible the compiler has outlined the function and created two debug entries: one for the complete function and one for the extracted part.</div><div><br></div><div>Thanks.</div><div>- Tim</div><div><br></div></div>
-- <br>
Dwarf-discuss mailing list<br>
<a href="mailto:Dwarf-discuss@lists.dwarfstd.org" target="_blank">Dwarf-discuss@lists.dwarfstd.org</a><br>
<a href="https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss" rel="noreferrer" target="_blank">https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss</a><br>
</blockquote></div></div>