[all-commits] [llvm/llvm-project] 3b0f38: [LLDB][NativePDB] Fix parameter size for member fu...

Zequan Wu via All-commits all-commits at lists.llvm.org
Thu Oct 27 16:36:19 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b0f38bb5186cdda52ab38b13965678036aba22c
      https://github.com/llvm/llvm-project/commit/3b0f38bb5186cdda52ab38b13965678036aba22c
  Author: Zequan Wu <zequanwu at google.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp

  Log Message:
  -----------
  [LLDB][NativePDB] Fix parameter size for member functions LF_MFUNCTION

Fix the problem that it was treating member functions as non-member functions
when trying to get the parameter size. This causes some non-parameter variables
showing up in function signature. Suprisingly,
`cantFail(TypeDeserializer::deserializeAs<ProcedureRecord>(...))` just sliently
parse it without error and gave the wrong result.

It's hard to test it. This only causes problem when `params_remaining`
is larger than the real parameter size. If it's smaller, we also check
individual local variable's attribute to see it's a parameter. When I trying to
come up with a test, the parameter size is always 0 if we parse LF_MFUNCTION as
LF_PROCEDURE.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D136209




More information about the All-commits mailing list