<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 4, 2017, at 10:15 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, May 4, 2017 at 10:07 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><blockquote type="cite" class=""><div class="">On May 4, 2017, at 10:01 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class="m_416468553613146519Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, May 4, 2017 at 9:57 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><blockquote type="cite" class=""><div class="">On May 4, 2017, at 9:46 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class="m_416468553613146519m_9211179634759071990Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, May 4, 2017 at 9:39 AM Greg Clayton <<a href="mailto:clayborg@gmail.com" target="_blank" class="">clayborg@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><blockquote type="cite" class=""><div class="">On May 3, 2017, at 7:38 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class="m_416468553613146519m_9211179634759071990m_-3687203030589247943Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">For illustrative purposes I've attached a version (a patch on top of your patch) of some of what I had in mind - there's a few FIXMEs in there where I stumbled across untested functionality in your patch - so whichever patch/direction ends up being used, there's some missing test coverage to address.<br class=""><br class="">One of the big things I'd misunderstood/hadn't expected was that the visit(DIE) function wasn't recursive. Though the approach I've taken could be implemented without the recursion (checking the depth of nodes and reducing the size of the vector as depths are traversed) I think it's probably a bit easier to read this way.<br class=""><br class="">It seems to simplify things quite a bit, to my mind - and adds a few missing cases in multiple directions.<br class=""></div></div></blockquote><div class=""><br class=""></div></div></div><div style="word-wrap: break-word;" class=""><div class="">I like the recursion aspect.</div><div class=""></div></div><div style="word-wrap: break-word;" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br class="">It looks like the original patch doesn't catch overlap between two lexical scopes in the same subprogram at the same level?<br class=""></div></div></blockquote><div class=""><br class=""></div></div></div><div style="word-wrap: break-word;" class=""><div class="">Yep it doesn't. I will add that.</div><div class=""></div></div><div style="word-wrap: break-word;" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Also it looks like the overlapping function code only considers pairs ({1, 2}, {2, 3}, and so on) - so what about if {1, 3} overlap but neither overlap 2?<br class=""></div></div></blockquote><div class=""><br class=""></div>DieRangeInfos[0] = DW_TAG_compile_unit [0x0000000000001000 - 0x0000000000003000)<br class="">DieRangeInfos[1] = DW_TAG_subprogram   [0x0000000000001000 - 0x0000000000002000)<br class="">DieRangeInfos[2] = DW_TAG_lexical_block[0x0000000000001100 - 0x0000000000001200)<br class="">DieRangeInfos[3] = DW_TAG_subprogram   [0x0000000000003000 - 0x0000000000004000)<br class="">DieRangeInfos[4] = DW_TAG_lexical_block[0x0000000000003100 - 0x0000000000003200)<br class=""><br class=""></div></div><div style="word-wrap: break-word;" class=""><div class="">For the example above we check if any DW_TAG_subprogram is contained in DW_TAG_compile_unit if it has ranges, so it would check [0] contains [1], and [0] contains [2]. There would be no need to check if [1] or [2] contain [3] since it assumed to be its own function. Granted I haven't seen DWARF like this. But the stack still would easily verify all lexical blocks and inlined subroutines correctly , except the overlap between sibling blocks/inlined functions.</div><div class=""><br class=""></div><div class="">Each DW_TAG_subprogram would check any contained DW_TAG_lexical_block or DW_TAG_inlined_subroutine ([1] contains [2], [3] contains [4]). The patch assumes if for some reason a DW_TAG subprogram is contained within anything else that is is stand alone.</div></div></blockquote><div class=""><br class=""></div><div class="">Adrian (Paul?) any thoughts on this? I know it's perhaps overly simplistic, but I like the idea of implementing the "if this DIE has ranges, those ranges must be a subrange of the nearest parent with ranges and not overlap with any other children of that parent" rule.<br class=""><br class="">This is perhaps overly restrictive if you allow for a subprogram defined within another subprogram (where the inner one isn't strictly part of the address range of the outer?)</div></div></div></div></blockquote><div class=""><br class=""></div></div></div><div style="word-wrap: break-word;" class=""><div class=""><div class="">Wouldn't this break for Pascal-style inner functions, where the inner function's DW_TAG_subprogram is a child of the outer one's, but the address ranges are entirely non-overlapping?</div></div></div></blockquote><div class=""><br class="">That's the question - do you have an example of DWARF there?<br class=""></div></div></div></div></blockquote><div class=""><br class=""></div></div></div><div style="word-wrap: break-word;" class=""><div class=""><div class="">This is legal Swift code, for example:</div><div class=""><br class=""></div><div class=""><div class="">func outer(_ a: Int64) -> Int64 {</div><div class="">     func inner(_ b: Int64) -> Int64 {</div><div class="">       return a+b</div><div class="">     }</div><div class="">     return inner(42)</div><div class="">}</div><div class=""><br class=""></div><div class="">and the DWARF output is:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(175, 173, 36);" class="">0x00000059</span><span style="font-variant-ligatures: no-common-ligatures;" class="">:        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(82, 48, 225);" class="">TAG_subprogram</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>[4] *</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                    <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_low_pc</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( 0x0000000000000010 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                    <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_high_pc</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( 0x00000029 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                    <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_frame_base</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( rbp )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                    <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_linkage_name</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">"_TF1a5outerFVs5Int64S0_"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                    <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_name</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">"outer"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                    <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_decl_file</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">"/swift/test/DebugInfo/nested_functions.swift"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                    <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_decl_line</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( 5 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                    <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_type</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(175, 173, 36);" class="">{0x000000e0}</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>( Int64 ) )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                    <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_external</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( true )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255); min-height: 16px;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(175, 173, 36);" class="">0x00000076</span><span style="font-variant-ligatures: no-common-ligatures;" class="">:            <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(82, 48, 225);" class="">TAG_formal_parameter</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>[5]  </span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_location</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( fbreg -8 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_name</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">"a"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_decl_file</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">"/swift/test/DebugInfo/nested_functions.swift"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_decl_line</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( 5 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_type</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(175, 173, 36);" class="">{0x000000e0}</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>( Int64 ) )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255); min-height: 16px;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(175, 173, 36);" class="">0x00000084</span><span style="font-variant-ligatures: no-common-ligatures;" class="">:            <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(82, 48, 225);" class="">TAG_subprogram</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>[4] *</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_low_pc</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( 0x0000000000000040 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_high_pc</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( 0x00000023 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_frame_base</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( rbp )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_linkage_name</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">"_TFF1a5outerFVs5Int64S0_L_5innerfS0_S0_"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_name</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">"inner"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_decl_file</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">"/swift/test/DebugInfo/nested_functions.swift"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_decl_line</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( 12 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_type</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(175, 173, 36);" class="">{0x000000e0}</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>( Int64 ) )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                        <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_external</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( true )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255); min-height: 16px;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(175, 173, 36);" class="">0x000000a1</span><span style="font-variant-ligatures: no-common-ligatures;" class="">:                <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(82, 48, 225);" class="">TAG_formal_parameter</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>[5]  </span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                            <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_location</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( fbreg -8 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                            <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_name</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(52, 188, 38);" class="">"b"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(52, 188, 38); background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                            <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_decl_file</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures;" class="">"/swift/test/DebugInfo/nested_functions.swift"</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>)</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                            <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_decl_line</span><span style="font-variant-ligatures: no-common-ligatures;" class="">( 12 )</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">                            <span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(51, 187, 200);" class="">AT_type</span><span style="font-variant-ligatures: no-common-ligatures;" class="">(<span class="Apple-converted-space"> </span></span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(175, 173, 36);" class="">{0x000000e0}</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="Apple-converted-space"> </span>( Int64 ) )</span></div></div></div>...</div><div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Interesting choice given the history/precedent of GCC & Clang's output (& thus what GDB consumes) for nested functions like lambdas and blocks where the definition is certainly nested, but it's not described that way in DWARF, but certainly closer to the source.<br class=""><br class="">Fair enough, then. Guess the general "all ranges are subsets of parent ranges" doesn't quite hold & needs a bunch of special handling for subprograms - looking more like Greg's original implementation.</div></div></div></div></blockquote><br class=""></div><div>I am making a hybrid that I think you'll like better that will work for all cases. I also am adding checking if two lexical blocks or inline subroutines overlap.</div><div><br class=""></div></body></html>