<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 11, 2016, at 9:20 AM, David Blaikie via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Nov 11, 2016 at 9:08 AM Reid Kleckner <<a href="mailto:rnk@google.com" class="">rnk@google.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On Fri, Nov 11, 2016 at 8:13 AM, David Blaikie via cfe-dev <span dir="ltr" class="gmail_msg"><<a href="mailto:cfe-dev@lists.llvm.org" class="gmail_msg" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_quote gmail_msg"><span class="gmail_msg"><div dir="ltr" class="gmail_msg">My knee-jerk reaction is that this could just as well live in LLDB if there are no other users - though Keno points out he could use it in Julia, so that seems like potentially sufficient interest to demonstrate that it might be a reasonable/reusable abstraction.</div></span></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">I think this functionality should live in the clang codebase. The AST has a surprising number of invariants that are easy to violate. Right now LLDB is super tightly coupled to clang because it has to carefully learn and satisfy those invariants.</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">I'm not sure having it in the Clang codebase is going to make that much/any easier to satisfy, it may shift the burden to the Clang project/developers which is why I wonder whether it's a cost worth adding to the Clang project/gating Clang changes on. If it's a service Clang (as a project) thinks is worth vending to users, sure enough.</div></div></div></div></blockquote><div><br class=""></div><div>I think that shifting the burden of keeping it working to Clang is good for anyone who wants LLDB to be a stable and reliable debugger, which I think is good for (the Royal) LLVM.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">The approach taken in LLDB is to essentially "deserialize" DWARF into ASTs. If we consider DWARF to be a stable serialization of the AST,<br class=""></div></div></div></div></blockquote><div class=""><br class=""></div><div class="">I wouldn't really think of it that way - for one thing, there's lots of DWARF generated by things other than Clang (even for C++), so I don't see the symmetry quite as much here.</div></div></div></div></blockquote><div><br class=""></div><div>I agree with Dave here. We can’t really think of DWARF as a bi-directional serialization to ASTs. We really need to be able to generate reasonable ASTs from DWARF created by multiple versions of Clang, GCC, ICC, and any other C/C++/Obj-C(/Julia) compiler anyone wants LLDB to support. </div><div><br class=""></div><div>-Chris</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">then the reading logic should live near the writing logic, which is currently in clang/lib/CodeGen/CGDebugInfo.cpp.</div></div></div></div></blockquote><div class=""><br class="">Just my 2c.<br class=""><br class="">- Dave </div></div></div>
_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></body></html>