[lldb-dev] [RFC][PATCH] Keep un-canonicalized template types in the debug information
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Sep 8 14:12:09 PDT 2014
> On 2014 Sep 8, at 15:38, Frédéric Riss <friss at apple.com> wrote:
>
>>
>> On 08 Sep 2014, at 19:31, Greg Clayton <gclayton at apple.com> wrote:
>>
>> This means you will see "S<A>" as the type for your variables in the debugger when you view variables or children of structs/unions/classes. I think this is not what the user would want to see. I would rather see "S<int>" as the type for my variable than see "S<A>”.
>
> I find it more accurate for the debugger to report what has actually been put in the code. Moreover when a typedef is used, it’s usually to make things more readable not to hide information, thus I guess it would usually be as informative while being more compact. The debugger needs to have a way to describe the real type behind the abbreviated name though, we must not have less information compared to what we have today.
>
> Another point: this allows the debugger to know what S<A> actually is. Without it, the debugger only knows the canonical type. This means that currently you can’t copy/paste a piece of code that references that kind of template names and have it parse correctly. I /think/ that having this information in the debug info will allow more of this to work.
>
> But we can agree to disagree :-) It would be great to have more people chime and give their opinion.
>
> Fred
I'm in favour.
More information about the lldb-dev
mailing list