<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 20, 2016 at 9:10 AM, Aboud, Amjad <span dir="ltr"><<a href="mailto:amjad.aboud@intel.com" target="_blank">amjad.aboud@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi David,<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Yes, when I say that GDB 7.10 does the right thing, I meant that when stepping in inlined subroutine, it can find the direct
 children of the local scope based on the information appears in the correlated abstract block.<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><span>2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><u></u><span dir="LTR"></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">When I did my previous (initial) check, I was using an older version of GDB (7.6), so I am not sure when exactly this change/fix
 was applied between 7.6 and 7.10.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Adrian can use the patches from these code review:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="http://reviews.llvm.org/D15976" target="_blank">http://reviews.llvm.org/D15976</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="http://reviews.llvm.org/D15977" target="_blank">http://reviews.llvm.org/D15977</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I would like to hear from Adrian how far LLDB is from supporting this feature.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">If you think that it would take time before LLDB is fixed, we may consider committing the workaround solution first, and keep the final solution commented out.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Once again, the difference between both solutions is few lines.</span></p></div></div></blockquote><div><br></div><div>Thanks for mentioning this ^ again, I must've missed it the first time/haven't looked closely enough at the patches. If that's the case, I don't mind so much - possibly even include it under a flag or the like. I'll have to see what it looks like in the code when I get to that.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">The above patches contain only the final solution as proposed below.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Amjad<u></u><u></u></span></p>
<p class="MsoNormal"><a name="-1357824421__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> David Blaikie [mailto:<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>]
<br>
<b>Sent:</b> Wednesday, January 20, 2016 01:48<br>
<b>To:</b> Aboud, Amjad; Adrian Prantl<br>
<b>Cc:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>; Merritt, Steve; Wyma, Brock<br>
<b>Subject:</b> Re: [llvm-dev] RFC: Supporting all entities declared in lexical scope in LLVM debug info<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Dec 14, 2015 at 7:01 AM, Aboud, Amjad via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="color:#1f497d">Hi,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">I verified that GDB 7.10 does support “DW_AT_abstract_origin” attribute on “DW_TAG_lexical_block”.</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I take it you mean that it does the right thing, finding the direct children of the abstract block when stepping into the inlined subroutine, etc?<br>
<br>
& this was a recent change/fix - because you'd verified that this did not work previously/in recent past GDB versions?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="color:#1f497d">This means, that we can implement the proposal I suggested below, and there is no need to open a change request for GDB.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">However, I am not sure about LLDB.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">My understanding is that LLDB does not support declarations inside lexical block properly.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">In the below example, the following command on LLDB:</span><u></u><u></u></p>
<p><span style="font-family:Wingdings;color:#1f497d">Ø</span><span style="font-size:7.0pt;color:#1f497d"> 
</span><span style="color:#1f497d">ptype A</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Will print two suggestions for “A”:</span><u></u><u></u></p>
<p><span style="color:#1f497d">1.</span><span style="font-size:7.0pt;color:#1f497d">     
</span><span style="color:#1f497d">float</span><u></u><u></u></p>
<p><span style="color:#1f497d">2.</span><span style="font-size:7.0pt;color:#1f497d">     
</span><span style="color:#1f497d">int</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Adrian - want to test this sort of thing on LLDB? (Amjad - do you have a quick hack/patch Adrian could apply to generate a simple example on MacOS to test with LLDB there?) Would you want us to consider this a bug in LLDB & just forge ahead
 fixing this the right way? Or implement a fallback that duplicates local types/using declarations/static variables into the inlined subroutines rather than only emitting them in the abstract definition?<br>
<br>
- Dave<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Letting the user decide what is the proper type from the list of possible answers.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Unless there are any real concerns regarding this proposal, I intend to start uploading the implementation soon.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Please, let me know if you have any comment or feedback.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Thanks,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Amjad</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><a name="-1357824421_-1608541756__MailEndCompose"><span style="color:#1f497d"> </span></a><u></u><u></u></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>]
<b>On Behalf Of </b>Aboud, Amjad via llvm-dev<br>
<b>Sent:</b> Wednesday, November 18, 2015 16:58<br>
<b>To:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<b>Cc:</b> Merritt, Steve; Wyma, Brock<br>
<b>Subject:</b> [llvm-dev] RFC: Supporting all entities declared in lexical scope in LLVM debug info<u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Hi,</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">I would like to implement a fix to how LLVM handles/creates debug info for entities declared inside a basic block.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Below you will find 5 parts:</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">1.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Motivation for this fix.</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">2.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Background explaining the cases that need to be fixed.</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">3.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">An example for each case.</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">4.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Proposal on how to represent each case in dwarf.</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">5.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Secondary (workaround) proposal which might be needed in the short term until applying a fix in GDB debugger.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Please, let me know if you have any comment or feedback on this approach.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Thanks,</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Amjad</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><b><u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Motivation</span></u></b><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Current implementation causes loss of debug info, even when optimizations are disabled.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">For example:</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">int foo(bool b) {</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  if (b) {</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    typedef int A;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    class B { public: int x; };</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    B y;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    static A z = 0;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    return  y.x + z++;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  } else {</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    typedef float A;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    class B { public: float x; };</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    B y;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    static A z = 0.0;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    return  (int)(y.x + z++);</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  }</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">}</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">In the above example, debugger will not be able to fetch the correct value for types "A" and "B" and for local static variable "z", however
 it will work fine with local variable "y".</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">The local static variable has an open ticket in LLVM Bugzilla:</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><a href="https://llvm.org/bugs/show_bug.cgi?id=19238" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=19238</a></span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><b><u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Background</span></u></b><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">These are all the entities that can be declared inside a lexical scope (i.e. function or basic block):</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">1.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Local variable</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">2.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Local static variable</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">3.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Imported Entity</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.75in;vertical-align:middle">
