gdbserver: use inheritance more to define tracepoint contexts

This is a continuation of the previous refactoring to use inheritance
in the definition of tracepoints contexts.  Again, no behavioral change
is intended.

Different tracepoint contexts are identified by the `type` field.  The
field is used only in `get_context_regcache`, where we essentially
have 2 cases, each corresponding to a tracepoint context type.  Remove
the `type` field and split the `get_context_regcache` function into 2
virtual method implementations.

Tested by rebuilding gdbserver with '--enable-inprocess-agent=no' and
'--enable-inprocess-agent=yes'.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
1 file changed