c[ode]clap»Forums
Sara
11 posts
Expected Date for Windows DWARF Support
Edited by Sara on
Strange. I downloaded msys2 and performed:
1
pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-lld
and compiled with your invocation and still doesn't work.
spx
148 posts / 1 project
Expected Date for Windows DWARF Support
SaraPanda
Strange. I downloaded msys2 and performed:
1
pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-lld
and compiled with your invocation and still doesn't work.


Same here (and the problem with the exe seems to be identical). I may have to do some further investigation in the future.
Sara
11 posts
Expected Date for Windows DWARF Support
I have found that linking against mingw import libraries from a normal mingw installation is a new feature, first present in lld 8.

Unless wanting to compile a pre-release version of lld, have to wait for binary release of llvm 8.0.0. This will hopefully be sometime in March.
spx
148 posts / 1 project
Expected Date for Windows DWARF Support
Edited by spx on
I case you are not keeping up with the blog posts about new versions, here is good news. The newest version supports DWARF on Windows (earlier than planned). I didn't personally use it much but compiled all tests with DWARF on gcc and clang and everything seems to work. clang has a problem with outputting debug information for some C++ classes like std::string which seems to just be an empty struct so inspecting those values is not possible (gdb isn't able to show anything for those variables as well).
Sara
11 posts
Expected Date for Windows DWARF Support
I downloaded codeclap 0.8.43.
Working with familiar file:
1
2
3
4
5
6
7
8
#include <stdio.h>

int
main(int argc, char* argv[argc + 1])
{
  puts("oh my dwarf");
  return 0;
}

Compiled with dwarf:
1
clang.exe --target=x86_64-pc-windows-gnu -fuse-ld=lld.exe -g file.c -o file.exe

Don't get source:

Compiled with pdb:
1
clang.exe --target=x86_64-pc-windows-gnu -fuse-ld=lld.exe -g -gcodeview -Wl,-pdb,file2.pdb file.c -o file2.exe

Do get source:


I have dragged executables into codeclap to start session. Did you do something different?
Also, is it possible to show all the source, i.e. the return statement and closing bracket?
Thanks.
spx
148 posts / 1 project
Expected Date for Windows DWARF Support
Seems like you did everything right but I indeed did something different. The "LLVM for Windows" binary release with x86_64-pc-windows-gnu wasn't tested yet since this was the one broken until the 8.0 release. I just checked this and seems that the source mapping isn't working properly with that one and I will look into this.

Included in my tests up to now was:
gcc and clang from mingw64/msys2 with DWARF
g++ and clang++ from mingw64/msys2 with DWARF
clang for Windows binary release with x86_64-pc-windows-msvc and PDB

Will add x86_64-pc-windows-gnu targets to that.

The "missing last source line" is a commonly encountered issue, it seems mostly on Windows and possibly with msvc and clang. I don't know the exact reason for this yet but it is planned to be fixed in the next update.
Sara
11 posts
Expected Date for Windows DWARF Support
Thank you for clearing that up. Keep up the good work.