<span style="color:black">a.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Imported declaration</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.75in;vertical-align:middle">
<span style="color:black">b.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Imported module</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">4.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Type</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.75in;vertical-align:middle">
<span style="color:black">a.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Record (structure, class, union)</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.75in;vertical-align:middle">
<span style="color:black">b.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Typedef</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">In the current LLVM implementation only (1) the local variables are handled correctly.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) local static variables and (4) Types are associated in clang-FE to the function lexical scope even when they are declared in an internal
 basic block.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3)  Imported Entity is handled differently depends on where it is declared, in function lexical scope or in basic block scope.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">There are two interesting cases where we should consider the representation in dwarf for the above entities:</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">a.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Function was not inlined - has one concrete entry.</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">b.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Function was inlined - has one abstract entry, one or more inlined entries, and possibly one concrete entry.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">The goal is to be able to debug all the above entities in case (a) - which is the common case when compile with no optimizations. But also,
 we would like to be able to debug as many entities as we can also in case (b), the optimized mode.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><b><u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Example</span></u></b><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">These are two examples that represent cases (a) and (b) with all the entities mentioned above.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">// (Case a)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">namespace N {</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  class D;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">};</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">int foo() {</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  {</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    using namespace N;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    using N::D;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    typedef int A;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    class B { public: int x; };</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    B y;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    static A z = 0;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    return  y.x + z++;</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  }</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">}</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">// (Case b)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">__attribute__(always_inline)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">int foo(bool b) {</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  // same as case (a)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">}</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">int bar() {</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  return foo();</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">}</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><b><u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Proposed representation in dwarf</span></u></b><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Case (a) - There is only one concrete function with one lexical block (DW_TAG_lexical_block) entry. Each entity will have a dwarf entry placed
 under the lexical block scope the same as appear in the source.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(1) DW_TAG_subprogram (concrete)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "foo")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) LexicalBlock</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_imported_module</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_import (=> N)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_imported_declaration</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_import (=> N::D)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_typedef
</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name  (= "A")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_type (=> int)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_class_type
</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name  (= "B")</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(4) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "x")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_type (= int)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "y")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_type (=> B)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_location</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "z")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_type (= A)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_location</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Case (b) - There is one abstract function, one inline function (DW_TAG_inlined_subroutine) and one concrete function,  each has one lexical
 block entry.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Each entity will have a dwarf entry placed under the lexical block scope of the abstract function. Where these entries will contain all the
 debug info attributes for the represented entity, except for the local variable that will be missing the location attribute (DW_AT_location), as it is not common to all inline/concrete functions.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">In addition, under each lexical block entry in the inline/concrete function entry there will be:</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">1.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Abstract origin attribute (DW_AT_abstract_origin) pointing to the equivalent lexical block entry in the abstract function.</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<span style="color:black">2.</span><span style="font-size:7.0pt;color:black">     
</span><span style="color:black">Local variable entry - with abstract origin attribute pointing to the one in the abstract function, and also the location attribute.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(1) DW_TAG_subprogram (abstract)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "foo")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_inline</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) LexicalBlock</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_imported_module</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_import (=> N)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_imported_declaration</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_import (=> N::D)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_typedef
</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name  (= "A")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_type (=> int)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_class_type
</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name  (= "B")</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(4) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "x")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_type (= int)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "y")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_type (=> B)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "z")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_type (=> A)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_location</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(1) DW_TAG_subprogram (concrete)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract function "foo")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) LexicalBlock</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract lexical block)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract variable "y")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_location</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(1) DW_TAG_subprogram</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "bar")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) DW_TAG_inlined_subroutine (inline)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract function "foo")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) LexicalBlock</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract lexical block)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(4) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract variable "y")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_location</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">This would be the optimal solution if GDB would support the "DW_AT_abstract_origin" attribute on lexical block.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">The idea of having this variable on lexical block is to inform the debugger that all attributes and (direct) children of the abstract lexical
 block are available for the inline/concrete lexical block as well.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">GDB does not support the above proposal and I suggest to open a bug on GDB debugger to support this.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Do you think otherwise?</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><b><u><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Workaround solution</span></u></b><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">In the meanwhile and till GDB implement the above requirement, we can implement a different approach for case (b), that will allows GDB to
 provide information on all entities in the inline/concrete function (except for types).</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">The abstract function will still be the same, however the inline/concrete functions will be changed as follow:</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(1) DW_TAG_subprogram (concrete)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract function "foo")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) LexicalBlock</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_imported_module</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_import (=> N)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_imported_declaration</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_import (=> N::D)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract variable "y")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_location</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract static variable "z")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(1) DW_TAG_subprogram</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_name (= "bar")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) DW_TAG_inlined_subroutine (inline)</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract function "foo")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) LexicalBlock</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_pc</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_low_high</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(4) DW_TAG_imported_module</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_import (=> N)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(4) DW_TAG_imported_declaration</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_import (=> N::D)</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(4) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract variable "y")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_location</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(4) DW_TAG_variable</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">DW_AT_abstract_origin  (=> abstract static variable "z")</span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">I already have an implementation for this proposal and the changes between the optimal solution, which needs support from GDB, and the workaround
 solution is minimal.</span><u></u><u></u></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited<u></u><u></u></p>
<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.<u></u><u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited<u></u><u></u></p>
<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div></div></div>
</div><div><div class="h5">
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited</p>

<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p></div></div></div>

</blockquote></div><br></div></div>