<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/96923>96923</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Incorrect debug information format generated by clang on windows
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
alex-the-new-guy
</td>
</tr>
</table>
<pre>
Using version 18.1.5 on Win11, but haven't noticed anything related in the Release Notes for newer versions
The intention:
Debugging a program on windows using LLDB, which has problems showing values for programs
What I did:
Written a test program, something like
```
// test.cpp
int main() {
printf("Hello world");
return 0;
}
```
compiling with
`clang -g -gdwarf test.cpp -o test.exe`
Along with exe, clang also produces .pdb file, which it shouldn't when producing DWARF symbols
When checking debug info with llvm-dwarfdump, the output is:
```
test.exe: file format COFF-x86-64
.debug_info contents:
```
If -c flag is passed, so the compile command looks like
`clang -c -g -gdwarf test.cpp -o test.o`
The produced object file does contain DWARF debug information.
Attempting to use lld-link instead of link for linking doesn't resolve the issue.
I guess, problem could be with debug libs or something. Then documentation needs clarification, but apparently other people had it working in the past?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VF1vrDgP_jWZGwvEZArDXHDRdjR6Kx29Kx2dVS9XITGQbYhREkrn368S6Mzp2Q8J8WEc-7Gfxxbe694iNqx8YuV5J-YwkGuEwY8sDJhZXLJ-vu5aUtfmd69tD-_ovCYL-zrf5yWQhVdt93vGn6GdAwziHS3jxwCWgpaoQNhrGOJJh0YEVKAthAHhOxoUHuH_FNBDRw4sLug-E3hWnFnxuN5_DAjaBrRBk2WHzXrGdu77GFrA5Kh3Yox4Fm0VLR7mhPfbt_NTBLcMWg4wCB9dW4OjBz_QkkoSZt4gbGE8_Jz9dRABXkBpdUu9_XA6BLQgIKAPn4djNk8jrlUb_YbbmarYrvQJjF8Yv6SjuZym1aptgFFoy3jN-AnY8WnzhslpG7pk5_9DYwg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