> On Oct 25, 2017, at 6:05 PM, Zachary Turner <ztur...@google.com> wrote:
> 
> 
> 
> On Wed, Oct 25, 2017 at 4:59 PM Jim Ingham via Phabricator 
> <revi...@reviews.llvm.org <mailto:revi...@reviews.llvm.org>> wrote:
> jingham added a comment.
> 
> Note, BTW, we absolutely need some way to say "this symbol from this 
> library".  But first of all, if we're going to do this you need to be able to 
> mix & match within an expression which you can't do with a flag to expr.   
> Instead you need something like:
> 
> (lldb) expr $$MyDylib$my_symbol + $$MyOtherDylib$my_other_symbol
> 
> That syntax is ugly, we should try to think of something better.  But the 
> main point is this should only be necessary when lldb can't find a unique 
> symbol.  When we can no intervention should be required.
> 
> +1, this is very useful.  The Microsoft syntax for this is here:
> 
> https://docs.microsoft.com/en-us/visualstudio/debugger/context-operator-cpp 
> <https://docs.microsoft.com/en-us/visualstudio/debugger/context-operator-cpp>
> 
> Which is pretty nice imo

The main reason for using $ decorated names is because clang will accept them 
as identifiers and ask us about them. So "$$MyOtherDylib$my_other_symbol" is 
just a valid identifier and would result in a find external lexical decl call 
that we can fill in with whatever we want. 

We don't really want to muck with clang by overloading stuff with symbols that 
would hose up clang (like the MSVC examples "{,,EXAMPLE.dll}SomeFunction", 
"EXAMPLE.dll!SomeFunction", and "{,,"a long, long, library name.dll"}g_Var". 
The { } and , characters would hose up the expression parser. So I would vote 
to use the $ decoration as Jim suggested.

Greg
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to