[PATCH 00/13] more minor constification

Tom Tromey tromey@redhat.com
Tue Jul 22 18:55:00 GMT 2014


This series is some more minor constification for gdb.

Patches 10, 11, and 12 contain what might be considered minor hacks.
Some command fields are generally visible to gdb (the struct is not
opaque) but are conceptually const.  However there are cases where the
fields are in fact freed when the command object is destroyed.

I chose to cast away const at these points, on the theory that
const-correctness for the bulk of the code is outweighs the cost of
this hack.  I did look at some other approaches to this problem but
considered them too heavy-weight for such a minor detail.

Tested by rebuilding on x86-64 Fedora 20.

Tom



More information about the Gdb-patches mailing list