<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 31, 2015 at 9:59 AM, Matt Arsenault <span dir="ltr"><<a href="mailto:Matthew.Arsenault@amd.com" target="_blank">Matthew.Arsenault@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span class="">
    <div>On 07/31/2015 06:46 AM, Robinson, Paul
      wrote:<br>
    </div>
    <blockquote type="cite">
      <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The

          debug info generally should be mapping the source to the
          code/data as actually generated, even after optimizations
          shuffle things around. If the original code thinks it's
          allocating something in AS 0 but optimization puts it in AS 3,
          and the user asks the debugger to display the value, how does
          the debugger know to look in AS 3?  Asking the debugger to
          troll around looking for an instruction that it might guess is
          loading/storing the value and assuming that address is the
          actual location… seems like asking a bit much.<u></u><u></u></span></p>
      <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr<u></u><u></u></span></p>
      <p class="MsoNormal"><a name="14ee50e3c103ca21__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
    </blockquote></span>
    It seems like a single attribute for the debug address space isn't
    enough then to describe both.</div></blockquote><div><br></div><div>Why do you need to describe the original address space, rather than only the one where the value actually resides? What would the debugger use this information for? Does this need to be rendered to the user? For what reason?<br><br>(hmm, speaking of which - perhaps this shouldn't be an attribute on the variable, but instead part of the DWARF expression describing the location of the value? If it's possible that optimizations would put the value in one location with one address space at point A, and a different location in a different address space at point B)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"> I'm fine with just keeping it as the
    constant source, and saying that this is one of those optimizations
    that destroys hope of sensible debugging. We also have some possible
    use cases for non-optimization purposes where an address space ID
    would be changed in the backend, but would be an alias for the
    original address space. The object isn't literally moved to a
    different address space, and is for the backend's benefit so ideally
    the user debugging would never be aware that this occurred.<span class="HOEnZb"><font color="#888888"><br>
    <br>
    -Matt<br>
  </font></span></div>

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