[Lldb-commits] [PATCH] D113930: [LLDB][NativePDB] Fix function decl creation for class methods

Zequan Wu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 3 16:36:54 PST 2021


zequanwu marked an inline comment as done.
zequanwu added inline comments.


================
Comment at: lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp:89
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (void)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"
----------------
zequanwu wrote:
> rnk wrote:
> > I guess the test isn't able to differentiate whether these methods are static, private, etc. =/
> > 
> > We can overlook that for now, but I think now is the time to invest in better testing tools. The lldb-test program can do whatever you need it to, I don't think changing it requires updating that many tests, I think it's something you should look into.
> There is already a way to get those info (static, virtual, except access type) using `lldb-test symbols --dump-ast ...`. It prints `Clang::Decl` which has those info. However, it has a bug in NativePDB plugin. It prints the methods twice. Maybe we can just check once for each method in the test? 
> 
> `lldb-test symbols --find=functions` prints `lldb_private::Function` which doesn't have those info (static/virtual). 
> 
> So, we can either just use `lldb-test symbols --dump-ast ...` but check only once for each method or use `lldb-test symbols --find=functions`.
> 
> Both commands just crash without this change.
D115062 adds access type when dumping the ast using `lldb-test symbols --dump-ast`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113930



More information about the lldb-commits mailing list