Sunday 29 January 2012

Catching exceptions in GDB

There's a problem running gdb from GNAT GPL 2011 (which works fine with programs compiled with GNAT GPL 2011) on programs compiled with GCC 4.6 on Max OS X Lion and possibly earlier; you can't catch exceptions as you'd expect:

(gdb) break exception
Unable to insert catchpoint. Try to start the program first.

Monday 23 January 2012

Copying an XML document, with changes

I needed to modify an XML document (well, strictly an XMI document produced by ArgoUML). An XSLT stylesheet did the job.

Thursday 19 January 2012

Lines of code

Recently, tonyg asked on comp.lang.ada for a code counter. There were a couple of recommendations, including gnat metric; however, my favourite is this shell script: