Does anyone need GDB support?

Coordinator
Nov 13, 2014 at 11:04 PM
I am working on GDB support and just think anyone need it or not?
Coordinator
Nov 16, 2014 at 10:53 PM
First result of GDB support

Image
Nov 29, 2014 at 8:53 AM
This is an interesting project!

Having trouble getting GDB working though, llc keeps giving this.
warning: ignoring debug info with an invalid version (0) in helloworld.ll
And checking with llc-dwarf indicates no debug info made it through.

I've tried adding -dwarf-version 4 to llc, but still the same error.

I'm using LLVM 3.6 (you might want to update your link on the main page as 3.5 doesn't compile by default using your examples).

Any ideas what I'm missing?
Coordinator
Nov 29, 2014 at 9:31 AM
Edited Nov 29, 2014 at 9:41 AM
your version of llc is using DWARF version 4.1, I am genereting debug info using DWARF 4.2, you need to take git version of LLVM 3.6.

You do not need to provide any additional switch for llc, Just ensure that mtriple is provided.

example: llc -filetype=obj -mtriple=i686-w64-mingw32 file.ll

to compile for LLVM 3.5 you need to provide switch /llvm35 for Il2Bc.exe

Hopes it will help.

List of steps:

1) generate file .ll with debug info

Il2Bc.exe CoreLib.dll /debug
Il2Bc.exe helloworld.cs /corelib:CoreLib.dll /debug

2) get obj file

llc -filetype=obj -mtriple=i686-w64-mingw32 CoreLib.ll
llc -filetype=obj -mtriple=i686-w64-mingw32 helloworld.ll

3) get exe file

g++.exe -o test-1.exe helloworld.obj CoreLib.obj -lstdc++ -lgc-lib -march=i686 -L .
Nov 29, 2014 at 5:37 PM
Tried it with LLVM 3.6 built from checkout of 24th November 19:40 (very latest LLVM head doesn't compile in visual studio).

Still getting same though:

warning: ignoring debug info with an invalid version (0) in helloworld.ll
Coordinator
Nov 30, 2014 at 9:07 AM
in 1 week I am going to update, so we will see if it fix issue for you.
Dec 14, 2014 at 8:18 AM
Had another look this morning, It works fine if you use the roslyn compiler, e.g.

Il2Bc.exe helloworld.cs /corelib:CoreLib.dll /debug /roslyn

I did have a quick look at the code and the The pdb file doesn't get generated if you use csc, i tweaked the code to pass /debug to csc and the pdb gets generated but its not liked by your pdb parser.

No matter i'll use roslyn from now on.
Coordinator
Dec 14, 2014 at 12:38 PM
Thank you for your feedback. I am using rolsyn all the time. I will fix issue with PDB for csc.