<div dir="ltr"><a class="GWVZpf fW" id="IloFPc-2" href="mailto:majnemer@google.com" tabindex="-1">+David Majnemer</a> <br><br><div class="gmail_quote">On Wed Feb 18 2015 at 10:58:26 AM Kate Stone <<a href="mailto:katherine_stone@apple.com">katherine_stone@apple.com</a>> 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">The new demangler was introduced in LLDB because while it does not yet support the full Itanium ABI C++ mangling specification, LLDB often demangles huge numbers of symbols to enable friendly breakpoint matching commands. So it made sense to have a “fast path” even while a full replacement wasn’t yet available. I think it makes a lot of sense to migrate the project to LLVM once it covers more of the mangling specification.<div><br></div><div>I would be happy to correspond with anyone who is considering contributing to the effort.<br><div></div></div></div><div style="word-wrap:break-word"><div><div><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="font-family:LucidaGrande;word-wrap:break-word"><font color="#424242" style="font-family:'Lucida Grande';font-size:x-small">Kate Stone</font><span style="font-family:'Lucida Grande';font-size:x-small"> </span><font color="#009193" style="font-family:'Lucida Grande';font-size:x-small"><a href="mailto:k8stone@apple.com" target="_blank">k8stone@apple.com</a></font></div><div style="font-family:Times;word-wrap:break-word"><font face="Lucida Grande" size="1"><font color="#009193"></font> Xcode <font color="#424242">Runtime Analysis Tools</font></font></div></div></div>
</div>
<br></div></div></div><div style="word-wrap:break-word"><div><div><div><blockquote type="cite"><div>On Feb 18, 2015, at 10:49 AM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:</div><br><div><div dir="ltr">FWIW there's been some discussion on this side about writing a new ABI-agnostic demangler and putting in LLVM. That seems like the more logical place for any kind of demangler, so hopefully we can coordinate so that we don't duplicate effort. <br></div><br><div class="gmail_quote">On Wed Feb 18 2015 at 10:45:57 AM Kate Stone <<a href="mailto:katherine_stone@apple.com" target="_blank">katherine_stone@apple.com</a>> 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">As this code is literally a copy of demangler sources from another project with strategic bug fixes I would recommend leaving it as is. It is possible that it will be replaced wholesale from time to time until I find the time to finish replacing it with the fast demangler.<div><br><div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="font-family:LucidaGrande;word-wrap:break-word"><font color="#424242" style="font-family:'Lucida Grande';font-size:x-small">Kate Stone</font><span style="font-family:'Lucida Grande';font-size:x-small"> </span><font color="#009193" style="font-family:'Lucida Grande';font-size:x-small"><a href="mailto:k8stone@apple.com" target="_blank">k8stone@apple.com</a></font></div><div style="font-family:Times;word-wrap:break-word"><font face="Lucida Grande" size="1"><font color="#009193"></font> Xcode <font color="#424242">Runtime Analysis Tools</font></font></div></div></div>
</div></div></div><div style="word-wrap:break-word"><div>
<br><div><blockquote type="cite"><div>On Feb 18, 2015, at 10:27 AM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:</div><br><div><div dir="ltr">Yea I figured this wasn't going to be a problem because the demangling path on Windows is like 10 lines to call into a Windows API to demangle for us. On the other hand, it looks like an easy fix to change it to not use template aliases. But since for all practical purposes Windows is the only platform that this matters for, I guess someone who is more of a style guide purist than me would have to make the change as I'm not motivated enough to do so. Looks like just a couple of simple replacements though.<br><div><br></div><div>As long as we don't use template aliases for new code going forward though, I'm happy. They're mostly just syntactic sugar anyway, so they're never necessary to achieve something that you couldn't do otherwise.</div></div><br><div class="gmail_quote">On Wed Feb 18 2015 at 10:21:45 AM <<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That code is actually from a copy of the llvm cxa_demangle.cpp (look at the comment around line 33 of that file.<br>
<br>
We had to include this because the demangler that shipped with the system for certain OS X releases crashed for some bad input. We couldn't get a fix into the OS right away, so we put a fixed version into lldb. You will only use it if you define LLDB_USE_BUILTIN_DEMANGLER, presumably you wouldn't do that on Windows.<br>
<br>
I don't think we need to muck with this code...<br>
<br>
Jim<br>
<br>
<br>
> On Feb 18, 2015, at 3:55 AM, Tamas Berghammer <<a href="mailto:tberghammer@google.com" target="_blank">tberghammer@google.com</a>> wrote:<br>
><br>
> I removed the alias template from GDBRemoteCommunicationServerCo<u></u>mmon.h but there are still some template aliases in the code base. Based on my first check (not necessarily complete) I find two more usage of template aliases in source/Core/Mangled.cpp lines 4867 and 4868. I have no idea about how that part of the code works and if it can cause any issue with MSVC or not but we should consider removing it also (it is in the code base since 2013-10-30).<br>
><br>
> Tamas<br>
><br>
> On Tue, Feb 17, 2015 at 11:33 PM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
> +<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a> since this is of general interest.<br>
><br>
> A little background: template aliases are a new C++11 feature. If you aren't familiar with it, then the simple TL;DR version of it is that it's like a template typedef. The syntax for using one looks like this:<br>
><br>
> template<class T><br>
> using Foo = std::list<T> // Foo<T> is the same as std::list<T> now.<br>
><br>
> Up until last weekend, LLVM's minimum toolchain requirement was MSVC 2012, which did not support template aliases at all, so they were banned. Last weekend we upgraded the minimum required version to MSVC 2013, which we thought would allow template aliases to be used. Unfortunately, this is not the case. A base install of MSVC 2013 with no updaets will still not compile template aliases. I believe we're actually requiring MSVC 2013 Update 4 as the baseline, but sadly this doesn't fix the problem. A fully updated MSVC 2013 will compile them, but generate incorrect code. This is more sinister, since it means you can use them, but the code won't work.<br>
><br>
> As a result, template aliases are still banned until we upgrade the minimum required version to 2015, which will still be a while as it's not officially out yet. Please keep this in mind and try not to use them when writing new code. Thanks!<br>
><br>
><br>
><br>
> On Tue Feb 17 2015 at 3:21:03 PM Vince Harron <<a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a>> wrote:<br>
> Hi Tamas,<br>
><br>
> zturner@ informed me that MSVC 2013 doesn't generate correct code for template alases. Can you remove your use on<br>
><br>
> "<u></u>GDBRemoteCommunicationServerCo<u></u>mmon.h, lines 182 and 183"<br>
><br>
> Thanks,<br>
><br>
> Vince<br>
><br>
><br>
> --<br>
><br>
> Vince Harron | Technical Lead Manager | <a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a> | 858-442-0868<br>
><br>
><br>
> ______________________________<u></u>_________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-dev</a><br>
<br>
</blockquote></div>
_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br></div></blockquote></div><br></div></div></blockquote></div>
</div></blockquote></div><br></div></div></div></blockquote></div></div>