mirror of
https://github.com/siemens-mobile-hacks/llvm-c166.git
synced 2026-11-26 16:40:56 +00:00
SourceManager::GetDefaultFileAndLine locates the executable's main to pick a default source file, used for input like "break set -l N" with no file specified. It searched for main by full name, but a function's linkage name can differ from its source name, in which case a full-name search for "main" does not find it and no default file is chosen. For example, wasi-libc renames main to __main_argc_argv, so on WebAssembly the debug function for main was never matched and "break set -l N" failed with "no default file available". When we can't find "main", fall back to searching by base name. |
||
|---|---|---|
| .. | ||
| main.cpp | ||
| Makefile | ||
| other.cpp | ||
| TestDefaultSourceFile.py | ||