Make rbc helpers use signed ints and improve debug helpers a bit.

Another trivial patch that I'm just getting off my plate.  Work for #532.