| Issue |
87327
|
| Summary |
Breakpoints don't work for binary compiled with -gdwarf-5 on Windows
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
amordo
|
The session:
```
$ cat main.c
int main()
{
return 0;
}
$ clang --version
clang version 17.0.3
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin
$ clang -gdwarf-5 -fuse-ld=lld main.c -o 5main.exe
lld-link: warning: section name .debug_abbrev is longer than 8 characters and will use a non-standard string table
lld-link: warning: section name .debug_addr is longer than 8 characters and will use a non-standard string table
lld-link: warning: section name .debug_info is longer than 8 characters and will use a non-standard string table
lld-link: warning: section name .debug_line is longer than 8 characters and will use a non-standard string table
lld-link: warning: section name .debug_line_str is longer than 8 characters and will use a non-standard string table
lld-link: warning: section name .debug_str is longer than 8 characters and will use a non-standard string table
lld-link: warning: section name .debug_str_offsets is longer than 8 characters and will use a non-standard string table
$ lld --version
lld is a generic driver.
Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
$ which lld
/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/lld
$ lld-link --version
LLD 17.0.3
$ bin/lldb --version
lldb version 19.0.0git (https://github.com/llvm/llvm-project.git revision ee99475068523de185dce0a449b65e684a1e6b73)
clang revision ee99475068523de185dce0a449b65e684a1e6b73
llvm revision ee99475068523de185dce0a449b65e684a1e6b73
$ bin/lldb 5main.exe
(lldb) target create "5main.exe"
(rrent executable set to 'C:\Users\iammorjj\llvm-project\build\5main.exe' (x86_64).
(lldb) b main
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) r
(lldb) Process 6772 launched: 'C:\Users\iammorjj\llvm-project\build\5main.exe' (x86_64)
Process 6772 exited with status = 0 (0x00000000)
(lldb)
```
PS: for `-gdwarf-4` works ok
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs