WIP: lots of refactoring to support dropping into GDB CLI