[cmake-developers] Debugger for CMake

Milian Wolff mail at milianw.de
Thu Feb 2 06:02:37 EST 2017


On Dienstag, 31. Januar 2017 20:55:45 CET Justin Berger wrote:
> > I liked the snapshots that were in Stephen Kelly's daemon-mode patch much
> 
> better than an interactive debugger.
> 
> I'm not sure these tools have that much use-case overlap. As far as I can
> tell, snapshots has roughly the same overhead / functionality as reversible
> interactive debuggers; which is non trivial. Which tool is best for a given
> problem seems situational; and having both seems useful.
> 
> I looked through the code for cmServer, since it maintains an instance of
> cmake in process, it could register as a debug listener and get events /
> set breakpoints and all in response to different requests coming in. The
> issue here though is that it seems like (and maybe this is wrong?) the
> actual call out to configure blocks on the libuv loop thread so it can't
> get or process any requests while configure is running; so maybe keeping
> them as seperate services running on separate loops is better.
> 
> The only way I could see it making sense to use a completely different
> protocol would be if there were a semi-standard debugger protocol used in
> different IDE's for debugging interpreted code, and then I think it makes
> sense to pursue those. However, I did some research into that and didn't
> find anything especially relevant -- IDE maintainers would obviously have a
> better sense of that though. Also, even if there is such a thing, there is
> no reason not to support multiple debug protocols; it is just a matter of
> prioritization.

GDB's MI is a standard protocol used by both clang and LLDB but I think it 
will be overkill for something like CMake. From my POV, CMake is very 
different from a normal application that you may debug. I mean do you really 
expect people to go line-by-line through a cmake script to see how it gets 
evaluated? I don't. Rather, I want to see the effect a call has on the CMake 
state, i.e. the approach that Stephen took is far better in my eyes.

> It seems like QtCreator is the only IDE which currently has current support
> for server-mode; are there any Qt people active on the mailing list who
> could weigh in on what approach makes the most sense from an integrators
> perspective?

KDevelop is working on adding that - we have a patch up for review which 
should be added any time now:

https://phabricator.kde.org/D4095

Cheers

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170202/7ccdd29b/attachment.sig>


More information about the cmake-developers mailing list