labath added a comment.

Maybe this is my fault since I'm the one who introduced the first bunch of 
arguments here IIRC, but anyway, I have a feeling all of these dumping options 
are getting out of hand. Looking at the argument list, you'd expect that 
-dump-ast, and -dump-clang-ast do something completely different, but they 
actually print the exact same AST, only one allows you to print a subset of it, 
while the other one doesn't.

Given that the ast dumping is currently incompatible with all/most of the other 
dumping options anyway, maybe we should turn over a clean slate, and implement 
a new subcommand specifically dedicated to dumping clang ast (as opposed to the 
internal lldb representations of types/functions/..., which is what the 
"symbols" subcommand started out as, and which is what most of its options are 
dedicated to).

OR, and this would-be super cool, if it was actually possible, we could try to 
make ast-dumping compatible with the existing searching options.  Currently, if 
you type `lldb-test symbols -find=type -name=foo` it will search for types 
named "foo", and print some summary of the lldb object representing that type. 
What if we made it so that adding `-dump-ast` to that command caused the tool 
to dump the *AST* of the types it has found (e.g., in addition to the previous 
summary)? I think that would make the behavior of the tool most natural to a 
new user, but I am not sure whether that would actually fit in with your goals 
here...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67994/new/

https://reviews.llvm.org/D67994



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

Reply via email to