[lldb] Add omitted abstract formal parameters in DWARF symbol files
authorJaroslav Sevcik <jarin@chromium.org>
Sat, 25 Sep 2021 17:29:04 +0000 (19:29 +0200)
committerJaroslav Sevcik <jarin@google.com>
Thu, 21 Oct 2021 10:33:42 +0000 (12:33 +0200)
commit5a3556aa5563fb89693935303463881df44094de
treebe8a0f744a370a5ea7b488eb1dfa07203a749374
parent9ba5bb43099db70031e0df6a438e7cb56fb05540
[lldb] Add omitted abstract formal parameters in DWARF symbol files

This patch fixes a problem introduced by clang change
https://reviews.llvm.org/D95617 and described by
https://bugs.llvm.org/show_bug.cgi?id=50076#c6, where inlined functions
omit unused parameters both in the stack trace and in `frame var`
command. With this patch, the parameters are listed correctly in the
stack trace and in `frame var` command.

Specifically, we parse formal parameters from the abstract version of
inlined functions and use those formal parameters if they are missing
from the concrete version.

Differential Revision: https://reviews.llvm.org/D110571
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/test/API/functionalities/unused-inlined-parameters/Makefile [new file with mode: 0644]
lldb/test/API/functionalities/unused-inlined-parameters/TestUnusedInlinedParameters.py [new file with mode: 0644]
lldb/test/API/functionalities/unused-inlined-parameters/main.c [new file with mode: 0644]
lldb/test/Shell/SymbolFile/DWARF/x86/Inputs/unused-inlined-params.s [new file with mode: 0644]
lldb/test/Shell/SymbolFile/DWARF/x86/unused-inlined-params.test [new file with mode: 0644]