summaryrefslogtreecommitdiff
path: root/lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp
AgeCommit message (Collapse)Author
2025-10-07Reland "[LLDB][NativePDB] Create functions with mangled name" (#161678)nerix
Relands #149701 which was reverted in https://github.com/llvm/llvm-project/commit/185ae5cdc695248b58ae017508cc764c19bee5b7 because it broke demangling of Itanium symbols on i386. The last commit in this PR adds the fix for this (discussed in #160930). On x86 environments, the prefix of `__cdecl` functions will now be removed to match DWARF. I opened #161676 to discuss this for the other calling conventions.
2025-09-25Revert "[LLDB][NativePDB] Create functions with mangled name (#149701)"Martin Storsjö
This reverts commit e98f34eb08b2bf7aed787e7f8a7cea9111f044c8. This broke demangling of Itanium symbols on i386.
2025-09-24[LLDB][NativePDB] Create functions with mangled name (#149701)nerix
Before, functions created using the NativePDB plugin would not know about their mangled name. This showed when printing a stacktrace. There, only the function name was shown. For https://github.com/llvm/llvm-project/issues/143149, the mangled function name is required to separate different parts. This PR adds that name if available. The Clang AST nodes also take in a mangled name, which was previously unset. I don't think this unblocks anything further, because Clang can mangle the function anyway.
2025-08-12Reland "[LLDB][NativePDB] Find functions by basename" ( #152295) (#153160)nerix
Relands #152295. Checking for the overloads did not account for them being out of order. For example, [the failed output](https://github.com/llvm/llvm-project/pull/152295#issuecomment-3177563247) contained the overloads, but out of order. The last commit here fixes that by using `-DAG`. --------- Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>
2025-08-11Revert "[LLDB][NativePDB] Find functions by basename" (#153131)Jonas Devlieghere
Reverts llvm/llvm-project#152295
2025-08-11[LLDB][NativePDB] Find functions by basename (#152295)nerix
This adds the ability for functions to be matched by their basename. Before, the globals were searched for the name. This works if the full name is available but fails for basenames. PDB only includes the full names of functions, so we need to cache all basenames. This is (again) very similar to [SymbolFilePDB](https://github.com/llvm/llvm-project/blob/b242150b075a8a720b00821682a9469258bbcd30/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp#L1291-L1383). There are two main differences: - We can't just access the parent of a function to determine that it's a member function - we need to check the type of the function, and its "this type". - SymbolFilePDB saved the full method name in the map. However, when searching for methods, only the basename is passed, so the function never found any methods. Fixes #51933. --------- Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>
2021-12-07[LLDB][NativePDB] Fix function decl creation for class methodsZequan Wu
This is a split of D113724. Calling `TypeSystemClang::AddMethodToCXXRecordType` to create function decls for class methods. Differential Revision: https://reviews.llvm.org/D113930
2021-11-29[LLDB][NativePDB] fix find-functions.cpp failure on windows bots (2)Zequan Wu
2021-11-29[LLDB][NativePDB] fix find-functions.cpp failure on windows botsZequan Wu
2021-11-23[LLDB][NativePDB] Allow find functions by full namesZequan Wu
I don't see a reason why not to. If we allows lookup functions by full names, I can change the test case in D113930 to use `lldb-test symbols --find=function --name=full::name --function-flags=full ...`, though the duplicate method decl prolem is still there for `lldb-test symbols --dump-ast`. That's a seprate bug, we can fix it later. Differential Revision: https://reviews.llvm.org/D114467