<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 29, 2015 at 10:48 AM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><span class=""><div>On Apr 29, 2015, at 10:04 AM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div><br></span><div><div dir="ltr"><br><br><div class="gmail_quote"><span class="">On Wed, Apr 29, 2015 at 9:58 AM Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span class="">On Wed, Apr 29, 2015 at 8:20 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Apr 28, 2015, at 6:26 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br><br></span><span class="">
> Could you revert & I'll look into getting you a reduced test case/demonstration of the issue? (can you run GDB 7.5? Perhaps a simple test case would demonstrate the issue if you're lucky, otherwise I can reduce one from the failing test case)<br>
<br>
I reverted the commit in r236110. I probably won’t need a reduction — my guess from the log is that gdb expects a local variable to be present.<br>
<br>
My suggestion is to emit local artificial shadow variables and then weaken the Verifier to not verify artificial variables. In a next step, we could use the new debugger tuning target feature to make the artificial local variables and the weakened verifier a gdb-specific behavior, file a bug against gdb, and eventually remove it altogether.<br>
<br></span></blockquote><div><br></div></div></div><span class=""><div dir="ltr"><div class="gmail_quote"><div>FWIW I don't want to use the "tuning" parameters to also affect correctness.</div></div></div></span></blockquote><span class=""><div><br></div><div>OK. Dave and I debated this a little in person, here's a proposal:</div><div><br></div><div>by default it will have the gdb specific behavior, but if you're tuning for lldb (or any other debugger I guess?) it won't be there.</div></span></div></div></div></blockquote><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><div><br></div><div>Thoughts?</div></div></div></div></blockquote><div><br></div></div>I think it’s a fair assumption that many debuggers won’t deal very well with anonymous local variables, from that perspective this is the right decision.<div>(Nitpick: If it is only needed for GDB then it doesn’t seem right to make it the global default, because tuning for gdb will be the default on all non-lldb/sce platforms anyway.)<div><br><div>I really want to push towards making the debug info handling stricter, so I’m unhappy about having the frontend willfully emit broken IR at the moment. But, I also haven’t found a way to emit the local shadow variables in a way that makes the verifier happy and isn’t entirely gross in other respects. I’ll keep looking for a better way to emit this without having to relax the verifier.</div></div></div></div></blockquote><div><br>Im curious though - why is this harder to support than, say, ASan's habit of smooshing all the variables into a single alloca? They seem rather similar to me, but I'm probably missing something.<br><br>- David<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- adrian</div></font></span></div></div></div></blockquote></div><br></div></div>