Wednesday, March 23, 2016

ProjectCenter debugger changes (now even on windows!)

Behold ProjectCenter running on Windows with the debugger module open and GDB running in it.
 

GNUstep's ProjectCenter debugger module - something which was initiated by Greg and has always been quite experimental and unfinished - was based on running GDB via a virtual terminal by using openpty(). Sadly openpty() is not very portable and also.
I restructuured the debugger module to have a separation between the view handling the visualization and a delegate which handles the actual execution of the debugger and sending commands and receiving output.
Instead of using a terminal I implemented a std-in and std-out mechanism.
While some interactive editing properties get lost when using GDB this way (e.g. ability to answer y/n questions) it is the right way to the a machine interface. For example a stacktrace doesn't get paged but printed out fully. Different data sources now get nicely colored too!

And last but not least, it runs on Windows.