[Lldb-commits] [lldb] [lldb] Search main function with lldb::eFunctionNameTypeFull when getting default file and line. (PR #113980)
Zequan Wu via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 28 16:51:55 PDT 2024
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/113980
This is to work around the fact that `SymbolFileNativePDB::FindFunctions` only support `lldb::eFunctionNameTypeFull` and `lldb::eFunctionNameTypeMethod` now. Since `main`'s full name is the same as base name (`main`), it's okay to search with `lldb::eFunctionNameTypeFull` when trying to get the default file and line. With this, `lldb/test/Shell/Driver/TestSingleQuote.test` passes on Windows with NativePDB plugin.
>From 2d02fdd5ea12cd5c490c313a314dbe1fcf6a81f6 Mon Sep 17 00:00:00 2001
From: Zequan Wu <zequanwu at google.com>
Date: Mon, 28 Oct 2024 15:24:59 -0700
Subject: [PATCH] [lldb] Search main function with lldb::eFunctionNameTypeFull
when getting default file and line.
---
lldb/source/Core/SourceManager.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/source/Core/SourceManager.cpp b/lldb/source/Core/SourceManager.cpp
index fd5b49946c6a92..27a9edeef4249e 100644
--- a/lldb/source/Core/SourceManager.cpp
+++ b/lldb/source/Core/SourceManager.cpp
@@ -430,7 +430,7 @@ SourceManager::GetDefaultFileAndLine() {
false; // Force it to be a debug symbol.
function_options.include_inlines = true;
executable_ptr->FindFunctions(main_name, CompilerDeclContext(),
- lldb::eFunctionNameTypeBase,
+ lldb::eFunctionNameTypeFull,
function_options, sc_list);
for (const SymbolContext &sc : sc_list) {
if (sc.function) {
More information about the lldb-commits
mailing list