Skip to content

Commit 8193832

Browse files
authored
[lldb] Search main function with lldb::eFunctionNameTypeFull when getting default file and line. (llvm#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.
1 parent 70af40b commit 8193832

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Core/SourceManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ SourceManager::GetDefaultFileAndLine() {
430430
false; // Force it to be a debug symbol.
431431
function_options.include_inlines = true;
432432
executable_ptr->FindFunctions(main_name, CompilerDeclContext(),
433-
lldb::eFunctionNameTypeBase,
433+
lldb::eFunctionNameTypeFull,
434434
function_options, sc_list);
435435
for (const SymbolContext &sc : sc_list) {
436436
if (sc.function) {

0 commit comments

Comments
 (0)