Add gdb 'when' command to report current event number.

Resolves #1393.