A big thank you (and Windows support)

Hi,

I’m currently using LLDB as backend for a new debugger (anyone interested can look at http://emoon.github.io/ProDBG) and I just wanted to say a big thank you.

The C++ API (even a bit lacking documentation wise) has been really great to work and I honestly couldn’t ask for more so hats off for that!

The debugger project is primary for Mac OS X and LLDB works great there so no big issue with that but at some point I would like to bring it over to Windows as well. I have looked around a bit in the codebase and there seems to be some Windows support there but I’m a bit unsure of what the current status is?

Another issue is that often programs on Windows is compiled using msvc and thus has PDB files for the debug info and I wonder if there are any plans on supporting PDBs? One issue also is that PDB file format is proprietary so one would have to reverse engineer it (or use the imghelp library on Windows but dunno if it would give all data needed)

Cheers!

-Daniel

Hi Daniel,

Windows support is mostly in the 'windows' branch at the moment.. And as far as I know LLDB builds on Windows with VS2010, but supports only remote debugging of targets that support debugserver (maybe gdbserver as well, since the protocol is mostly compatible AFAIK).

I don't believe there's been any work to support native debugging of Windows targets, including parsing PDB files, unfortunately..

CC'ing Carlo in case he has more details.

Cheers,
Dan

Hi,

I'm currently using LLDB as backend for a new debugger (anyone interested can look at http://emoon.github.io/ProDBG) and I just wanted to say a big thank you.

I am glad you like it.

The C++ API (even a bit lacking documentation wise) has been really great to work and I honestly couldn’t ask for more so hats off for that!

That is great to hear.

The debugger project is primary for Mac OS X and LLDB works great there so no big issue with that but at some point I would like to bring it over to Windows as well. I have looked around a bit in the codebase and there seems to be some Windows support there but I'm a bit unsure of what the current status is?

There is a windows branch with all the required changes for windows. I haven't had time to check these changes out and merge them into trunk yet, but I hope to get to that in the next few months

Another issue is that often programs on Windows is compiled using msvc and thus has PDB files for the debug info and I wonder if there are any plans on supporting PDBs? One issue also is that PDB file format is proprietary so one would have to reverse engineer it (or use the imghelp library on Windows but dunno if it would give all data needed)

This is the main issue. PDB is a closed file format. It would be great to support it, but it might require a lot of work.

Greg Clayton

Hi Greg,

Thanks for the status update on this. Would be great to have the changes merged into trunk as it would make it a bit easier to do additional work on in then.

Cheers!

Daniel

Hi Dan,

Thanks for the the info.

Cheers,

Daniel

Op 29-5-2013 20:54, Malea, Daniel schreef:

Hi Daniel,

Windows support is mostly in the 'windows' branch at the moment.. And
as far as I know LLDB builds on Windows with VS2010, but supports
only remote debugging of targets that support debugserver (maybe
gdbserver as well, since the protocol is mostly compatible AFAIK).

I don't believe there's been any work to support native debugging of
Windows targets, including parsing PDB files, unfortunately..

CC'ing Carlo in case he has more details.

Seems I completely missed this thread.

Windows works yes, but only for remote debugging. Everything also compiles except the different "Host" code. To debug on Windows itself these things would be needed:
* A windows host needs to be implemented (something that starts/attaches to a process, pauses/resumes it & it's threads, etc)
* Something that reads PE files. I'm not sure how debug info on Windows is stored, it might be more practical to start with Mingw compiled debug info first, and move from there.

Now PDB support/Visual C++ generated executable debugging is a whole other thing. As far as I know nobody has fully decyphered that file format, I know there are some .NET libs that can partially read the info they need, but I doubt that will do much good as c/c++ stores a lot more info.

There's another problem with that. The debugger uses clang to to execute/evaluate expressions, and as far as I know, clang cannot emit abi compatible code that matches vc yet.

That all said, the Windows branch is quite up to date and compiles with VC2010.

Hi Carlo,

Thanks for the reply. Now I have a good idea of the current state for Windows. I also wonder if there is a long term plan to support Windows (natively that is and even if it was compiled with clang only)

Cheers!

Daniel

By the way, what is the status on merging the Windows branch to master?

Op 25-6-2013 0:44, João Matos schreef:

By the way, what is the status on merging the Windows branch to master?

Afaik still the same as last time :frowning:

Greg, any idea when you’ll be able to review the changes on the Windows branch?

Since people are starting to work on top of it it would be best for everyone to get this in trunk ASAP.