gdbserver: define and use regcache::reset

Define a `reset` method for a regcache and use it for code
simplification.  This patch allows further simplification in the next
patch.

The reset method fills the register data with zeroes.  For the use in
get_thread_regcache, this is added behavior, making the patch not a
pure refactoring, and may look like extra overhead.  However, it is
better to avoid having arbitrary values left in the data buffer.
Hence, it is considered a behavioral improvement.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
2 files changed