labath added a comment.

For dumping a specific type something like this could be right, but for 
"indiscriminately dumping" everything, this seems to be a bit fragile.

Would it be possible to make this use the `SymbolFile::DumpClangAST` method 
(this is what the "image dump ast" lldb command uses), and then possibly change 
that method to include any extra information you need? I already see the 
`DefinitionData` line when i do a "image dump clang ast", so it's possible you 
wouldn't need to change anything there...

FTR, this is what i get from image dump ast:

  Dumping clang ast for 1 modules.
  TranslationUnitDecl 0x561fa5fd9128 <<invalid sloc>> <invalid sloc> 
<undeserialized declarations>
  `-NamespaceDecl 0x561fa5fd99e8 <<invalid sloc>> <invalid sloc> Q
    `-CXXRecordDecl 0x561fa5fd9a70 <<invalid sloc>> <invalid sloc> struct A 
definition
      |-DefinitionData pass_in_registers empty standard_layout 
trivially_copyable has_user_declared_ctor can_const_default_init
      | |-DefaultConstructor exists non_trivial user_provided 
defaulted_is_constexpr
      | |-CopyConstructor simple trivial has_const_param needs_implicit 
implicit_has_const_param
      | |-MoveConstructor exists simple trivial needs_implicit
      | |-CopyAssignment trivial has_const_param needs_implicit 
implicit_has_const_param
      | |-MoveAssignment exists simple trivial needs_implicit
      | `-Destructor simple irrelevant trivial needs_implicit
      `-CXXConstructorDecl 0x561fa5fd9bf0 <<invalid sloc>> <invalid sloc> A 
'void ()'


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