<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 14, 2015 at 7:01 AM, Aboud, Amjad via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</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="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal"><span style="color:#1f497d">Hi,<u></u><u></u></span></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></p></div></div></blockquote><div><br></div><div>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?<br></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="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><span style="color:#1f497d"><u></u><u></u></span></p>
<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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">However, I am not sure about LLDB.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">My understanding is that LLDB does not support declarations inside lexical block properly.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">In the below example, the following command on LLDB:<u></u><u></u></span></p>
<p><u></u><span style="font-family:Wingdings;color:#1f497d"><span>Ø<span style="font:7.0pt "Times New Roman""> 
</span></span></span><u></u><span dir="LTR"></span><span style="color:#1f497d">ptype A<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Will print two suggestions for “A”:<u></u><u></u></span></p>
<p><u></u><span style="color:#1f497d"><span>1.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:#1f497d">float<u></u><u></u></span></p>
<p><u></u><span style="color:#1f497d"><span>2.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:#1f497d">int<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u></span></p></div></div></blockquote><div><br></div><div>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</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="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><span style="color:#1f497d"> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Letting the user decide what is the proper type from the list of possible answers.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Please, let me know if you have any comment or feedback.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Amjad<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><a name="-1608541756__MailEndCompose"><span style="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>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 class="h5">
<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,<u></u><u></u></span></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.<u></u><u></u></span></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:<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>1.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Motivation for this fix.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>2.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Background explaining the cases that need to be fixed.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>3.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">An example for each case.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>4.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Proposal on how to represent each case in dwarf.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>5.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Secondary (workaround) proposal which might be needed in the short term until applying a fix in GDB debugger.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Thanks,<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Amjad<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><u></u><u></u></span></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.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">For example:<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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) {<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  if (b) {<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    typedef int A;<u></u><u></u></span></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; };<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    B y;<u></u><u></u></span></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;<u></u><u></u></span></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++;<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  } else {<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    typedef float A;<u></u><u></u></span></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; };<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    B y;<u></u><u></u></span></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;<u></u><u></u></span></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++);<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  }<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">}<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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".<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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:<u></u><u></u></span></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><u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><u></u><u></u></span></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):<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>1.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Local variable<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>2.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Local static variable<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>3.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Imported Entity<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.75in;vertical-align:middle">
<u></u><span style="color:black"><span>a.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Imported declaration<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.75in;vertical-align:middle">
<u></u><span style="color:black"><span>b.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Imported module<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>4.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Type<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.75in;vertical-align:middle">
<u></u><span style="color:black"><span>a.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Record (structure, class, union)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.75in;vertical-align:middle">
<u></u><span style="color:black"><span>b.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Typedef<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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.<u></u><u></u></span></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.<u></u><u></u></span></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.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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:<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>a.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Function was not inlined - has one concrete entry.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>b.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Function was inlined - has one abstract entry, one or more inlined entries, and possibly one concrete entry.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><u></u><u></u></span></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.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">// (Case a)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">namespace N {<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  class D;<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">};<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">int foo() {<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  {<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    using namespace N;<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    using N::D;<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    typedef int A;<u></u><u></u></span></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; };<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">    B y;<u></u><u></u></span></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;<u></u><u></u></span></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++;<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  }<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">}<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">// (Case b)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">__attribute__(always_inline)<u></u><u></u></span></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) {<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">}<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">int bar() {<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">  return foo();<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">}<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><u></u><u></u></span></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.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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)<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) LexicalBlock<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></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<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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
<u></u><u></u></span></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")<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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
<u></u><u></u></span></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")<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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)<u></u><u></u></span></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<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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)<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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.<u></u><u></u></span></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.<u></u><u></u></span></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:<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>1.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></span><span style="color:black">Abstract origin attribute (DW_AT_abstract_origin) pointing to the equivalent lexical block entry in the abstract function.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle">
<u></u><span style="color:black"><span>2.<span style="font:7.0pt "Times New Roman"">     
</span></span></span><u></u><span dir="LTR"></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.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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)<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) LexicalBlock<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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
<u></u><u></u></span></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")<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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
<u></u><u></u></span></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")<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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)<u></u><u></u></span></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<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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)<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) LexicalBlock<u></u><u></u></span></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)<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></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"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></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)<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) LexicalBlock<u></u><u></u></span></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)<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></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"> <u></u><u></u></span></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.<u></u><u></u></span></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.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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.<u></u><u></u></span></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?<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><u></u><u></u></span></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).<u></u><u></u></span></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:<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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)<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(2) LexicalBlock<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></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<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></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)<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">(3) LexicalBlock<u></u><u></u></span></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<u></u><u></u></span></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<u></u><u></u></span></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"> <u></u><u></u></span></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<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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)<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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<u></u><u></u></span></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")<u></u><u></u></span></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"> <u></u><u></u></span></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"> <u></u><u></u></span></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.<u></u><u></u></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <u></u><u></u></span></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 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>

<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>